PR middle-end/55401
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / pr55401.c
blob1ac7d975715decbbd36de4ea6fb7e0f327519b2e
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O0 -fdump-tree-optimized" } */
4 int george;
5 int ringo;
7 __attribute__((transaction_callable))
8 void foo()
10 ringo=666;
11 __transaction_atomic {
12 george=999;
16 /* There should only be 2 instrumented writes to GEORGE: one in FOO,
17 and one in the transactional clone to FOO. There should NOT be
18 more than one instrumented write to GEORGE in the clone of
19 FOO. */
20 /* { dg-final { scan-tree-dump-times "ITM_WU\[0-9\] \\(&george," 2 "optimized" } } */
22 /* { dg-final { cleanup-tree-dump "optimized" } } */