re PR c++/59004 (ICE generated by __func__)
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 8 Jan 2015 18:04:03 +0000 (18:04 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 8 Jan 2015 18:04:03 +0000 (18:04 +0000)
2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/59004
* g++.dg/ext/fnname4.C: New.

From-SVN: r219353

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

index 8ed09aed3f12081f4783f0757e6619d03badd8ac..e2112fff3ead2fa86a496e8202865276b287f1cc 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/59004
+       * g++.dg/ext/fnname4.C: New.
+
 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/64462
diff --git a/gcc/testsuite/g++.dg/ext/fnname4.C b/gcc/testsuite/g++.dg/ext/fnname4.C
new file mode 100644 (file)
index 0000000..6540987
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/59004
+
+template<int z> class A {};
+
+template<int x>
+class B {
+public:
+    static const int y = (x != -1 ? 0 : 0);
+
+    template<int z> void g(const A<y> &a) {
+        const char *x2 = __func__;
+    }
+};
+template void B<0>::g<0>(const A<0> &);