This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13116] optimization issue
- From: "janis187 at us dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2003 01:53:07 -0000
- Subject: [Bug c/13116] optimization issue
- References: <20031118214542.13116.mkumar_70@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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