summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/crash10.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash10.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash10.C b/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
new file mode 100644
index 000000000..86f386150
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
@@ -0,0 +1,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" }
+}