annotate gcc/testsuite/gcc.dg/pr59924.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR tree-optimization/59924 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-O1 -Wall" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 struct S { struct T *a; double b; struct S *c; };
kono
parents:
diff changeset
6 struct T { struct S *d; };
kono
parents:
diff changeset
7 extern void bar (double);
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 void
kono
parents:
diff changeset
10 foo (struct S * x, int y, int z, int w)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 int e;
kono
parents:
diff changeset
13 struct S *f;
kono
parents:
diff changeset
14 for (f = x->a->d; f; f = f->c)
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 if (5 < w)
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 e = -w;
kono
parents:
diff changeset
19 z = w;
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22 if (y != 0 || z != 0)
kono
parents:
diff changeset
23 {
kono
parents:
diff changeset
24 double g = x->b + (double) e * (double) y; /* { dg-warning "may be used uninitialized in this function" } */
kono
parents:
diff changeset
25 bar (g * g);
kono
parents:
diff changeset
26 }
kono
parents:
diff changeset
27 }