blob: 44b1ba5c687e403fd4bb20608cc13b2c29134e15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* PR tree-optimization/110841 */
/* The call to foo should be able to removed */
void foo(void);
static int b, c, d;
static signed char(a)(signed char e, signed char f) { return e - f; }
int main() {
for (; b <= 4; b++)
;
c = 0;
for (; c >= -16; c = a(c, 4))
;
signed char g = b;
for (; d <= 0; d++) {
if (!(((g) >= 5) && ((g) <= 5))) {
__builtin_unreachable();
}
if (c) return 0;
g = 0;
for (;;) {
foo();
break;
}
}
}
/* { dg-final { scan-tree-dump-not "foo " "optimized" } } */
|