OSDN Git Service

PR middle-end/51516
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tm / pr51516.C
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -fdump-tree-optimized" } */
3
4 struct C {
5   long l;
6   C():l(0) {}
7 };
8
9 int main()
10 {
11   C* alloc;
12   __transaction_atomic {
13     alloc = new C;
14   }
15   alloc->l = 2;
16
17   return 0;
18 }
19
20 /* { dg-final { scan-assembler-not "_ITM_getTMCloneOrIrrevocable" } } */
21 /* { dg-final { scan-tree-dump-times ";; Function C::C" 1 "optimized" } } */
22 /* { dg-final { cleanup-tree-dump "optimized" } } */