This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51754] [OOP] ICE on valid with class arrays
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 14:51:48 +0000
- Subject: [Bug fortran/51754] [OOP] ICE on valid with class arrays
- Auto-submitted: auto-generated
- References: <bug-51754-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51754
--- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> 2012-01-29 14:51:48 UTC ---
Created attachment 26504
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26504
This fixes the ice-on-valid of comment #0
This patch (extracted from PR50981 comment #28) fixes the ICEs of:
PR51754 comment #0
PR46356 comment #2
PR41587 comment #1
It regresses in class_41.f03 because of the interface mapping mechanism for
character length. There is a type mismatch between the dummy argument (of a
base type) and the corresponding actual argument (of an extended type). The
shadow symbol created for interface mapping has the base type, but its backend
decl has the extended type. It works without the patch because the missing
"_data" reference is implicitly added by conv_parent_component_references (and
it is the "_data" component of the extended type). It fails with the patch
because the "_data" component is added explicitly, but as we are working with
the frontend structures we add the "_data" component of the base type. When
translating with the extended type declaration we don't find the right
component and fail because of the type mismatch.