Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr59924.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR tree-optimization/59924 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-O1 -Wall" } */ | |
4 | |
5 struct S { struct T *a; double b; struct S *c; }; | |
6 struct T { struct S *d; }; | |
7 extern void bar (double); | |
8 | |
9 void | |
10 foo (struct S * x, int y, int z, int w) | |
11 { | |
12 int e; | |
13 struct S *f; | |
14 for (f = x->a->d; f; f = f->c) | |
15 { | |
16 if (5 < w) | |
17 { | |
18 e = -w; | |
19 z = w; | |
20 } | |
21 } | |
22 if (y != 0 || z != 0) | |
23 { | |
24 double g = x->b + (double) e * (double) y; /* { dg-warning "may be used uninitialized in this function" } */ | |
25 bar (g * g); | |
26 } | |
27 } |