https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113228
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What match is doing is correct, what reassoc is doing looks to be ok, but the gimplifier just falls over on `SSA_NAME != 0`. This fixes the ICE but I don't understand how the gimplifier was handling SSA_NAME before if it ever was, the code mentioned here has not changed since the tuples was merged in: ``` diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 15b540646c2..0cbe159b383 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -3304,6 +3304,9 @@ recalculate_side_effects (tree t) int len = TREE_OPERAND_LENGTH (t); int i; + if (code == SSA_NAME) + return; + switch (TREE_CODE_CLASS (code)) { case tcc_expression: @@ -18253,7 +18256,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, case SSA_NAME: /* Allow callbacks into the gimplifier during optimization. */ ret = GS_ALL_DONE; - break; + goto dont_recalculate; case OMP_PARALLEL: gimplify_omp_parallel (expr_p, pre_p); ```