blob: ab16a44b949f4a940e61e27ecbb5244e5bf38c58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
! { dg-do run }
! { dg-skip-if "" { *-*-* } { "-O0" } { "" } }
! { dg-additional-options "-ffrontend-optimize -floop-nest-optimize" }
! PR 56872 - wrong front-end optimization with a single constructor.
! Original bug report by Rich Townsend.
integer :: k
real :: s
integer :: m
s = 2.0
m = 4
res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
if (abs(res - 5.84732246) > 1e-6) call abort
end
|