[Bug ada/15134] New: incorrect -ffast-math division simplification

laurent at guerby dot net gcc-bugzilla@gcc.gnu.org
Sun Apr 25 17:14:00 GMT 2004


The following trivial program fails with "-O1 -ffast-math" whereas
it works without -ffast-math. This comes from ACATS.

$ gnatmake -f -O1 -ffast-math c34003a
gcc -c -O1 -ffast-math c34003a.adb
gnatbind -x c34003a.ali
gnatlink c34003a.ali -ffast-math
$ ./c34003a
raised PROGRAM_ERROR : c34003a.adb:5 explicit raise
$ cat c34003a.adb
PROCEDURE C34003A IS
     procedure Do_Fail is
     begin
	raise Program_Error;
     end Do_Fail;
   
     X : Float        := 30.0;
BEGIN
     IF 90.0 / X /= 3.0 THEN
          Do_Fail;
     END IF;
END C34003A;

-- 
           Summary: incorrect -ffast-math division simplification
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at guerby dot net
                CC: gcc-bugs at gcc dot gnu dot org,laurent at guerby dot
                    net
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



More information about the Gcc-bugs mailing list