diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr102880.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr102880.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c new file mode 100644 index 0000000..0306dee --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102880.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +void foo(void); + +static int b, c, d, e, f, ah; +static short g, ai, am, aq, as; +static char an, at, av, ax, ay; +static char a(char h, char i) { return i == 0 || h && i == 1 ? 0 : h % i; } +static void ae(int h) { + if (a(b, h)) + foo(); + +} +int main() { + ae(1); + ay = a(0, ay); + ax = a(g, aq); + at = a(0, as); + av = a(c, 1); + an = a(am, f); + int al = e || ((a(1, ah) && b) & d) == 2; + ai = al; +} + +/* We should eliminate the call to foo. */ +/* { dg-final { scan-tree-dump-not "foo" "optimized" } } */ |