This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71196] f951: internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:149
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 May 2016 15:53:10 +0000
- Subject: [Bug fortran/71196] f951: internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:149
- Auto-submitted: auto-generated
- References: <bug-71196-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71196
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-05-19
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to georg.bugzilla from comment #0)
> module ice
>
> type substructure_
> integer :: id
> character(16) :: value
> end type substructure_
>
> type structure_
> type(substructure_) :: element
> end type structure_
>
> type(structure_) :: structure
>
> DATA structure%element%id / 1 /
> DATA structure%element%value / "test" /
>
> end module ice
As a workaround you can invert the order of components
in substructure_, so try
type substructure_
character(16) :: value
integer :: id
end type substructure_
Another workaround would be to use a structure constructor
in the DATA statement. With you original example, you can
do
DATA structure%element / substructure_(1,"test") /
Yet, another workaround would be use of explicit initialization
in the declaration, but it's a little ugly
type(structure_) :: structure = structure_(substructure_(1,"test"))