[Bug c/13116] optimization issue

janis187 at us dot ibm dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 21 01:53:00 GMT 2003


------- Additional Comments From janis187 at us dot ibm dot com  2003-11-21 01:53 -------
A workaround for the test case that might also be possible for your real code
is to assign the value 0x21 to a global variable, and then initialize the
local variable x from that global variable instead of from the constant.  That
prevents the compiler from performing constant folding here.

This is fixed in GCC 3.3.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13116



More information about the Gcc-bugs mailing list