| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fgnu-tm" } */ |
| 3 |
|
| 4 |
void mco(void) __attribute__((transaction_may_cancel_outer)); |
| 5 |
|
| 6 |
void |
| 7 |
f(void) |
| 8 |
{ |
| 9 |
mco(); /* { dg-error "" } */ |
| 10 |
__transaction_atomic { |
| 11 |
mco(); /* { dg-error "" } */ |
| 12 |
} |
| 13 |
__transaction_relaxed { |
| 14 |
mco(); /* { dg-error "" } */ |
| 15 |
} |
| 16 |
__transaction_atomic [[outer]] { |
| 17 |
mco(); |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
void __attribute__((transaction_may_cancel_outer)) |
| 22 |
g(void) |
| 23 |
{ |
| 24 |
mco(); |
| 25 |
__transaction_atomic { |
| 26 |
mco(); |
| 27 |
} |
| 28 |
__transaction_atomic [[outer]] { /* { dg-error "" } */ |
| 29 |
mco(); |
| 30 |
} |
| 31 |
} |