This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42804] ICE with -fcheck=bounds and type bound procedure call on array element
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2010 17:46:20 -0000
- Subject: [Bug fortran/42804] ICE with -fcheck=bounds and type bound procedure call on array element
- References: <bug-42804-17837@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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