[Bug tree-optimization/83311] Unable to optimize alloc calls with casts and string builtins
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 7 09:46:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83311
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2017-12-07
Version|unknown |8.0
Depends on| |82991
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
While I could special-case this it really depends on PR82991. The issue is we
see
<bb 2> :
s_5 = __builtin_alloca (1);
_1 = __builtin_memcpy (s_5, "a", 1);
_2 = MEM[(char *)_1];
_7 = (int) _2;
return _7;
thus we read from _1 but we memcpy to s_5. One might consider it a duplicate
of that PR even.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82991
[Bug 82991] memcpy and strcpy return value can be assumed to be equal to first
argument
More information about the Gcc-bugs
mailing list