public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bernardo@sti.uniurb.it To: gcc-gnats@gcc.gnu.org Subject: c/8395: gcc 2.95.4 and 3.2 generate wrong code for double on intel Date: Wed, 30 Oct 2002 00:26:00 -0000 [thread overview] Message-ID: <20021030081908.15321.qmail@sources.redhat.com> (raw) >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==
next reply other threads:[~2002-10-30 8:26 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-30 0:26 bernardo [this message] 2002-10-30 9:36 Bruce Allen 2002-10-30 12:57 bangerth 2002-10-31 0:46 Marco Bernardo 2002-10-31 0:56 Bruce Allen 2002-11-02 7:46 Marco Bernardo 2002-11-02 7:56 Toon Moene 2002-11-02 8:26 Tim Prince 2002-11-02 22:26 Bruce Allen 2002-11-02 22:26 Bruce Allen 2002-11-04 3:06 Bruce Allen 2002-11-04 9:06 Joseph S. Myers 2002-11-04 9:06 Marco Bernardo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20021030081908.15321.qmail@sources.redhat.com \ --to=bernardo@sti.uniurb.it \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).