Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.dg / uninit-1.c
blob060ec250ba7494ee7e90bab3724c3be3182edf7b
1 /* Spurious uninitialized variable warnings, case 1.
2 Taken from cppfiles.c (merge_include_chains) */
3 /* { dg-do compile } */
4 /* { dg-options "-O -Wuninitialized" } */
6 struct list
8 struct list *next;
9 int id;
12 extern void free (void *);
14 void remove_dupes (struct list *el)
16 struct list *p, *q, *r; /* { dg-bogus "r" "uninitialized variable warning" } */
18 for (p = el; p; p = p->next)
20 for (q = el; q != p; q = q->next)
21 if (q->id == p->id)
23 r->next = p->next;
24 free (p);
25 p = r;
26 break;
28 r = p;