OSDN Git Service

09643e952285783ec83adaa068892f15a8b91038
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / abi / guard2.C
1 // PR c++/41611
2 // Test that the guard gets its own COMDAT group.
3 // { dg-final { scan-assembler "_ZGVZN1A1fEvE1i,comdat" { target i?86-*-* x86_64-*-* } } }
4
5 struct A {
6   static int f()
7   {
8     static int &i = *new int();
9     return i;
10   }
11 };
12
13 int main()
14 {
15   return A::f();
16 }