From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15473 invoked by alias); 29 May 2002 23:56:04 -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 15421 invoked by uid 71); 29 May 2002 23:56:02 -0000 Resent-Date: 29 May 2002 23:56:02 -0000 Resent-Message-ID: <20020529235602.15420.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, donnte@microsoft.com Received:(qmail 12001 invoked by uid 61); 29 May 2002 23:53:39 -0000 Message-Id:<20020529235339.12000.qmail@sources.redhat.com> Date: Wed, 29 May 2002 18:53:00 -0000 From: donnte@microsoft.com Reply-To: donnte@microsoft.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: optimization/6864: Optimizer infinite loop/memory runaway (on gdb sources) X-SW-Source: 2002-05/txt/msg00975.txt.bz2 List-Id: >Number: 6864 >Category: optimization >Synopsis: Optimizer infinite loop/memory runaway (on gdb sources) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed May 29 16:56:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: donnte@microsoft.com >Release: 3.2 20020528 (experimental) >Organization: >Environment: Interix. >Description: Goto in switch (presumably) confuses live register calculation. Attached sample code, with marked goto (the only goto) turned on drives the compiler into an infinite loop (eating memory) at about 1145 in flow.c. (See "while (qhead != qtail)".) Removing the goto causes the compiler to terminate normally (but of course the code is incorrect.) The problem appeared between 5/10 and 5/28. Sample code is somewhat stripped down from the original gdb source, removing irrelevant functions. Both the code before the switch and (obviously) the switch body are needed to repro. (This is all post-preprocessor, but a .c file for easy use of comments and #if for minimization.) >How-To-Repeat: Compile attached file, command line: /dev/fs/C/home/donn.intel/gnu2.intel/local_bin/gcc -B/dev/fs/C/home/donn.intel/gnu2.intel/local_bin/ -c -g -O2 -D_ALL_SOURCE -implicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized test.c -v --save-temps >Fix: >Release-Note: >Audit-Trail: >Unformatted: