blob: 40b41803555b84cbdbf365c30ef29d34434ade91 [file] [log] [blame]
// Transaction-unsafe testcase from TM TS.
// { dg-options -fgnu-tm }
volatile int * p = 0;
__attribute ((transaction_safe))
void f() {
int x = 0; // ok: not volatile
p = &x; // ok: the pointer is not volatile
int i = *p; // { dg-error "volatile" "read through volatile glvalue" }
}