Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / pr62004.c
blobc994a411b3b2c3edc00501dbabf729655d5663e9
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fno-tree-tail-merge" } */
4 struct node
6 struct node *next;
7 struct node *prev;
8 };
10 struct node node;
12 struct head
14 struct node *first;
17 struct head heads[5];
19 int k = 2;
21 struct head *head = &heads[2];
23 int
24 main ()
26 struct node *p;
28 node.next = (void*)0;
30 node.prev = (void *)head;
32 head->first = &node;
34 struct node *n = head->first;
36 struct head *h = &heads[k];
38 heads[2].first = n->next;
40 if ((void*)n->prev == (void *)h)
41 p = h->first;
42 else
43 /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
44 p = n->prev->next;
46 return !(p == (void*)0);