From 0ae1678fd9f972a64bfa54da723e760d32dd95ab Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 25 Sep 2018 16:05:48 +0000 Subject: [PATCH] re PR c++/81246 (ICE on invalid C++ code (with a non-type template parameter having type 'float'): Segmentation fault) 2018-09-25 Paolo Carlini PR c++/81246 * g++.dg/cpp0x/pr81246.C: New. From-SVN: r264577 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/pr81246.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr81246.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a591bf07ff..056597d153f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-09-25 Paolo Carlini + + PR c++/81246 + * g++.dg/cpp0x/pr81246.C: New. + 2018-09-25 H.J. Lu 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 index 00000000000..e51e0b9a6e1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr81246.C @@ -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; +} -- 2.30.2