[Bug fortran/41807] [4.5, 4.4 Regression] data statement with nested type constructors
pault at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Oct 24 09:38:00 GMT 2009
------- Comment #2 from pault at gcc dot gnu dot org 2009-10-24 09:38 -------
A reduced testcase
module w
real, parameter :: zero = 0.0
type, public :: multpol
real :: coor(3)
end type multpol
integer, public, parameter :: n_nuc=2
type(multpol), public :: dft_water_nuc(n_nuc)
real, parameter :: C_i =zero
real, parameter :: A_i =zero
!coordinates of multipole centers
real, parameter :: mcoor1(3)=(/ zero, zero, -0.119151/)
real, parameter :: mcoor2(3)=(/-1.431042, zero, 0.945510/)
integer :: i
!----------------------------------------------------------------
data(dft_water_nuc(i), i=1,n_nuc) /multpol( mcoor1), multpol( mcoor2)/
end module w
A single element in the data statement or...
data dft_water_nuc(1),dft_water_nuc(2) /multpol( mcoor1), multpol( mcoor2)/
clears the problem. There is something wrong with the loop variable that is
screwing up data.c(get_array_index) but I cannot see what it is right now.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41807
More information about the Gcc-bugs
mailing list