re PR c++/16630 (missing type name in __PRETTY_FUNCTION__)
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Sun, 4 Jul 2010 18:16:59 +0000 (18:16 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Sun, 4 Jul 2010 18:16:59 +0000 (18:16 +0000)
2010-07-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c++/16630
* g++.dg/ext/pretty3.C: New.

From-SVN: r161805

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

index bafaa7e171290e291c723bc94931dbf71902f757..e4aedfebf889d38c85b3f732190a2aeba95fdb29 100644 (file)
@@ -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
diff --git a/gcc/testsuite/g++.dg/ext/pretty3.C b/gcc/testsuite/g++.dg/ext/pretty3.C
new file mode 100644 (file)
index 0000000..01b1457
--- /dev/null
@@ -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\\)" } }