re PR c++/81246 (ICE on invalid C++ code (with a non-type template parameter having...
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 25 Sep 2018 16:05:48 +0000 (16:05 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 25 Sep 2018 16:05:48 +0000 (16:05 +0000)
2018-09-25  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/81246
* g++.dg/cpp0x/pr81246.C: New.

From-SVN: r264577

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

index 4a591bf07ff6f78482895452c24978a610bd2b08..056597d153fb7ec717be2b6318e886aa1ae9804f 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-25  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/81246
+       * g++.dg/cpp0x/pr81246.C: New.
+
 2018-09-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/82699
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr81246.C b/gcc/testsuite/g++.dg/cpp0x/pr81246.C
new file mode 100644 (file)
index 0000000..e51e0b9
--- /dev/null
@@ -0,0 +1,11 @@
+// { dg-do compile { target c++11 } }
+
+namespace N
+{ 
+  template < typename T > class A
+  { 
+    template < T > friend class B;  // { dg-error "not a valid type" }
+  };
+
+  A < float > a;
+}