blob: 40b41803555b84cbdbf365c30ef29d34434ade91 (
plain)
1
2
3
4
5
6
7
8
9
10
|
// 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" }
}
|