public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/7117: long double miscompilation on SparcV9
@ 2002-06-25 8:16 wolfgang.bangerth
0 siblings, 0 replies; 2+ messages in thread
From: wolfgang.bangerth @ 2002-06-25 8:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 7117
>Category: c
>Synopsis: long double miscompilation on SparcV9
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 25 07:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: gcc 3.1.0
>Organization:
>Environment:
solaris 2.9, sparcv9
>Description:
The following rather trivial code is miscompiled on
64bit Sparc when using -m64:
-----------------------
#include <stdio.h>
int main () {
long double some_variable = 1.;
z = z-z/2;
printf("%f\n", (double)z);
};
-----------------------
It should of course print 0.500000, but prints 0.000000:
examples/step-11> gcc x.c ; ./a.out
0.500000
examples/step-11> gcc -m64 x.c ; ./a.out
0.000000
Regards
Wolfgang
>How-To-Repeat:
See above
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c/7117: long double miscompilation on SparcV9
@ 2002-06-25 8:38 davem
0 siblings, 0 replies; 2+ messages in thread
From: davem @ 2002-06-25 8:38 UTC (permalink / raw)
To: davem, gcc-bugs, gcc-prs, nobody, wolfgang.bangerth
Synopsis: long double miscompilation on SparcV9
Responsible-Changed-From-To: unassigned->davem
Responsible-Changed-By: davem
Responsible-Changed-When: Tue Jun 25 08:34:32 2002
Responsible-Changed-Why:
Mine.
State-Changed-From-To: open->closed
State-Changed-By: davem
State-Changed-When: Tue Jun 25 08:34:32 2002
State-Changed-Why:
Known bug in Sun's libc implementation of the software
quad floating point routines. They clobber the output
memory before the inputs are consumed.
We've installed a workaround into the GCC sources to
deal with this and the fix will appear in 3.1.1
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7117
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-25 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-25 8:16 c/7117: long double miscompilation on SparcV9 wolfgang.bangerth
2002-06-25 8:38 davem
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).