This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29539] ICE in variable_decl
- 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: 23 Oct 2006 09:49:50 -0000
- Subject: [Bug fortran/29539] ICE in variable_decl
- References: <bug-29539-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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