Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / pr46654.c
blob563474eaf686ec8b2b187dfd49d5aecfda9f1400
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm" } */
4 extern void baz(int);
6 int y;
7 void foo(volatile int x)
9 __transaction_atomic {
10 x = 5; /* { dg-error "invalid use of volatile lvalue inside transaction" } */
11 x += y;
12 y++;
14 baz(x);
18 volatile int i = 0;
20 void george()
22 __transaction_atomic {
23 if (i == 2) /* { dg-error "invalid use of volatile lvalue inside transaction" } */
24 i = 1;