https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80136
Bill Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #5 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
OK, confirmed with a ppc64le->aarch64 cross.
The expression presented to force_gimple_operand is a complicated one.
Simplified representation:
mem_ref (cond_expr (ge_expr (D.16523, 0),
modify_expr (iftmp.394, D.16524),
modify_expr (iftmp.394, X)),
0)
where X is a very complicated compound_expr with plenty of things marked as
having side effects (as are the two modify_exprs above). There's a reference
to __gnuc_va_list buried in there, but we never get that far with the
gimplification before we blow up.
The issue is that the gimplification code doesn't expect to see any var_decls
at this point; since we're in SSA form, it wants to see ssa_vars instead.
However, all of D.16523, D.16524, and iftmp.394 are var_decls. While
processing the first modify_expr, we eventually hit this assert in
gimplify_modify_expr:
if (gimplify_ctxp->into_ssa && is_gimple_reg (*to_p))
{
/* We should have got an SSA name from the start. */
gcc_assert (TREE_CODE (*to_p) == SSA_NAME
|| ! gimple_in_ssa_p (cfun));
}