This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41807] [4.5, 4.4 Regression] data statement with nested type constructors



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]