public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/30971]  New: Wrong return value in loop  (Tail call)
@ 2007-02-26 13:37 eres at il dot ibm dot com
  2007-02-26 13:38 ` [Bug rtl-optimization/30971] " eres at il dot ibm dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: eres at il dot ibm dot com @ 2007-02-26 13:37 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/30971] Wrong return value in loop  (Tail call)
  2007-02-26 13:37 [Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call) eres at il dot ibm dot com
@ 2007-02-26 13:38 ` eres at il dot ibm dot com
  2007-02-26 17:37 ` [Bug rtl-optimization/30971] Wrong return value (Tail call optimization) rguenth at gcc dot gnu dot org
  2007-02-26 18:26 ` eres at il dot ibm dot com
  2 siblings, 0 replies; 4+ messages in thread
From: eres at il dot ibm dot com @ 2007-02-26 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from eres at il dot ibm dot com  2007-02-26 13:38 -------
Created an attachment (id=13116)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13116&action=view)
assembly file


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/30971] Wrong return value (Tail call optimization)
  2007-02-26 13:37 [Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call) eres at il dot ibm dot com
  2007-02-26 13:38 ` [Bug rtl-optimization/30971] " eres at il dot ibm dot com
@ 2007-02-26 17:37 ` rguenth at gcc dot gnu dot org
  2007-02-26 18:26 ` eres at il dot ibm dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-26 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-02-26 17:37 -------
With -ffast-math -0 is treated the same as 0.  Which would make this report
invalid...?


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/30971] Wrong return value (Tail call optimization)
  2007-02-26 13:37 [Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call) eres at il dot ibm dot com
  2007-02-26 13:38 ` [Bug rtl-optimization/30971] " eres at il dot ibm dot com
  2007-02-26 17:37 ` [Bug rtl-optimization/30971] Wrong return value (Tail call optimization) rguenth at gcc dot gnu dot org
@ 2007-02-26 18:26 ` eres at il dot ibm dot com
  2 siblings, 0 replies; 4+ messages in thread
From: eres at il dot ibm dot com @ 2007-02-26 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from eres at il dot ibm dot com  2007-02-26 18:26 -------
Sure, sorry about that,-funsafe-math-optimizations is more suitable here.
The testcase also fails when -funsafe-math-optimizations is used (fsigned-zeros
is set in that case which means the testcase should not have been failed)


-- 


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-26 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 13:37 [Bug rtl-optimization/30971] New: Wrong return value in loop (Tail call) eres at il dot ibm dot com
2007-02-26 13:38 ` [Bug rtl-optimization/30971] " eres at il dot ibm dot com
2007-02-26 17:37 ` [Bug rtl-optimization/30971] Wrong return value (Tail call optimization) rguenth at gcc dot gnu dot org
2007-02-26 18:26 ` eres at il dot ibm dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).