libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tm / reg-promotion.c
blob47400efd90f0fbd824b04b8fac56fbba10bac9ce
1 /* { dg-do compile } */
2 /* { dg-options "-fgnu-tm -O2 -fdump-tree-lim2" } */
4 /* Test that `count' is not written to unless p->data>0. */
6 int count;
8 struct obj {
9 int data;
10 struct obj *next;
11 } *q;
13 void func()
15 struct obj *p;
16 __transaction_atomic {
17 for (p = q; p; p = p->next)
18 if (p->data > 0)
19 count++;
23 /* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim2" } } */