2015-07-03 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / power_6.f90
blob7d3a1f412f38038054a52574cb87e08ebd36f1e8
1 ! { dg-do compile }
2 ! { dg-options "-O1 -fdump-tree-optimized" }
4 ! PR middle-end/57073
5 ! See also PR 57073
7 real function f(k)
8 integer, value :: k
9 f = (-1.0)**k
10 end
12 ! { dg-final { scan-tree-dump-not "__builtin_powif" "optimized" } }
13 ! { dg-final { scan-tree-dump "powi_cond_\[0-9\] = k_\[0-9\]\\(D\\) & 1;" "optimized" } }
14 ! { dg-final { scan-tree-dump "powi_\[0-9\] = powi_cond_\[0-9\] \\? -1.0e\\+0 : 1.0e\\+0;" "optimized" } }