Merge from trunk @ 138209
[official-gcc.git] / gcc / testsuite / g++.dg / parse / error2.C
blob075dcc2b0d15c86dc733c485fedf06090441d508
1 // { dg-do compile }
2 // { dg-options "-fshow-column" }
3 // Properly print CALL_EXPRs while dumping expressions
5 double g;
6 int func(double);
8 template <int>
9 struct Foo {};
11 Foo<func(g)> f; // { dg-error "5: error: 'int func.double.' cannot appear in a constant-expression" "" { target *-*-* } { 11 } }
12 // { dg-error "10: error: 'g' cannot appear in a constant-expression" "" { target *-*-* } { 11 } }
13 // { dg-error "11: error: a function call cannot appear in a constant-expression" "" { target *-*-* } { 11 } }
14 // { dg-error "12: error: template argument 1 is invalid" "" { target *-*-* } { 11 } }
15 // { dg-error "15: error: invalid type in declaration before ';' token" "" { target *-*-* } { 11 } }