This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/42804] ICE with -fcheck=bounds and type bound procedure call on array element



------- Comment #8 from janus at gcc dot gnu dot org  2010-01-19 17:46 -------
Here is the fix for PPCs, curing both the "must be scalar" error from the last
comment as well as the missing-locus ICE (which, as expected, did appear also
for PPCs after the other thing was fixed):

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 156040)
+++ gcc/fortran/resolve.c       (working copy)
@@ -4831,11 +4832,12 @@ extract_ppc_passed_object (gfc_expr *e)
   po->expr_type = EXPR_VARIABLE;
   po->symtree = e->symtree;
   po->ref = gfc_copy_ref (e->ref);
+  po->where = e->where;

   /* Remove PPC reference.  */
   ref = &po->ref;
   while ((*ref)->next)
-    (*ref) = (*ref)->next;
+    ref = &(*ref)->next;
   gfc_free_ref_list (*ref);
   *ref = NULL;


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]