2 ! { dg-options "-ffrontend-optimize -fdump-tree-original" }
3 ! PR 50564 - this used to ICE with front end optimization.
4 ! Original test case by Andrew Benson.
7 double precision, dimension(2) :: timeSteps
, control
9 double precision :: ratio
13 control(1) = ratio
**(dble(1)-0.5d0)-ratio
**(dble(1)-1.5d0)
14 control(2) = ratio
**(dble(2)-0.5d0)-ratio
**(dble(2)-1.5d0)
16 timeSteps(iTime
)=ratio
**(dble(iTime
)-0.5d0)-ratio
**(dble(iTime
)-1.5d0)
18 if (any(abs(timesteps
- control
) > 1d-10)) STOP 1
20 ! Make sure we still do the front-end optimization after a forall
21 a
= cos(ratio
)*cos(ratio
) + sin(ratio
)*sin(ratio
)
22 if (abs(a
-1.d0
) > 1d-10) STOP 2
24 ! { dg-final { scan-tree-dump-times "__builtin_cos" 1 "original" } }
25 ! { dg-final { scan-tree-dump-times "__builtin_sin" 1 "original" } }