http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56385


janus at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED

         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org

                   |gnu.org                     |



--- Comment #3 from janus at gcc dot gnu.org 2013-02-19 15:20:45 UTC ---

(In reply to comment #2)

> Author: janus

> Date: Fri Nov  5 18:14:52 2010

> New Revision: 166368



Mine, obviously (although I don't directly see how this commit is the cause for

the ICE).



In any case, it is easy to fix:



Index: gcc/fortran/trans-array.c

===================================================================

--- gcc/fortran/trans-array.c    (revision 195974)

+++ gcc/fortran/trans-array.c    (working copy)

@@ -7547,8 +7547,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree

       called_dealloc_with_status = false;

       gfc_init_block (&tmpblock);



-      if (c->attr.allocatable

-          && (c->attr.dimension || c->attr.codimension))

+      if (c->attr.allocatable && (c->attr.dimension || c->attr.codimension)

+          && !c->attr.proc_pointer)

         {

           comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,

                       decl, cdecl, NULL_TREE);

@@ -7730,7 +7730,8 @@ structure_alloc_comps (gfc_symbol * der_type, tree

           continue;

         }



-      if (c->attr.allocatable && !cmp_has_alloc_comps)

+      if (c->attr.allocatable && !c->attr.proc_pointer

+          && !cmp_has_alloc_comps)

         {

           rank = c->as ? c->as->rank : 0;

           tmp = gfc_duplicate_allocatable (dcmp, comp, ctype, rank);

Reply via email to