summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
blob: 86f386150d9bf432f04fe5d54122c9e158c6210b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do assemble  }

template<int M, int N>
class GCD {
public:
  enum { val = (N == 0) ? M : GCD<N, M % N>::val }; // { dg-warning "division" "division" }
// { dg-error "constant expression" "valid" { target *-*-* } 6 }
// { dg-message "template argument" "valid" { target *-*-* } 6 }
};

int main() {
  GCD< 1, 0 >::val; // { dg-message "instantiated" }
}