2 ! { dg-options "-ffrontend-optimize -fdump-tree-original" }
3 ! Test that reduction optimization doesn't break with a function expression
4 ! in an array constructor.
7 integer, parameter :: dp
=selected_real_kind(15)
8 real(kind
=dp
), dimension(2,2) :: a
11 data a
/2._dp
,3._dp
,5._dp
,7._dp
/
13 if (abs (product([[sum([eleven_ones()]), thirteen
], a
]) - 30030._dp
) > 1e-8) call abort
15 function eleven_ones()
16 real(kind
=dp
) :: eleven_ones(11)
19 eleven_ones
= [ (1._dp
, i
=1,11) ]
20 end function eleven_ones
22 ! { dg-final { scan-tree-dump-times "while" 4 "original" } }