Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / abi / guard2.C
blob988fd385bf9c39beadfddd53a9005cd6a410feb9
1 // PR c++/41611
2 // Test that the guard gets its own COMDAT group.
3 // { dg-final { scan-assembler "_ZGVZN1A1fEvE1i,comdat" { target *-*-linux* } } }
5 struct A {
6   static int f()
7   {
8     static int &i = *new int();
9     return i;
10   }
13 int main()
15   return A::f();