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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.07 20:41:31
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #8 from janus at gcc dot gnu.org 2010-11-07 20:41:31 UTC ---
The ICE can be fixed with the following patch:

Index: gcc/fortran/trans-array.c
===================================================================
--- gcc/fortran/trans-array.c   (revision 166419)
+++ gcc/fortran/trans-array.c   (working copy)
@@ -6278,6 +6278,9 @@ structure_alloc_comps (gfc_symbol * der_type, tree
       cdecl = c->backend_decl;
       ctype = TREE_TYPE (cdecl);

+      if (c->ts.type == BT_CLASS && c->ts.u.derived->backend_decl == NULL)
+       gfc_get_derived_type (c->ts.u.derived);
+      
       switch (purpose)
        {
        case DEALLOCATE_ALLOC_COMP:



With this the test case from PR46345 gives the output:

 Check 0:  F

(which apparently is the expected result).

Reply via email to