libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / vrp-loop-1.c
blob09de8924308d392f3a488c01a114f5ca9e5bb174
1 /* { dg-do compile } */
2 /* { dg-options "-Os -fdump-tree-optimized" } */
3 /* PR tree-optimization/110768 */
4 /* The call to foo should be able to removed,
5 The branch to unreachable is unreachable as
6 VRP (ranger) figure out that c there can only
7 be -20409 or 0. before r14-5109-ga291237b628f41
8 ranger could not figure that out. */
11 void foo(void);
12 static int a, b;
13 int main() {
15 short c = 45127;
16 signed char d;
17 b = 0;
18 for (; b <= 3; b++) {
19 if (b) continue;
20 d = 0;
21 for (; d <= 100; d++) {
22 if (!(((c) >= -20409) && ((c) <= 1))) {
23 __builtin_unreachable();
25 if (~(0 == a) & 1) return b;
26 c = 0;
27 for (; c <= 0; c++) a = 3;
30 foo();
34 /* { dg-final { scan-tree-dump-not "foo " "optimized" } } */