OSDN Git Service

Latest updates from FSF 4.7 branch
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr52558-1.c
1 /* { dg-do compile } */
2 /* { dg-options "--param allow-store-data-races=0 -O2 -fdump-tree-lim1" } */
3
4 /* Test that `count' is not written to unless p->data > 0.  */
5
6 int count;
7
8 struct obj {
9     int data;
10     struct obj *next;
11 } *q;
12
13 void func()
14 {
15   struct obj *p;
16   for (p = q; p; p = p->next)
17     if (p->data > 0)
18       count++;
19 }
20
21 /* { dg-final { cleanup-tree-dump "lim1" } } */