PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / static5.C
blob1daca6d7194312eeea5147c95d34ef1c47e3ef60
1 // PR c++/31809
2 // { dg-do run }
3 // { dg-options "-O2" }
5 struct S
7   unsigned v;
8   static inline S f (unsigned a);
9 };
11 inline S
12 S::f (unsigned a)
14   static S t = { a };
15   return t;
18 const static S s = S::f (26);
20 extern "C" void abort (void);
22 int
23 main ()
25   S t = s;
26   if (t.v != 26)
27     abort ();
28   return 0;