This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
- From: "laurent at guerby dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Oct 2005 16:20:10 -0000
- Subject: [Bug ada/24003] [4.1 Regression] ACATS FAIL 17 regressions on x86-linux, fixed and decimal arithmetic broken
- References: <bug-24003-7210@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from laurent at guerby dot net 2005-10-02 16:20 -------
It looks like it is indeed a codegen bug in s-arit64.adb, in Scaled_Divide the
following line is miscompiled at -O1 and above (works at -O0):
T2 := Lo (T1 rem Zlo) & D (4);
In my p.adb testcase, the compiler with Jan patch calls Lo with argument = 0
whereas (T1 rem Zlo) returned (1073741824 rem 3221225472) = 1073741824 so
stack/argument handling must be confused at some point.
The bug is volatile, ie replacing the line above by:
S3 := Lo (T1 rem Zlo);
if S3 = 0 then
T2 := Uns64 (D (4));
else
T2 := S3 & D (4);
end if;
Makes it go away.
Laurent
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24003