This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55887] [OOP][F2008] ICE with CLASS and data-target pointer association in (default) initialization
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Jan 2013 21:10:15 +0000
- Subject: [Bug fortran/55887] [OOP][F2008] ICE with CLASS and data-target pointer association in (default) initialization
- Auto-submitted: auto-generated
- References: <bug-55887-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55887
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-26
CC| |janus at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from janus at gcc dot gnu.org 2013-01-26 21:10:15 UTC ---
The type(t) version ...
type t
end type t
type(t), target :: x
type(t), pointer :: ptr2 => x
if (.not. same_type_as (ptr2, x)) call abort()
end
... is rejected by 4.7 with (note the wrong locus):
type t
1
Error: Pointer initialization target at (1) must have the SAVE attribute
but trunk gives yet another ICE:
internal compiler error: in symtab_get_node, at symtab.c:277
I think the error message of 4.7 is not triggered on trunk, because 'x' gets
the SAVE_IMPLICIT attribute. The ICE goes away when giving 'x' the SAVE
attribute explicitly.