PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-20.c
blob12001aee9937e4ac4ebce75425ada030d6241575
1 /* Spurious uninitialized variable warnings, from gdb */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wuninitialized" } */
4 struct os { struct o *o; };
5 struct o { struct o *next; struct os *se; };
6 void f(struct o *o){
7 struct os *s;
8 if(o) s = o->se;
9 while(o && s == o->se){
10 s++; // here `o' is non-zero and thus s is initialized
11 s == o->se // `?' is essential, `if' does not trigger the warning
12 ? (o = o->next, o ? s = o->se : 0)
13 : 0;