[Bug middle-end/55771] Negation and type conversion incorrectly exchanged
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 21 13:53:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55771
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |middle-end
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-21 13:52:36 UTC ---
Ah, indeed - I misremembered a dup that was doing the opposite, converting
-1.0 to unsigned and expecting -1U as result.
It's fold converting (float)(-x) to -(float)x:
float
f1()
{
unsigned long x = 3;
return -x;
}
More information about the Gcc-bugs
mailing list