This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/60174] [4.9 regression] ICE on ACATS cc3305a
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Feb 2014 15:49:58 +0000
- Subject: [Bug tree-optimization/60174] [4.9 regression] ICE on ACATS cc3305a
- Auto-submitted: auto-generated
- References: <bug-60174-4 at http dot gcc dot gnu dot org/bugzilla/>
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.