This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13162] New: -O2 miscompiles const volatile dependent code
- From: "zwane at arm dot linux dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2003 21:47:26 -0000
- Subject: [Bug c/13162] New: -O2 miscompiles const volatile dependent code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the test case with -O2 will result incorrect code being generated.
This was observed in the Linux Kernel 2.6.0-test8 (possibly earlier) i386
constant_test_bit() function. The following merged patch serves as a suitable
workaround.
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test8/2.6.0-test8-mm1/broken-out/constant_test_bit-doesnt-like-zwanes-gcc.patch
--
Summary: -O2 miscompiles const volatile dependent code
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zwane at arm dot linux dot org dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-gnu-linux
GCC host triplet: i686-gnu-linux
GCC target triplet: i686-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13162