This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54917] [OOP] TRANSFER on polymorphic variable causes ICE
- 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: Fri, 12 Oct 2012 21:31:15 +0000
- Subject: [Bug fortran/54917] [OOP] TRANSFER on polymorphic variable causes ICE
- Auto-submitted: auto-generated
- References: <bug-54917-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54917
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |ice-on-valid-code
Last reconfirmed| |2012-10-12
CC| |janus at gcc dot gnu.org
Ever Confirmed|0 |1
Summary|transfer on polymorphic |[OOP] TRANSFER on
|variable causes ICE |polymorphic variable causes
|(gfc_target_expr_size) |ICE
--- Comment #1 from janus at gcc dot gnu.org 2012-10-12 21:31:15 UTC ---
Thanks for reporting this. The following should already be enough to fix the
ICE on -Wsurprising:
Index: gcc/fortran/target-memory.c
===================================================================
--- gcc/fortran/target-memory.c (revision 192392)
+++ gcc/fortran/target-memory.c (working copy)
@@ -121,6 +121,7 @@ gfc_target_expr_size (gfc_expr *e)
case BT_HOLLERITH:
return e->representation.length;
case BT_DERIVED:
+ case BT_CLASS:
{
/* Determine type size without clobbering the typespec for ISO C
binding types. */
But certainly some more modifications will be needed. I think our
implementation of TRANSFER is not really fit for handling polymorphic arguments
yet.