This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41807] [4.5, 4.4 Regression] data statement with nested type constructors
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2009 09:38:28 -0000
- Subject: [Bug fortran/41807] [4.5, 4.4 Regression] data statement with nested type constructors
- References: <bug-41807-10374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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