blob: 59d3a9666623174769095fbeaf66a74e83df208a (
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
30
31
32
33
34
|
/* { dg-do compile } */
/* { dg-options "-std=gnu17 -O3 -fdump-tree-optimized" } */
static int c, d, e, f;
static short g;
static int *h = &c;
void foo(void);
short(a)();
static unsigned b(unsigned char j, int l) { return j > l ? j : j << l; }
static int *i();
static void k(int j, unsigned char l) {
i();
g = f;
f = g;
for (; g;) {
int m = 0;
d = a();
for (; d;) {
if (l)
if (!(j >= -639457069 && j <= -639457069))
if (m)
foo(); // This call should be elided
m = !(10 != (l ^ b(j, 6))) & (0 > e);
}
}
}
static int *i() {
for (; e; e = a(e, 6))
;
return h;
}
int main() { k(c, c); }
/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */
|