Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / template / function1.C
blob1097c5bf9c2de1360e03c14cb3d7e5103a7038a0
1 // PR c++/38647
2 // { dg-do compile }
4 template<const char *, int> struct A {};
5 const char func[] = "abc";
6 template<int N> struct A<func, N> {};   // { dg-error "cannot appear|is invalid" }
8 char a1[1];
9 A<a1, 0> a;
11 template<const char *, int> struct B {};
12 template<int N> struct B<__FUNCTION__, N> {};   // { dg-error "cannot appear|is invalid" }
14 char b1[1];
15 B<b1, 0> b;
17 template<const char *, int> struct C {};
18 template<int N> struct C<__PRETTY_FUNCTION__, N> {};    // { dg-error "cannot appear|is invalid" }
20 char c1[1];
21 C<c1, 0> c;
23 template<const char *, int> struct D {};
24 template<int N> struct D<__func__, N> {};       // { dg-error "cannot appear|is invalid" }
26 char d1[1];
27 D<d1, 0> d;