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

Patch: obvious fix for compile-time abort


ADDR_EXPRs do not have an operand 1. My only test for this is large and
proprietary, but I trust it's sufficiently obvious to check in anyway, as it
aborted when executed.


2004-12-19 Dale Johannesen <dalej@apple.com>

        * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p):  Don't
        reference operand 1 of ADDR_EXPRs.

Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.36
diff -c -3 -p -r2.36 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c      18 Dec 2004 20:22:51 -0000      2.36
--- tree-ssa-loop-ivopts.c      19 Dec 2004 22:41:46 -0000
*************** contains_abnormal_ssa_name_p (tree expr)
*** 834,840 ****
      return false;

    if (code == ADDR_EXPR)
!     return !for_each_index (&TREE_OPERAND (expr, 1),
                            idx_contains_abnormal_ssa_name_p,
                            NULL);

--- 834,840 ----
      return false;

    if (code == ADDR_EXPR)
!     return !for_each_index (&TREE_OPERAND (expr, 0),
                            idx_contains_abnormal_ssa_name_p,
                            NULL);


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