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.