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/29539] ICE in variable_decl



------- Comment #1 from pault at gcc dot gnu dot org  2006-10-23 09:49 -------
Created an attachment (id=12478)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12478&action=view)
Provisional fix for the PR

This not only fixes the PR but the modification to trans-types allows a data
statement to include components of the derived type:

! { dg-compile }
! { dg-options "-W -Wall" }

block data
  common /c/ d(5), cc
  type c_t
    sequence
    integer i
  end type c_t
  type (c_t) :: cc
  data d /5*1./
  data cc%i /5/
end

  common /c/ d(5), cc
  type c_t
    sequence
    integer i
  end type c_t
  type (c_t) :: cc
  print *, d
  print *, cc
end

Works correctly.  Putting the data statement before the derived type
declaration produces a syntax error; Lahey warns that the derived type
declaration will have to be confirmed. I will see if it can be fixed easily; if
not I'll throw an error, which says what to do; eg. "the derived type is used
before it is defined."

Paul 


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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