OSDN Git Service

PR c++/29175
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / init / static3.C
1 // { dg-do run }
2
3 struct T
4 {
5   static void (*handler)();
6   static void func() {};
7 };
8
9 bool fail;
10
11 struct S {
12   S() {
13     if (T::handler != T::func)
14       fail = true;
15   }
16 };
17
18 static S s;
19
20 void (*T::handler)() = func;
21
22 int main()
23 {
24   if (fail)
25     return 1;
26 }