From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9994 invoked by alias); 30 Oct 2002 08:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 9971 invoked by uid 71); 30 Oct 2002 08:26:01 -0000 Resent-Date: 30 Oct 2002 08:26:01 -0000 Resent-Message-ID: <20021030082601.9970.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, bernardo@sti.uniurb.it Received: (qmail 15322 invoked by uid 61); 30 Oct 2002 08:19:08 -0000 Message-Id: <20021030081908.15321.qmail@sources.redhat.com> Date: Wed, 30 Oct 2002 00:26:00 -0000 From: bernardo@sti.uniurb.it Reply-To: bernardo@sti.uniurb.it To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/8395: gcc 2.95.4 and 3.2 generate wrong code for double on intel X-SW-Source: 2002-10/txt/msg01236.txt.bz2 List-Id: >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==