gcc/testsuite/c-c++-common/tm/trxn-expr-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* Make sure that we don't just crash without -fgnu-tm enabled. */ |
| 3 | /* { dg-options "" } */ |
| 4 | |
| 5 | int x; |
| 6 | |
| 7 | int foo(void) |
| 8 | { |
| 9 | return __transaction_atomic (x + 1); /* { dg-error "" } */ |
| 10 | } |
| 11 | |
| 12 | int bar(void) |
| 13 | { |
| 14 | return __transaction_relaxed (x + 1); /* { dg-error "" } */ |
| 15 | } |