PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_constructor_45.f90
blob34d1b06d5d4550f7f97e74e98eadf3afe12af27f
1 ! { dg-do run }
2 ! PR PR 56872 - wrong front-end optimization with a
3 ! single array constructor and another value.
4 program main
5 real :: s
6 integer :: m
7 integer :: k
8 real :: res
10 m = 2
11 s = 1000.
13 res = SUM([3.0,(s**(REAL(k-1)/REAL(m-1)),k=1,m),17.])
14 if (abs(res - 1021.)>1e-4) STOP 1
15 end