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 tree-optimization/60174] [4.9 regression] ICE on ACATS cc3305a


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

--- Comment #21 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It's reassociation, namely optimize_range_tests, doing SSA_NAME propagation
when building ranges in init_range_entry.  The immediate fix is:

Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c  (revision 207796)
+++ tree-ssa-reassoc.c  (working copy)
@@ -1840,7 +1840,8 @@ init_range_entry (struct range_entry *r,

       if (exp != NULL_TREE)
        {
-         if (TREE_CODE (exp) != SSA_NAME)
+         if (TREE_CODE (exp) != SSA_NAME
+             || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (exp))
            break;

          stmt = SSA_NAME_DEF_STMT (exp);

The range test is still optimized, but the SSA_NAME is not replaced anymore.


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