hppa: Fix ICE caused by mismatched predicate and constraint in xmpyu patterns
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / fn-template7.C
blob2c5ee120dcd4ad132ff68935f40cb496e0c26ece
1 // P0846R0
2 // { dg-do compile }
3 // { dg-options "-std=c++2a" }
5 struct undeclared<int> { }; // { dg-error "not a class template" }
7 int
8 main ()
10   int foo (); // { dg-warning "empty parentheses" }
11   int a, b = 10;
12   a = foo<; // { dg-error "invalid template-argument-list|invalid" }
13   a = foo < b; // { dg-error "invalid template-argument-list|invalid" }
14   a = foo<b>; // { dg-error "after template-argument-list|invalid" }
15   a = foo<b>(; // { dg-error "expected" }
16   a = foo<b>(1; // { dg-error "expected" }
17   a = foo<b>(1); // { dg-error "no matching" }