OSDN Git Service

2011-02-20 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Feb 2011 11:11:05 +0000 (11:11 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 Feb 2011 11:11:05 +0000 (11:11 +0000)
PR c++/44118
* g++.dg/template/crash105.C: New.

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

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

index 2f82fed..00fa79f 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" }
+}