public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41807]  New: [Reg]  data statement with nested type constructors
@ 2009-10-23 12:27 pault at gcc dot gnu dot org
  2009-10-23 12:46 ` [Bug fortran/41807] " dominiq at lps dot ens dot fr
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-10-23 12:27 UTC (permalink / raw)
  To: gcc-bugs

Reported on clf
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/650b2eeeb8d76213#

w.f90:53.20:

  data(dft_water_nuc(i), i=1,n_nuc) /
&
                    1
Error: non-constant array in DATA statement (1) 

These seems to be variable - I can confirm it but others say that they do not
see it.

Source:
=============== w.f90 =================
module w

  implicit none
  save
  private

  real, parameter :: zero = 0.0

  type, public :: charge
     real :: q
     real :: C
     real :: A
  end type charge

  type, public :: multpol
     character*12  :: name
     real :: coor(3)  !!! COMMENT THIS TO MAKE IT COMPILE !!!
     real :: mass
     type(charge)  :: z
  end type multpol

  integer, public, parameter :: n_nuc=3

  type(multpol),      public :: dft_water_nuc(n_nuc)

  real, parameter :: C_i        =zero
  real, parameter :: A_i        =zero

  !names of multipole
  character*12, parameter :: mname1="O1          "
  character*12, parameter :: mname2="H2          "
  character*12, parameter :: mname3="H3          "

  !coordinates of multipole centers
  real, parameter :: mcoor1(3)=(/ zero,     zero, -0.119151/)
  real, parameter :: mcoor2(3)=(/-1.431042, zero,  0.945510/)
  real, parameter :: mcoor3(3)=(/ 1.431042, zero,  0.945510/)

  !mass
  real, parameter :: mass1=15.99491
  real, parameter :: mass2=1.007825
  real, parameter :: mass3=1.007825

  !charges
  real, parameter :: Zn1=8.0
  real, parameter :: Zn2=1.0
  real, parameter :: Zn3=1.0

  integer :: i

  !----------------------------------------------------------------
  data(dft_water_nuc(i), i=1,n_nuc) /
&
                                multpol
(                               &
                                        mname1, &
                                        mcoor1, &  !!! COMMENT THIS TO
MAKE IT COMPILE !!!
                                        mass1,           &
                                        charge(Zn1,C_i,A_i)
&
                                       ),
&
                                multpol
(                               &
                                        mname2, &
                                        mcoor2, &  !!! COMMENT THIS TO
MAKE IT COMPILE !!!
                                        mass2,           &
                                        charge(Zn2,C_i,A_i)
&
                                       ),
&
                                multpol
(                               &
                                        mname3, &
                                        mcoor3, &  !!! COMMENT THIS TO
MAKE IT COMPILE !!!
                                        mass3,           &
                                        charge(Zn3,C_i,A_i)
&
                                       )
&
                                /

end module w


-- 
           Summary: [Reg]  data statement with nested type constructors
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pault at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2009-11-27  8:32 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-23 12:27 [Bug fortran/41807] New: [Reg] data statement with nested type constructors pault at gcc dot gnu dot org
2009-10-23 12:46 ` [Bug fortran/41807] " dominiq at lps dot ens dot fr
2009-10-24  7:46 ` [Bug fortran/41807] [4.5, 4.4 Regression] " pault at gcc dot gnu dot org
2009-10-24  9:38 ` pault at gcc dot gnu dot org
2009-10-24 11:51 ` [Bug fortran/41807] [4.5/4.4 " rguenth at gcc dot gnu dot org
2009-11-06 14:07 ` burnus at gcc dot gnu dot org
2009-11-06 15:02 ` dominiq at lps dot ens dot fr
2009-11-06 16:12 ` jvdelisle at gcc dot gnu dot org
2009-11-11  5:21 ` jvdelisle at gcc dot gnu dot org
2009-11-14 18:35 ` jvdelisle at gcc dot gnu dot org
2009-11-14 19:30 ` kargl at gcc dot gnu dot org
2009-11-14 19:32 ` kargl at gcc dot gnu dot org
2009-11-14 21:24 ` jvdelisle at gcc dot gnu dot org
2009-11-15 18:38 ` kargl at gcc dot gnu dot org
2009-11-15 19:05 ` jvdelisle at gcc dot gnu dot org
2009-11-15 19:26 ` sgk at troutmask dot apl dot washington dot edu
2009-11-17  4:18 ` jvdelisle at gcc dot gnu dot org
2009-11-17  4:30 ` jvdelisle at gcc dot gnu dot org
2009-11-17  5:35 ` jvdelisle at gcc dot gnu dot org
2009-11-17  6:03 ` sgk at troutmask dot apl dot washington dot edu
2009-11-21 22:15 ` jvdelisle at gcc dot gnu dot org
2009-11-22  2:05 ` jvdelisle at gcc dot gnu dot org
2009-11-22  2:06 ` jvdelisle at gcc dot gnu dot org
2009-11-22  2:10 ` jvdelisle at gcc dot gnu dot org
2009-11-25  2:38 ` jvdelisle at gcc dot gnu dot org
2009-11-25  2:45 ` jvdelisle at gcc dot gnu dot org
2009-11-25  3:34 ` jvdelisle at gcc dot gnu dot org
2009-11-26  1:08 ` jvdelisle at gcc dot gnu dot org
2009-11-26  2:12 ` jvdelisle at gcc dot gnu dot org
2009-11-26 21:53 ` jvdelisle at gcc dot gnu dot org
2009-11-26 21:57 ` jvdelisle at gcc dot gnu dot org
2009-11-26 22:19 ` jvdelisle at gcc dot gnu dot org
2009-11-26 22:21 ` jvdelisle at gcc dot gnu dot org
2009-11-27  8:32 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).