aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
blob: 5e87876147c7fa5a7f1b63a06f5fd9f0767bf30e (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-error "constant expression" "valid" { target *-*-* } 6 }
// { dg-message "template argument" "valid" { target *-*-* } 6 }
};

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