diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c new file mode 100644 index 00000000000..1c1527f1350 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c @@ -0,0 +1,17 @@ +/* PR tree-optimization/58011 */ +/* { dg-do compile } */ +/* { dg-options "-O1" } */ +int a, b; + +void f(unsigned p) +{ + unsigned *pp = &p; + + if(!a) + p = 0; + + for(b = 0; b < 1; b++) + if(3 * p + 5 * *pp) + a = 0; +} + |