This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR c++/16630 missing type name in __PRETTY_FUNCTION__


I committed as obvious the testcase of PR 16630 so we do not regress
in the future.

Cheers,

Manuel


Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog     (revision 161804)
+++ gcc/testsuite/ChangeLog     (revision 161805)
@@ -1,3 +1,8 @@
+2010-07-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
+
+       PR c++/16630
+       * g++.dg/ext/pretty3.C: New.
+
 2010-07-04  Richard Guenther  <rguenther@suse.de>

        PR middle-end/44809
Index: gcc/testsuite/g++.dg/ext/pretty3.C
===================================================================
--- gcc/testsuite/g++.dg/ext/pretty3.C  (revision 0)
+++ gcc/testsuite/g++.dg/ext/pretty3.C  (revision 161805)
@@ -0,0 +1,19 @@
+// PR c++/16630
+// { dg-do compile }
+// { dg-options "" }
+extern "C" int printf (const char*, ...);
+
+template <class T>
+struct B { typedef T X; };
+
+template <class U>
+struct D
+{
+  const char* foo (typename B<U>::X) { return __PRETTY_FUNCTION__; }
+};
+
+int main ()
+{
+  printf ("%s\n", D<int>().foo (0));
+}
+// { dg-final { scan-assembler "const char\\* D<U>::foo\\(typename
B<U>::X\\)" } }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]