aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/array_constructor_44.f90
blob: e0cffd168beb37ed16130fd4f9ac8ce800ae44b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do run }
! { dg-options "-ffrontend-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