re PR c++/10858 (failure with calling a method inside sizeof: sorry, unimplemented...
authorAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 3 Feb 2004 07:27:37 +0000 (23:27 -0800)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 3 Feb 2004 07:27:37 +0000 (23:27 -0800)
2004-02-02  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/10858
        * g++.dg/template/sizeof7.C: New test.

From-SVN: r77164

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

index 84a9692c28647e37f724af3a386f7798e4cb1d9a..bea92a10f3eb1fd472a7752d7e53c3900544ec7c 100644 (file)
@@ -1,5 +1,10 @@
-2004-02-02 Eric Christopher  <echristo@redhat.com>
-           Zack Weinberg  <zack@codesourcery.com>
+2004-02-02  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/10858
+       * g++.dg/template/sizeof7.C: New test.
+
+2004-02-02  Eric Christopher  <echristo@redhat.com>
+            Zack Weinberg  <zack@codesourcery.com>
 
        * gcc.c-torture/execute/wchar_t-1.c: Add -finput-charset.
 
diff --git a/gcc/testsuite/g++.dg/template/sizeof7.C b/gcc/testsuite/g++.dg/template/sizeof7.C
new file mode 100644 (file)
index 0000000..4964bfd
--- /dev/null
@@ -0,0 +1,14 @@
+// { dg-do compile }
+// Testcase by: bangerth@dealii.org
+// PR c++/10858: failure with calling a method inside sizeof in a template
+
+    template <int> struct P {};
+    
+    void bar ();
+    
+    template <class T> struct X {
+        static int foo(void (*)());
+        P<sizeof(foo(&bar))> p;    
+    };
+    
+    template class X<int>;