2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / reassoc_3.f90
blobac2f6aacf0820a4a6120d0c6832773bea748c7a6
1 ! { dg-do compile }
2 ! { dg-options "-O -ffast-math -fdump-tree-original -fdump-tree-optimized" }
4 ! Verify we associate properly during folding
5 ! Verify we propagate constants in the presence of PAREN_EXPR
7 function test(a)
8 real b, c, d
9 c = a
10 d = 5
11 b = (c + 5 - c)
12 b = (c + d - c)
13 test = a + b - 5
14 end
16 ! { dg-final { scan-tree-dump "b = 5" "original" } }
17 ! { dg-final { scan-tree-dump-times " = " 1 "optimized" } }