Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tm/pr46654.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-fgnu-tm" } */ | |
3 | |
4 extern void baz(int); | |
5 | |
6 int y; | |
7 void foo(volatile int x) | |
8 { | |
9 __transaction_atomic { | |
10 x = 5; /* { dg-error "invalid use of volatile lvalue inside transaction" } */ | |
11 x += y; | |
12 y++; | |
13 } | |
14 baz(x); | |
15 } | |
16 | |
17 | |
18 volatile int i = 0; | |
19 | |
20 void george() | |
21 { | |
22 __transaction_atomic { | |
23 if (i == 2) /* { dg-error "invalid use of volatile lvalue inside transaction" } */ | |
24 i = 1; | |
25 } | |
26 } |