re PR c++/77304 (ICE on C++ code with invalid template parameter: in gimplify_expr, at gimplify.c:11260)

PR c++/77304
	* g++.dg/cpp2a/nontype-class13.C: New test.

From-SVN: r268849
This commit is contained in:
Marek Polacek 2019-02-13 16:35:44 +00:00 committed by Marek Polacek
parent 125b98b127
commit 2db698cefc
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2019-02-13 Marek Polacek <polacek@redhat.com>
PR c++/77304
* g++.dg/cpp2a/nontype-class13.C: New test.
2019-02-13 Wilco Dijkstra <wdijkstr@arm.com>
PR target/89190

View File

@ -0,0 +1,21 @@
// PR c++/77304
// { dg-do compile { target c++2a } }
struct S {};
template < typename T > struct A
{
template < S > void f () {}
static void * g ()
{
return (void *) f < a >; // { dg-error "invalid" }
}
static S a;
};
void * f ()
{
return A < int >::g ();
}