This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call)
- From: "eres at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Feb 2007 13:37:13 -0000
- Subject: [Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When changing n to be 0 (instead of 10) in
testsuite/gcc.c-torture/execute/ieee/mzero6.c the return value is 0 but it
should be -0,
which causes the program to abort the execution.
gcc mzero6.c -w -O2 -fno-show-column -lm -funroll-loops --fast-math -O2
-o out -da
if (__builtin_copysign (1.0, func (0.0 / -5.0, 0)) != -1.0)
If we look at the assembly we see that the return value in 0
when n = 0 (instead of d):
.L43:
lis 5,.LC3@ha
lfd 0,.LC3@l(5)
fcmpu 0,13,0
bne 0,.L47
li 3,0
bl exit
--
Summary: Wrong return value in loop (Tail call)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eres at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30971