diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-19 22:15:56 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-19 22:15:56 +0000 |
commit | dd549fa9bfd44e1e0385eaba338db8418361e01b (patch) | |
tree | 52777df4b7533d37c9d0b493bb890c57075c9342 /gcc/testsuite/gcc.dg/tm | |
parent | 02635c61a31382db4455ea6ad16c5a28049023f4 (diff) | |
download | gcc-dd549fa9bfd44e1e0385eaba338db8418361e01b.tar.gz |
Rename/split __transaction into __transaction_atomic and __transaction_relaxed.
* c-common.h (RID_TRANSACTION): Split into RID_TRANSACTION_ATOMIC
and RID_TRANSACTION_RELAXED.
* c-common.c (RID_TRANSACTION): Same.
( parse_tm_stmt_attr): Do not accept "atomic" and "relaxed"
attributes anymore.
* c-family/common.h: Same.
* c-family/common.c: Same.
* c-parser.c (c_parser_transaction_expression, c_parser_transaction,
c_parser_statement_after_labels, c_parser_unary_expression):
Handle both RID_TRANSACTION_ATOMIC and RID_TRANSACTION_RELAXED.
(c_parser_attribute_any_word): Only RID_TRANSACTION_ATOMIC accepts
attributes.
(c_parser_transaction_cancel): Update error messages.
* tree-pretty-print.c: Adjust to new syntax.
* gimple-pretty-print.c: Same.
* cp/parser.c (cp_parser_transaction, cp_parser_function_transaction,
cp_parser_transaction_expression, cp_parser_unary_expression,
cp_parser_statement, cp_parser_function_definition_after_declarator,
cp_parser_token_starts_function_definition_p):
Handle both RID_TRANSACTION_ATOMIC and RID_TRANSACTION_RELAXED.
(RT_TRANSACTION): Split into RT_TRANSACTION_ATOMIC and
RT_TRANSACTION_RELAXED.
(cp_parser_required_error): Same.
(cp_parser_transaction_cancel): Update error messages.
* cp/parser.h (cp_parser): Update comment.
* gimple.h: Same.
* gimple.def: Same.
* cp/semantics.c (begin_transaction_stmt): Add flags parameter.
* cp/cp-tree.h: Same.
* cp/pt.c (tsubst_expr): Same.
* testsuite/c-c++-common/tm/*: Adjust for new syntax.
* testsuite/g++.dg/tm/*: Same.
* testsuite/gcc.dg/tm/*: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@180221 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tm')
49 files changed, 54 insertions, 54 deletions
diff --git a/gcc/testsuite/gcc.dg/tm/20091013.c b/gcc/testsuite/gcc.dg/tm/20091013.c index bc9f47856a9..945ec126bb6 100644 --- a/gcc/testsuite/gcc.dg/tm/20091013.c +++ b/gcc/testsuite/gcc.dg/tm/20091013.c @@ -6,7 +6,7 @@ int g,i; f() { - __transaction [[relaxed]] { + __transaction_relaxed { for (i=0; i < 10; ++i) ringo(g); } diff --git a/gcc/testsuite/gcc.dg/tm/20091221.c b/gcc/testsuite/gcc.dg/tm/20091221.c index 1d21323c893..1d75d153a2c 100644 --- a/gcc/testsuite/gcc.dg/tm/20091221.c +++ b/gcc/testsuite/gcc.dg/tm/20091221.c @@ -6,7 +6,7 @@ extern void virgin () __attribute__((transaction_pure)); foo() { - __transaction { + __transaction_atomic { virgin(i); } } diff --git a/gcc/testsuite/gcc.dg/tm/20100125.c b/gcc/testsuite/gcc.dg/tm/20100125.c index 0544cc5ac25..3f1dd10fea2 100644 --- a/gcc/testsuite/gcc.dg/tm/20100125.c +++ b/gcc/testsuite/gcc.dg/tm/20100125.c @@ -7,7 +7,7 @@ int trxn; void set_remove(int * val) { - __transaction { + __transaction_atomic { trxn = 5; } george(); diff --git a/gcc/testsuite/gcc.dg/tm/20100609.c b/gcc/testsuite/gcc.dg/tm/20100609.c index 68e556f81ca..91223e9623d 100644 --- a/gcc/testsuite/gcc.dg/tm/20100609.c +++ b/gcc/testsuite/gcc.dg/tm/20100609.c @@ -7,7 +7,7 @@ int later; void MyFunc() { - __transaction [[relaxed]] { + __transaction_relaxed { funcNoReturn(); later=8; } diff --git a/gcc/testsuite/gcc.dg/tm/20100615.c b/gcc/testsuite/gcc.dg/tm/20100615.c index 022d5f5522a..3d9e4684e5d 100644 --- a/gcc/testsuite/gcc.dg/tm/20100615.c +++ b/gcc/testsuite/gcc.dg/tm/20100615.c @@ -28,7 +28,7 @@ static node_t *new_node(node_t *next) static node_t *set_new() { node_t *min, *max; - __transaction [[atomic]] { + __transaction_atomic { max = new_node(NULL); min = new_node(max); } diff --git a/gcc/testsuite/gcc.dg/tm/20110216.c b/gcc/testsuite/gcc.dg/tm/20110216.c index 25f038b7848..22edae0fb4c 100644 --- a/gcc/testsuite/gcc.dg/tm/20110216.c +++ b/gcc/testsuite/gcc.dg/tm/20110216.c @@ -6,7 +6,7 @@ int george; __attribute__((transaction_callable)) void q1() { - __transaction [[atomic]] { + __transaction_atomic { george=999; } q1(); diff --git a/gcc/testsuite/gcc.dg/tm/alias-1.c b/gcc/testsuite/gcc.dg/tm/alias-1.c index 1b3cd53a76d..4a913daaea9 100644 --- a/gcc/testsuite/gcc.dg/tm/alias-1.c +++ b/gcc/testsuite/gcc.dg/tm/alias-1.c @@ -30,7 +30,7 @@ ptrcast ui; void f(void) { - __transaction { + __transaction_atomic { ui = TM_LOAD (&mystruct); mystruct = (struct mystruct_type *) ui; ui = TM_LOAD (&someptr); diff --git a/gcc/testsuite/gcc.dg/tm/data-1.c b/gcc/testsuite/gcc.dg/tm/data-1.c index cceae950a7b..16061476e08 100644 --- a/gcc/testsuite/gcc.dg/tm/data-1.c +++ b/gcc/testsuite/gcc.dg/tm/data-1.c @@ -24,7 +24,7 @@ static long double gld; void f(void) { - __transaction { + __transaction_atomic { gc++; gsc++; guc++; diff --git a/gcc/testsuite/gcc.dg/tm/data-2.c b/gcc/testsuite/gcc.dg/tm/data-2.c index 3f3611e463f..3e2a604bfb3 100644 --- a/gcc/testsuite/gcc.dg/tm/data-2.c +++ b/gcc/testsuite/gcc.dg/tm/data-2.c @@ -16,7 +16,7 @@ void f(void) struct S l; fill(&l); - __transaction { + __transaction_atomic { g = l; } } diff --git a/gcc/testsuite/gcc.dg/tm/debug-1.c b/gcc/testsuite/gcc.dg/tm/debug-1.c index 035bddf98f5..94e1b3bb882 100644 --- a/gcc/testsuite/gcc.dg/tm/debug-1.c +++ b/gcc/testsuite/gcc.dg/tm/debug-1.c @@ -11,7 +11,7 @@ testing(){ main() { b = 9898; - __transaction [[relaxed]] { + __transaction_relaxed { z = c; a = 888; testing(); diff --git a/gcc/testsuite/gcc.dg/tm/indirect-1.c b/gcc/testsuite/gcc.dg/tm/indirect-1.c index fe8798f0f33..eade848bd8b 100644 --- a/gcc/testsuite/gcc.dg/tm/indirect-1.c +++ b/gcc/testsuite/gcc.dg/tm/indirect-1.c @@ -3,7 +3,7 @@ void foo(void (*fn)(void)) { - __transaction [[relaxed]] { + __transaction_relaxed { fn(); } } diff --git a/gcc/testsuite/gcc.dg/tm/ipa-1.c b/gcc/testsuite/gcc.dg/tm/ipa-1.c index 7c433b1e914..ec1cdca7032 100644 --- a/gcc/testsuite/gcc.dg/tm/ipa-1.c +++ b/gcc/testsuite/gcc.dg/tm/ipa-1.c @@ -5,7 +5,7 @@ void foo(void) __attribute__((transaction_safe)); void bar(void) { - __transaction { + __transaction_atomic { foo(); } } diff --git a/gcc/testsuite/gcc.dg/tm/ipa-2.c b/gcc/testsuite/gcc.dg/tm/ipa-2.c index 57606f6e5a7..e7a02cb1926 100644 --- a/gcc/testsuite/gcc.dg/tm/ipa-2.c +++ b/gcc/testsuite/gcc.dg/tm/ipa-2.c @@ -5,7 +5,7 @@ void foo(void); void bar(void) { - __transaction [[relaxed]] { + __transaction_relaxed { foo(); } } diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-1.c b/gcc/testsuite/gcc.dg/tm/irrevocable-1.c index 2408d0c6531..60f629133ee 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-1.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-1.c @@ -8,7 +8,7 @@ extern crap() __attribute__((transaction_unsafe)); foo() { - __transaction [[relaxed]] { + __transaction_relaxed { global++; crap(); george++; diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-2.c b/gcc/testsuite/gcc.dg/tm/irrevocable-2.c index 83ad4352b07..17ac8a5f0c0 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-2.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-2.c @@ -9,7 +9,7 @@ int george; foo() { - __transaction [[relaxed]] { + __transaction_relaxed { global++; __builtin__ITM_changeTransactionMode (0); george++; diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-3.c b/gcc/testsuite/gcc.dg/tm/irrevocable-3.c index 46602e24574..c0854794803 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-3.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-3.c @@ -5,7 +5,7 @@ extern void bar(void) __attribute__((transaction_callable)); foo() { - __transaction [[relaxed]] { + __transaction_relaxed { bar(); } } diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-4.c b/gcc/testsuite/gcc.dg/tm/irrevocable-4.c index fea2e96483d..ee759b84ef0 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-4.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-4.c @@ -7,7 +7,7 @@ void xyz(void) __attribute__((transaction_wrap (orig))); foo() { - __transaction [[relaxed]] { + __transaction_relaxed { orig(); } } diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-5.c b/gcc/testsuite/gcc.dg/tm/irrevocable-5.c index e3bd7fc109e..155879f1a21 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-5.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-5.c @@ -10,7 +10,7 @@ void danger(void) __attribute__((transaction_unsafe)); void wildthing() { /* All blocks should be propagated as irrevocable. */ - __transaction [[relaxed]] { + __transaction_relaxed { if (a) foo(); else diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-6.c b/gcc/testsuite/gcc.dg/tm/irrevocable-6.c index 6518bf03de6..2399131210b 100644 --- a/gcc/testsuite/gcc.dg/tm/irrevocable-6.c +++ b/gcc/testsuite/gcc.dg/tm/irrevocable-6.c @@ -10,7 +10,7 @@ void danger(void) __attribute__((transaction_unsafe)); void wildthing() { /* All blocks should be propagated as irrevocable. */ - __transaction [[relaxed]] { + __transaction_relaxed { if (eee) { if (a) foo(); diff --git a/gcc/testsuite/gcc.dg/tm/memopt-1.c b/gcc/testsuite/gcc.dg/tm/memopt-1.c index ebef0fef601..06d4f64a388 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-1.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-1.c @@ -8,7 +8,7 @@ int i; f() { - __transaction [[relaxed]] { + __transaction_relaxed { g = 666; george(); if (i == 9) diff --git a/gcc/testsuite/gcc.dg/tm/memopt-10.c b/gcc/testsuite/gcc.dg/tm/memopt-10.c index 0266646d0a4..5caa6b53d6b 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-10.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-10.c @@ -10,7 +10,7 @@ int f() p = malloc (sizeof (*p) * 100); - __transaction { + __transaction_atomic { /* p[5] is thread private, but not transaction local since the malloc is outside of the transaction. We can use the logging functions for this. */ diff --git a/gcc/testsuite/gcc.dg/tm/memopt-11.c b/gcc/testsuite/gcc.dg/tm/memopt-11.c index 316e0e186da..07972a4fd4e 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-11.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-11.c @@ -11,7 +11,7 @@ int f() p = malloc (sizeof (*p) * 100); foo(p[5]); - __transaction { + __transaction_atomic { /* p[5] is thread private, however the SSA_NAME that holds the address dominates the entire transaction (transaction invariant) so we can use a save/restore pair. */ diff --git a/gcc/testsuite/gcc.dg/tm/memopt-12.c b/gcc/testsuite/gcc.dg/tm/memopt-12.c index f37f9bb02bb..5520ecef27a 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-12.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-12.c @@ -11,7 +11,7 @@ int f() int *p1, *p2, *p3; p1 = malloc (sizeof (*p1)*5000); - __transaction { + __transaction_atomic { *p1 = 0; p2 = malloc (sizeof (*p2)*6000); diff --git a/gcc/testsuite/gcc.dg/tm/memopt-13.c b/gcc/testsuite/gcc.dg/tm/memopt-13.c index 9b7e5e5d153..6e93b7feaea 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-13.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-13.c @@ -7,7 +7,7 @@ extern struct large function (void) __attribute__((transaction_safe)); void f() { - __transaction { + __transaction_atomic { large_global = function(); } } diff --git a/gcc/testsuite/gcc.dg/tm/memopt-15.c b/gcc/testsuite/gcc.dg/tm/memopt-15.c index 00a6f053b1a..975c794337c 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-15.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-15.c @@ -15,7 +15,7 @@ vectype f() p = malloc (sizeof (*p) * 100); - __transaction { + __transaction_atomic { /* p[5] is thread private, but not transaction local since the malloc is outside of the transaction. We can use the logging functions for this. */ diff --git a/gcc/testsuite/gcc.dg/tm/memopt-2.c b/gcc/testsuite/gcc.dg/tm/memopt-2.c index be946a29e03..08aa9acdcbc 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-2.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-2.c @@ -5,7 +5,7 @@ char c; void f(void) { - __transaction { + __transaction_atomic { ++c; } } diff --git a/gcc/testsuite/gcc.dg/tm/memopt-3.c b/gcc/testsuite/gcc.dg/tm/memopt-3.c index a4d95ab0bb0..77337161c2c 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-3.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-3.c @@ -8,7 +8,7 @@ int f() { int i = readint(); struct large lala = { 0 }; - __transaction { + __transaction_atomic { lala.x[i] = 666; if (test()) __transaction_cancel; diff --git a/gcc/testsuite/gcc.dg/tm/memopt-4.c b/gcc/testsuite/gcc.dg/tm/memopt-4.c index c316eef2b3b..58f8fd042d6 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-4.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-4.c @@ -11,7 +11,7 @@ int f() { int i = readint(); struct large lala = bark(); - __transaction { + __transaction_atomic { lala.x[55] = 666; if (test()) __transaction_cancel; diff --git a/gcc/testsuite/gcc.dg/tm/memopt-5.c b/gcc/testsuite/gcc.dg/tm/memopt-5.c index a766af63246..53f7f12083c 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-5.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-5.c @@ -11,7 +11,7 @@ int f() { int i = readint(); struct large lala = bark(); - __transaction { + __transaction_atomic { lala.x[55] = 666; if (test()) __transaction_cancel; diff --git a/gcc/testsuite/gcc.dg/tm/memopt-6.c b/gcc/testsuite/gcc.dg/tm/memopt-6.c index 5bd0918c584..f4343736772 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-6.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-6.c @@ -10,7 +10,7 @@ int f() { int i = readint(); struct large lala = bark(); - __transaction { + __transaction_atomic { lala.x[55] = 666; lala = lacopy; /* Aggregate instrumentation. */ } diff --git a/gcc/testsuite/gcc.dg/tm/memopt-7.c b/gcc/testsuite/gcc.dg/tm/memopt-7.c index f282a63c5d6..d3a478bde1c 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-7.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-7.c @@ -11,7 +11,7 @@ int f() { struct large lala; struct large lacopy = foobie(); - __transaction { + __transaction_atomic { lala = lacopy; } return lala.x[asdf]; diff --git a/gcc/testsuite/gcc.dg/tm/memopt-8.c b/gcc/testsuite/gcc.dg/tm/memopt-8.c index dc752e6b98f..10320e78950 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-8.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-8.c @@ -9,7 +9,7 @@ int f() { int *p; - __transaction { + __transaction_atomic { p = malloc (sizeof (*p) * 100); escape (p); diff --git a/gcc/testsuite/gcc.dg/tm/memopt-9.c b/gcc/testsuite/gcc.dg/tm/memopt-9.c index 90692ff1ab3..0c34f20b926 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-9.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-9.c @@ -11,7 +11,7 @@ int f() int *p; struct large *lp; - __transaction { + __transaction_atomic { p = malloc (sizeof (*p) * 100); lp = malloc (sizeof (*lp) * 100); diff --git a/gcc/testsuite/gcc.dg/tm/memset-2.c b/gcc/testsuite/gcc.dg/tm/memset-2.c index 1b549018a78..743ada13783 100644 --- a/gcc/testsuite/gcc.dg/tm/memset-2.c +++ b/gcc/testsuite/gcc.dg/tm/memset-2.c @@ -7,7 +7,7 @@ void *memset(void *s, int c, __SIZE_TYPE__); int main() { - __transaction [[atomic]] { + __transaction_atomic { memset(array, 'b', sizeof(4)); } return 0; diff --git a/gcc/testsuite/gcc.dg/tm/memset.c b/gcc/testsuite/gcc.dg/tm/memset.c index 33d3ce5503c..59a1c40d651 100644 --- a/gcc/testsuite/gcc.dg/tm/memset.c +++ b/gcc/testsuite/gcc.dg/tm/memset.c @@ -15,7 +15,7 @@ void *my_memset() int main() { - __transaction [[atomic]] { + __transaction_atomic { my_memset(); } return 0; diff --git a/gcc/testsuite/gcc.dg/tm/nested-1.c b/gcc/testsuite/gcc.dg/tm/nested-1.c index 7e8ec9cef8d..cf500d1fc64 100644 --- a/gcc/testsuite/gcc.dg/tm/nested-1.c +++ b/gcc/testsuite/gcc.dg/tm/nested-1.c @@ -4,13 +4,13 @@ extern int foo(int) __attribute__((transaction_safe)); void bar(void) { - __transaction { + __transaction_atomic { if (foo(1)) - __transaction { + __transaction_atomic { if (foo(2)) - __transaction { + __transaction_atomic { if (foo(3)) - __transaction { + __transaction_atomic { if (foo(4)) foo(5); else diff --git a/gcc/testsuite/gcc.dg/tm/nested-2.c b/gcc/testsuite/gcc.dg/tm/nested-2.c index e7b81ffe0e4..205ca8d7eac 100644 --- a/gcc/testsuite/gcc.dg/tm/nested-2.c +++ b/gcc/testsuite/gcc.dg/tm/nested-2.c @@ -3,7 +3,7 @@ void foobar(void) { - __transaction { + __transaction_atomic { foobar(); } } @@ -13,7 +13,7 @@ void doit(void) __attribute__((transaction_safe)); __attribute__((transaction_callable)) void callable(void) { - __transaction { + __transaction_atomic { doit(); } } diff --git a/gcc/testsuite/gcc.dg/tm/opt-1.c b/gcc/testsuite/gcc.dg/tm/opt-1.c index ce18eb2b54e..87a8c72bd43 100644 --- a/gcc/testsuite/gcc.dg/tm/opt-1.c +++ b/gcc/testsuite/gcc.dg/tm/opt-1.c @@ -20,7 +20,7 @@ void *hello(void *arg) int tmp = p->id; int tmp3; printf ("Thread reads %d.\n", tmp); - __transaction + __transaction_atomic { int tmp2 = gvar; usleep ((int) (10.0*rand()/(10+1.0))/100); diff --git a/gcc/testsuite/gcc.dg/tm/opt-2.c b/gcc/testsuite/gcc.dg/tm/opt-2.c index 98bba140d06..d9e2b8a6db0 100644 --- a/gcc/testsuite/gcc.dg/tm/opt-2.c +++ b/gcc/testsuite/gcc.dg/tm/opt-2.c @@ -5,7 +5,7 @@ int foo(int *arr, int v) { int r = 0; int i; - __transaction { + __transaction_atomic { for (i = 0; i < 10; ++i) if (arr[i] < 27) r += arr[i] += v; diff --git a/gcc/testsuite/gcc.dg/tm/pr45985.c b/gcc/testsuite/gcc.dg/tm/pr45985.c index decd26829ca..c8118406776 100644 --- a/gcc/testsuite/gcc.dg/tm/pr45985.c +++ b/gcc/testsuite/gcc.dg/tm/pr45985.c @@ -7,7 +7,7 @@ void illegal(); static int a = 0; void func() { - __transaction [[relaxed]] { + __transaction_relaxed { if( a == 0) illegal(); } diff --git a/gcc/testsuite/gcc.dg/tm/pr46654.c b/gcc/testsuite/gcc.dg/tm/pr46654.c index 57929b7ecd5..bb63b685844 100644 --- a/gcc/testsuite/gcc.dg/tm/pr46654.c +++ b/gcc/testsuite/gcc.dg/tm/pr46654.c @@ -6,7 +6,7 @@ extern void baz(int); int y; void foo(volatile int x) { - __transaction { + __transaction_atomic { x = 5; /* { dg-error "invalid volatile use of 'x' inside transaction" } */ x += y; y++; @@ -19,7 +19,7 @@ volatile int i = 0; void george() { - __transaction [[atomic]] { + __transaction_atomic { if (i == 2) /* { dg-error "invalid volatile use of 'i' inside transaction" } */ i = 1; } diff --git a/gcc/testsuite/gcc.dg/tm/pr47690.c b/gcc/testsuite/gcc.dg/tm/pr47690.c index ffb07980f3e..d18e2e11fb8 100644 --- a/gcc/testsuite/gcc.dg/tm/pr47690.c +++ b/gcc/testsuite/gcc.dg/tm/pr47690.c @@ -5,7 +5,7 @@ int george; void q1() { - __transaction [[atomic]] { + __transaction_atomic { george=999; } q1(); diff --git a/gcc/testsuite/gcc.dg/tm/pr47905.c b/gcc/testsuite/gcc.dg/tm/pr47905.c index fac82db2847..362ed487bb6 100644 --- a/gcc/testsuite/gcc.dg/tm/pr47905.c +++ b/gcc/testsuite/gcc.dg/tm/pr47905.c @@ -6,7 +6,7 @@ void funcB(); void *thread() { - __transaction [[relaxed]] + __transaction_relaxed { funcA(); }; diff --git a/gcc/testsuite/gcc.dg/tm/props-1.c b/gcc/testsuite/gcc.dg/tm/props-1.c index 73cb9cca704..89690240486 100644 --- a/gcc/testsuite/gcc.dg/tm/props-1.c +++ b/gcc/testsuite/gcc.dg/tm/props-1.c @@ -5,7 +5,7 @@ int global; foo(int local) { - __transaction { + __transaction_atomic { local++; if (++global == 10) __transaction_cancel; diff --git a/gcc/testsuite/gcc.dg/tm/props-2.c b/gcc/testsuite/gcc.dg/tm/props-2.c index d85e7842d64..9c97e3b83e7 100644 --- a/gcc/testsuite/gcc.dg/tm/props-2.c +++ b/gcc/testsuite/gcc.dg/tm/props-2.c @@ -9,7 +9,7 @@ int george; extern crap() __attribute__((transaction_unsafe)); foo(){ - __transaction [[relaxed]] { + __transaction_relaxed { global++; crap(); george++; diff --git a/gcc/testsuite/gcc.dg/tm/props-3.c b/gcc/testsuite/gcc.dg/tm/props-3.c index 189dd372109..48f2230cdd2 100644 --- a/gcc/testsuite/gcc.dg/tm/props-3.c +++ b/gcc/testsuite/gcc.dg/tm/props-3.c @@ -6,7 +6,7 @@ void (*indirect)(void); foo(){ - __transaction [[relaxed]] { + __transaction_relaxed { (*indirect)(); } } diff --git a/gcc/testsuite/gcc.dg/tm/unsafe.c b/gcc/testsuite/gcc.dg/tm/unsafe.c index b27e73b4dba..824368a1a34 100644 --- a/gcc/testsuite/gcc.dg/tm/unsafe.c +++ b/gcc/testsuite/gcc.dg/tm/unsafe.c @@ -9,5 +9,5 @@ static int func () int main() { - __transaction { return func(); } /* { dg-error "unsafe function call .func. " } */ + __transaction_atomic { return func(); } /* { dg-error "unsafe function call .func. " } */ } diff --git a/gcc/testsuite/gcc.dg/tm/wrap-3.c b/gcc/testsuite/gcc.dg/tm/wrap-3.c index e8d265015da..8be40406b51 100644 --- a/gcc/testsuite/gcc.dg/tm/wrap-3.c +++ b/gcc/testsuite/gcc.dg/tm/wrap-3.c @@ -7,7 +7,7 @@ void *p; void foo() { - __transaction [[relaxed]] { free (p); } + __transaction_relaxed { free (p); } } /* { dg-final { scan-tree-dump-times "free" 0 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tm/wrap-4.c b/gcc/testsuite/gcc.dg/tm/wrap-4.c index 9346366c28a..9e1e70c544f 100644 --- a/gcc/testsuite/gcc.dg/tm/wrap-4.c +++ b/gcc/testsuite/gcc.dg/tm/wrap-4.c @@ -8,7 +8,7 @@ static void tootsie_roll () { bark(); } void foo() { - __transaction [[relaxed]] { candy(); } + __transaction_relaxed { candy(); } } /* { dg-final { scan-tree-dump-times "candy" 0 "optimized" } } */ |