PR c++/27665
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jun 2006 03:51:51 +0000 (03:51 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Jun 2006 03:51:51 +0000 (03:51 +0000)
* parser.c (cp_parser_unqualified_id): Use constructor_name_p to
identify destructors.
(cp_parser_nested_name_specifier_opt): Remove invalid
optimization.
(cp_parser_template_id): Refine heuristic for determining whether
we are entering a scope.
PR c++/27665
* g++.dg/template/crash52.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114669 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/crash52.C [new file with mode: 0644]

index 7bdd699..78e4ed8 100644 (file)
@@ -1,5 +1,13 @@
 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/27665
+       * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
+       identify destructors.
+       (cp_parser_nested_name_specifier_opt): Remove invalid
+       optimization.
+       (cp_parser_template_id): Refine heuristic for determining whether
+       we are entering a scope.
+
        PR c++/27648
        * parser.c (cp_parser_declarator): Robustify.
 
index 6dc94a4..0a934c9 100644 (file)
@@ -1,5 +1,8 @@
 2006-06-14  Mark Mitchell  <mark@codesourcery.com>
 
+       PR c++/27665
+       * g++.dg/template/crash52.C: New test.
+
        PR c++/27648
        * g++.dg/ext/attrib22.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/template/crash52.C b/gcc/testsuite/g++.dg/template/crash52.C
new file mode 100644 (file)
index 0000000..9fc3f68
--- /dev/null
@@ -0,0 +1,19 @@
+// PR c++/27665
+
+template<int> struct A
+{
+    struct B
+    {
+      struct C {};
+    };
+};
+
+template<int N> void foo()
+{
+  class A<N>::B::C X;
+}
+
+void bar()
+{
+  foo<0>();
+}