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:
parent
125b98b127
commit
2db698cefc
@ -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
|
||||
|
21
gcc/testsuite/g++.dg/cpp2a/nontype-class13.C
Normal file
21
gcc/testsuite/g++.dg/cpp2a/nontype-class13.C
Normal 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 ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user