libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr21559.c
blob83b7c802e358894498e5915edaae2f386ac4fd05
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-evrp-details" } */
4 static int blocksize = 4096;
6 int bar (int);
8 void foo (void)
10 int toread;
11 int bytes;
12 __attribute__ ((used))
13 static char eof_reached = 0;
15 toread = blocksize;
16 bytes = 1;
18 while (toread != 0)
20 bytes = bar (toread);
21 if (bytes <= 0)
23 if (bytes < 0)
24 continue;
25 break;
27 toread -= bytes;
30 if (bytes == 0)
31 eof_reached = 1;
35 /* First, we should simplify the bits < 0 test within the loop. */
36 /* { dg-final { scan-tree-dump-times "Simplified relational" 1 "evrp" } } */