[Bug c/13162] New: -O2 miscompiles const volatile dependent code

zwane at arm dot linux dot org dot uk gcc-bugzilla@gcc.gnu.org
Sat Nov 22 21:47:00 GMT 2003


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



More information about the Gcc-bugs mailing list