------- Comment #3 from fxcoudert at gcc dot gnu dot org  2008-04-23 18:27 
-------
> BTW: The testcase  doesn't fail for x86_64-linux. Can you please regression
> test the patch (and write a testcase ;) on *-mingw target?

I'm not set up for regtesting on x86_64-mingw32 (nor on 32-bit mingw32, in any
case), but I checked that your patch does fix both the reduced and the original
testcase (sent to me by private mail). I propose to add the following
testcases:

$ cat z1.f90 
! { dg-do compile }
!
subroutine test4
  integer, parameter :: wp = 4
  complex(wp), parameter :: i = (0._wp, 1._wp)
  complex(wp) :: c(12)
  integer :: m, N

  N = 12
  c = (/(exp(i*m),m=1,N)/)
  print *, c(1)
end

subroutine test8
  integer, parameter :: wp = 8
  complex(wp), parameter :: i = (0._wp, 1._wp)
  complex(wp) :: c(12)
  integer :: m, N

  N = 12
  c = (/(exp(i*m),m=1,N)/)
  print *, c(1)
end

$ cat z2.f90 
! { dg-do compile }
! { dg-require-effective-target fortran_large_real }
!
subroutine test_large
  integer, parameter :: wp = selected_real_kind (precision (0.0_8) + 1)
  complex(wp), parameter :: i = (0._wp, 1._wp)
  complex(wp) :: c(12)
  integer :: m, N

  N = 12
  c = (/(exp(i*m),m=1,N)/)
  print *, c(1)
end


 (I think covering all real types is a good idea, in that case.)


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36006

Reply via email to