x86 regression: optimizer bug in 1.1 and dev

Mumit Khan khan@xraylith.wisc.edu
Mon Nov 9 08:23:00 GMT 1998


Versions affected: 1.1 and development snapshots. REGRESSION from 1.0.3.

The following optimizer bug shows up on i686-pc-linux-gnu, i386-*win32 
(and possibly other x86) ports when using -Ox, x >= 2.

Thanks to Peter Kabal <Kabal@ece.mcgill.ca> for the report and attached 
testcase.

To reproduce on i686-pc-linux-gnu:
  
  $ gcc -O2 -D__NO_MATH_INLINES -o floor-bug floor-bug.c
  $ ./floor-bug
  AV = 20, AV - floor(AV) = -1.11022e-15
                            ^^^^^^^^^^^^ should always be >= 0

Note that -D__NO_MATH_INLINES is necessary to reproduce the bug on glibc2.

Regards,
Mumit -- khan@xraylith.wisc.edu



More information about the Gcc-bugs mailing list