From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3706 invoked by alias); 23 Nov 2001 18:06:00 -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 3679 invoked by uid 71); 23 Nov 2001 18:06:00 -0000 Resent-Date: 23 Nov 2001 18:06:00 -0000 Resent-Message-ID: <20011123180600.3678.qmail@sourceware.cygnus.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, liviu.coman@active-knowledge.com Received:(qmail 676 invoked by uid 61); 23 Nov 2001 18:00:25 -0000 Message-Id:<20011123180025.675.qmail@sourceware.cygnus.com> Date: Mon, 19 Nov 2001 20:26:00 -0000 From: liviu.coman@active-knowledge.com Reply-To: liviu.coman@active-knowledge.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.2 (1.1.1.1.2.21) Subject: optimization/4935: errno X-SW-Source: 2001-11/txt/msg00565.txt.bz2 List-Id: >Number: 4935 >Category: optimization >Synopsis: errno >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Fri Nov 23 10:06:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: liviu.coman@active-knowledge.com >Release: 3.0.2 >Organization: >Environment: Linux i386, Suse 7.2, kernel 2.4.4-4GB. Options for configure were configure --with-gcc-version-trigger=/home/staff/coman/tmp/gcc-3.0.2/gcc/version.c --host=i686-pc-linux-gnu --prefix=/home/staff/coman/tmp/gcc --norecursion >Description: In my project I currently use gcc 3.0.2 as compiler and mathematical functions(such as log10, sqrt, ...). I discovered when I use optimization zero zero and check if those functions had an wrong parameter by testing errno, this is set properly. When I use any kind of optimization is not set properly for sqrt function. I used before gcc 2.95.2 and this bug was present for all mathematical function when my code was compiled with optimization. >How-To-Repeat: Compile the source file with optimization level 0 and 2 and see the difference. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="errno.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="errno.cc" I2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8Y2Vycm5vPgojaW5jbHVkZSA8aW9zdHJlYW0uaD4K CmludCBtYWluKCkKewogIGRvdWJsZSByZXM9MC47CgogIGVycm5vID0gMDsKICBjZXJyIDw8Iisr KysrKyBsb2cxMCBlcnJubz0iIDw8IGVycm5vIDw8IGVuZGw7ICAKICByZXM9bG9nMTAoLTEuMCk7 CiAgaWYoZXJybm8pCiAgewogICBjZXJyIDw8Ii0tLS0tLSBsb2cxMCBlcnJubz0iIDw8IGVycm5v IDw8IGVuZGw7CiAgfQogIAogIGNlcnIgPDwiKioqKioqIGxvZzEwIGVycm5vPSIgPDwgZXJybm8g PDwgZW5kbDsJCiAgCiAgZXJybm8gPSAwOwogIGNlcnIgPDwiKysrKysrIHNxcnQgZXJybm89IiA8 PCBlcnJubyA8PCBlbmRsOyAgICAKICByZXM9c3FydCgtMS4wKTsKICBpZihlcnJubykKICB7CiAg IGNlcnIgPDwiLS0tLS0tIHNxcnQgZXJybm89IiA8PCBlcnJubyA8PCBlbmRsOwogIH0KICAKICBj ZXJyIDw8IioqKioqKiBzcXJ0IGVycm5vPSIgPDwgZXJybm8gPDwgZW5kbDsJCn0K