re PR c++/44118 (ICE: in instantiate_decl, at cp/pt.c:16657)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 20 Feb 2011 11:11:05 +0000 (11:11 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 20 Feb 2011 11:11:05 +0000 (11:11 +0000)
2011-02-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/44118
* g++.dg/template/crash105.C: New.

From-SVN: r170336

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

index 2f82fedd25e8ca29e71a47994bb635be0116e11d..00fa79f5c06954c1be294d695d2705f828fc848d 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/44118
+       * g++.dg/template/crash105.C: New.
+
 2011-02-19  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/regress/no-elide1.C: New.
diff --git a/gcc/testsuite/g++.dg/template/crash105.C b/gcc/testsuite/g++.dg/template/crash105.C
new file mode 100644 (file)
index 0000000..649bf8b
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/44118
+
+template < typename > struct S;
+template < typename > struct S < int >; // { dg-error "template" }
+template < typename > struct S < int >
+{
+  void f ();
+};
+
+void
+f ()
+{
+  S < int >::f (); // { dg-error "cannot call" }
+}