From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8639 invoked by alias); 8 Mar 2002 03:36:02 -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 8583 invoked by uid 71); 8 Mar 2002 03:36:01 -0000 Resent-Date: 8 Mar 2002 03:36:01 -0000 Resent-Message-ID: <20020308033601.8582.qmail@sources.redhat.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, mercury-bugs@cs.mu.oz.au Resent-Reply-To: gcc-gnats@gcc.gnu.org, Fergus Henderson Received:(qmail 26069 invoked by uid 61); 8 Mar 2002 03:26:10 -0000 Message-Id:<20020308032610.26068.qmail@sources.redhat.com> Date: Thu, 07 Mar 2002 19:36:00 -0000 From: Fergus Henderson Reply-To: Fergus Henderson To: gcc-gnats@gcc.gnu.org Cc: mercury-bugs@cs.mu.oz.au X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify:mercury-bugs@cs.mu.oz.au Subject: optimization/5878: gcc 3.1 breaks on C code generated by the Mercury compiler X-SW-Source: 2002-03/txt/msg00262.txt.bz2 List-Id: >Number: 5878 >Category: optimization >Synopsis: gcc 3.1 breaks on C code generated by the Mercury compiler >Confidential: no >Severity: critical >Priority: high >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu Mar 07 19:36:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Fergus Henderson >Release: 3.1 20020304 (prerelease) >Organization: >Environment: Reading specs from /tmp/fjh/install/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: configure --prefix=/tmp/fjh/install Thread model: single gcc version 3.1 20020304 (prerelease) >Description: gcc 3.1 gets an internal error when compiling the attached file with optimization enabled. This is a regression from gcc 2.95.3. The output is: bash$ gcc -O mercury-gcc3.1.c mercury-gcc3.1.c: In function `f': mercury-gcc3.1.c:22: Internal compiler error in verify_local_live_at_start, at flow.c:606 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >How-To-Repeat: Compile the attached file with `gcc -c -O', e.g. `gcc -c -O bug.c'. void *dummy (void *); register void *reg __asm__ ("ebx"); void f (void) { goto *dummy (&&foo); for (;;) { foo: (reg) = (void *) 1; if (!reg) goto baz; reg = (&&bar); } bar: baz: reg = 0; } >Fix: A work-around is to compile without `-O'. >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="mercury-gcc3.1.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="mercury-gcc3.1.c" dm9pZCAqZHVtbXkgKHZvaWQgKik7CnJlZ2lzdGVyIHZvaWQgKnJlZyBfX2FzbV9fICgiZWJ4Iik7 Cgp2b2lkCmYgKHZvaWQpCnsKICBnb3RvICpkdW1teSAoJiZmb28pOwogIGZvciAoOzspCiAgICB7 CiAgICBmb286CiAgICAgIChyZWcpID0gKHZvaWQgKikgMTsKCiAgICAgIGlmICghcmVnKQoJZ290 byBiYXo7CgogICAgICByZWcgPSAoJiZiYXIpOwogICAgfQoKYmFyOgpiYXo6CiAgcmVnID0gMDsK fQo=