* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / static6.C
blob00e76fb73503ec58d1a67e6653d0d3138b234310
1 // PR c++/31806
2 // { dg-do run }
3 // { dg-options "-O2 -fno-inline -fno-threadsafe-statics" }
5 extern "C" void abort(void);
7 struct A
9     void *d;
12 static const A& staticA()
14     static A s_static;
15     return s_static;
18 void assert_failed()
20     abort();
23 A testMethod()
25     static const A& s = staticA( );
26     if (&s == 0)
27         assert_failed();
28     return s;
31 int main()
33     testMethod();
34     return 0;