This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/8395: gcc 2.95.4 and 3.2 generate wrong code for double on intel


>Number:         8395
>Category:       c
>Synopsis:       gcc 2.95.4 and 3.2 generate wrong code for double on intel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 30 00:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Marco Bernardo
>Release:        gcc 2.95.4 and 3.2
>Organization:
>Environment:
intel processor (pentium 4), Linux Debian 2.4.16
>Description:
Expressions containing occurrences of double variables
are wrongly translated, especially when negative values
are involved.
The problem disappears when using long double instead
of double.
In the attached program, the value of the expression
should be 0. This is the case with long double, whereas
its value is -2.22045e-16 with double.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="prova.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="prova.c"

I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKHZvaWQpCnsKCWRvdWJsZSB4LCB5LCB6OwoJbG9u
ZyBkb3VibGUgbHgsIGx5LCBsejsKCgl4ID0gLTYuMDsKCXkgPSAtMS4yOwoJeiA9IDU7Cglwcmlu
dGYoIiVnICVnICVnICVnXG4iLAoJICAgICAgIHgsCgkgICAgICAgeSwKCSAgICAgICB6LAoJICAg
ICAgIHggLSB5ICogeik7CglseCA9IC02LjBMOwoJbHkgPSAtMS4yTDsKCWx6ID0gNUw7Cglwcmlu
dGYoIiVMZyAlTGcgJUxnICVMZ1xuIiwKCSAgICAgICBseCwKCSAgICAgICBseSwKCSAgICAgICBs
eiwKCSAgICAgICBseCAtIGx5ICogbHopOwoJcmV0dXJuKDApOwp9Cg==


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]