1/* { dg-do compile } */ 2/* { dg-options "-fgnu-tm -O0 -fdump-tree-optimized" } */ 3 4int george; 5int ringo; 6 7__attribute__((transaction_callable)) 8void foo() 9{ 10 ringo=666; 11 __transaction_atomic { 12 george=999; 13 } 14} 15 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" } } */ 21 22/* { dg-final { cleanup-tree-dump "optimized" } } */ 23