https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112487
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
Status|NEW |ASSIGNED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's technically invalid code, we are passing an aggregate value 'v' (volatile
qualified) to a function with pointer type, so the assert
3561 /* If the value of argument is never used, don't care about
initializing
3562 it. */
3563 if (optimize && gimple_in_ssa_p (cfun) && !def && is_gimple_reg (p))
3564 {
3565 gcc_assert (!value || !TREE_SIDE_EFFECTS (value));
3566 return insert_init_debug_bind (id, bb, var, rhs, NULL);
fires. But when p is a register the argument can never have side-effects
unless
there's a gross type mismatch. We instead should refrain from adding a
debug bind when such type mismatch occurs and not assert.