This is the mail archive of the 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]

[vta, trunk?] handle ARRAY_RANGE_REFs like ARRAY_REFs in TMR

This bug was uncovered by a TARGET_MEM_REF in a debug insn, IIRC, that
didn't get the array bounds SSA-updated during certain
transformations.  The SSA_NAME lived all the way through to
out-of-ssa, causing great grief (as in, IIRC, -fcompare-debug failures

This patch fixes it.  I'm installing it in the branch.  I think it
would probably be appropriate for the trunk as well.  Ok to install?

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <>

	* tree-ssa-loop-ivopts.c (idx_remove_ssa_names): Handle

Index: gcc/tree-ssa-loop-ivopts.c
--- gcc/tree-ssa-loop-ivopts.c.orig	2008-10-10 09:31:05.000000000 -0300
+++ gcc/tree-ssa-loop-ivopts.c	2008-10-14 18:06:10.000000000 -0300
@@ -5181,7 +5181,7 @@ idx_remove_ssa_names (tree base, tree *i
   if (TREE_CODE (*idx) == SSA_NAME)
     *idx = SSA_NAME_VAR (*idx);
-  if (TREE_CODE (base) == ARRAY_REF)
+  if (TREE_CODE (base) == ARRAY_REF || TREE_CODE (base) == ARRAY_RANGE_REF)
       op = &TREE_OPERAND (base, 2);
       if (*op
Alexandre Oliva
Free Software Evangelist  oliva@{,}
FSFLA Board Member       ÂSÃ Libre! =>
Red Hat Compiler Engineer   aoliva@{,}

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