Add qdf24xx base tuning support.
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / pub-safety-1.c
blob59fb43e6edd689dc17d48cf30adce84e2e159db0
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O1 -fdump-tree-lim2" } */
4 /* Test that thread visible loads do not get hoisted out of loops if
5 the load would not have occurred on each path out of the loop. */
7 int x[10] = {0,0,0,0,0,0,0,0,0,0};
8 int DATA_DATA = 0;
10 void reader()
12 int i;
13 __transaction_atomic
15 for (i = 0; i < 10; i++)
16 if (x[i])
17 x[i] += DATA_DATA;
18 /* If we loaded DATA_DATA here, we could hoist it before the loop,
19 but since we don't... we can't. */
23 /* { dg-final { scan-tree-dump-times "Cannot hoist.*DATA_DATA because it is in a transaction" 1 "lim2" } } */