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.