OSDN Git Service

PR c++/46124
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / torture / pr41183.C
1 // PR c++/41183
2 // { dg-do compile }
3
4 void foo (const char *);
5
6 template <int *>
7 struct A
8 {
9   template <typename T> A (const int &, T);
10   int i;
11 };
12
13 template <int *X>
14 template <typename T>
15 A<X>::A (const int &j, T) : i(j)
16 {
17   foo (0);
18   foo (0);
19   foo (__PRETTY_FUNCTION__);
20 }
21
22 int N;
23
24 struct B
25 {
26   B ();
27   A<&N> a;
28 };
29
30 B::B() : a(N, 0) {}