]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr62167-run.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr62167-run.c
CommitLineData
8024d4b6
TV
1/* { dg-do run } */
2/* { dg-options "-O2 -ftree-tail-merge" } */
3
4struct node
5{
6 struct node *next;
7 struct node *prev;
8};
9
10struct node node;
11
12struct head
13{
14 struct node *first;
15};
16
17struct head heads[5];
18
19int k = 2;
20
21struct head *head = &heads[2];
22
23int
24main ()
25{
26 struct node *p;
27
28 node.next = (void*)0;
29
30 node.prev = (void *)head;
31
32 head->first = &node;
33
34 struct node *n = head->first;
35
36 struct head *h = &heads[k];
37
38 heads[2].first = n->next;
39
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;
45
46 return !(p == (void*)0);
47}