Debian Codegraph @

gcc/testsuite/gfortran.dg/array_constructor_45.f90

raw
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
9
10 m = 2
11 s = 1000.
12
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