2 ! { dg-options "-ffrontend-optimize" }
3 ! PR fortran/88073 - this used to ICE with front-end optimization
4 ! Original test case by 'mecej4'
5 Subroutine tfu (n
, x
, f
)
7 Integer, Parameter :: double = Kind (0.d0
)
8 Integer, Intent (In
) :: n
9 Real (double), Intent (Out
) :: f
10 Real (double), Intent (In
) :: x (n
)
12 Logical, Dimension(n
) :: l1v
, l2v
, l3v
16 l1v
= (/ (j
, j
=1, n
) /) == 1
18 l2v
= (/ (j
, j
=1, n
) /) == n
23 f
= sum (x(1:n
), mask
=l3v
)