[Bug tree-optimization/58956] [4.7/4.8/4.9 Regression] wrong code at -O1 and above (affecting gcc 4.6 to trunk)
mikpelinux at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Nov 9 21:56:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58956
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #2 from Mikael Pettersson <mikpelinux at gmail dot com> ---
gcc 4.5.4 and 4.4.7 are also broken, but 4.3.6 is Ok. Started with r142396.
The effect of that revision is that
{
struct S *i = c;
*i = foo ();
is compiled as if it had been written
{
struct S tmp = foo ();
*c = tmp;
which is wrong since foo may (and in this case does) change c.
More information about the Gcc-bugs
mailing list