diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/tm/outer-1.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/tm/outer-1.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/tm/outer-1.c b/gcc-4.9/gcc/testsuite/c-c++-common/tm/outer-1.c new file mode 100644 index 000000000..7dbf2e831 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/tm/outer-1.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm" } */ + +void mco(void) __attribute__((transaction_may_cancel_outer)); + +void +f(void) +{ + mco(); /* { dg-error "" } */ + __transaction_atomic { + mco(); /* { dg-error "" } */ + } + __transaction_relaxed { + mco(); /* { dg-error "" } */ + } + __transaction_atomic [[outer]] { + mco(); + } +} + +void __attribute__((transaction_may_cancel_outer)) +g(void) +{ + mco(); + __transaction_atomic { + mco(); + } + __transaction_atomic [[outer]] { /* { dg-error "" } */ + mco(); + } +} |