PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr59924.c
blob1d8d52fb0796e39718b39747f8ef6fc59880112a
1 /* PR tree-optimization/59924 */
2 /* { dg-do compile } */
3 /* { dg-options "-O1 -Wall" } */
5 struct S { struct T *a; double b; struct S *c; };
6 struct T { struct S *d; };
7 extern void bar (double);
9 void
10 foo (struct S * x, int y, int z, int w)
12 int e;
13 struct S *f;
14 for (f = x->a->d; f; f = f->c)
16 if (5 < w)
18 e = -w;
19 z = w;
22 if (y != 0 || z != 0)
24 double g = x->b + (double) e * (double) y; /* { dg-warning "may be used uninitialized in this function" } */
25 bar (g * g);