[Bug target/47025] Dead stores in variadic functions not eliminated
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 6 14:09:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47025
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-06 14:08:31 UTC ---
We expand __builtin_va_end as
/* Expand EXP, a call to __builtin_va_end. */
static rtx
expand_builtin_va_end (tree exp)
{
tree valist = CALL_EXPR_ARG (exp, 0);
/* Evaluate for side effects, if needed. I hate macros that don't
do that. */
if (TREE_SIDE_EFFECTS (valist))
expand_expr (valist, const0_rtx, VOIDmode, EXPAND_NORMAL);
return const0_rtx;
}
thus, it has no side-effects (apart from those of its argument). It's
simply dropped...
Attached patch is already applied.
Mine.
More information about the Gcc-bugs
mailing list