pretty-print.h (pp_base): Remove.
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / pub-safety-1.c
blob660e9a6276730bd60cd3ba2e472aa39b79daaa8c
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O1 -fdump-tree-lim1" } */
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 "lim1" } } */
24 /* { dg-final { cleanup-tree-dump "lim1" } } */