aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-12-29 09:28:06 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-12-29 09:28:06 +0100
commit19bb3aa5c5b80330b86ac07b0590573af43d83cc (patch)
tree9b37fb80dd3b6b97223446dfd75d0c044727ade9 /gcc/testsuite/g++.dg
parentbbddfe5b6c53a0daad579fbc025b8f5d63c24687 (diff)
downloadgcc-19bb3aa5c5b80330b86ac07b0590573af43d83cc.zip
gcc-19bb3aa5c5b80330b86ac07b0590573af43d83cc.tar.gz
gcc-19bb3aa5c5b80330b86ac07b0590573af43d83cc.tar.bz2
re PR c++/38637 (ICE with template declaration of enum)
PR c++/38637 * decl.c (start_enum): If enumtype is error_mark_node, exit early. * g++.dg/cpp0x/enum2.C: New test. From-SVN: r142946
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum2.C5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum2.C b/gcc/testsuite/g++.dg/cpp0x/enum2.C
new file mode 100644
index 0000000..2353f1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum2.C
@@ -0,0 +1,5 @@
+// PR c++/38637
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+template<int> enum E : int { e }; // { dg-error "template declaration of" }