2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr77454.c
blob1bb41c2b17628c67fa477a40f072064d9d46e5a0
1 /* PR tree-optimization/77454 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 void
6 foo (unsigned char x, char y)
8 while (x != 0)
10 unsigned char *a = &x;
11 int b;
13 if (y != 0)
14 a = (unsigned char *) &y;
15 else if (y + 1 != 0)
16 a = (unsigned char *) &y;
17 for (x = 0; x < 1; ++x)
18 b = 0;
19 for (y = 0; y < 3; ++y)
21 y = !!y;
22 if (y != 0)
23 x = y;
25 if ((b != 0 ? -1 : *a) < (y = b))
26 b = 1;