diff mbox

[C++,committed] Add PR 44118 testcase

Message ID 4D60F717.1080402@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Feb. 20, 2011, 11:12 a.m. UTC
Hi,

tested x86_64-linux, committed to mainline.

Paolo.

//////////////////////
2011-02-20  Paolo Carlini  <paolo.carlini@oracle.com>

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

Patch

Index: g++.dg/template/crash105.C
===================================================================
--- g++.dg/template/crash105.C	(revision 0)
+++ g++.dg/template/crash105.C	(revision 0)
@@ -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" }
+}