c/7117: long double miscompilation on SparcV9
wolfgang.bangerth@iwr.uni-heidelberg.de
wolfgang.bangerth@iwr.uni-heidelberg.de
Tue Jun 25 08:49:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list