From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11939 invoked by alias); 20 Dec 2002 22:56:05 -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 11814 invoked by uid 71); 20 Dec 2002 22:56:03 -0000 Date: Fri, 20 Dec 2002 14:56:00 -0000 Message-ID: <20021220225603.11810.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Janis Johnson Subject: Re: optimization/8492: [3.3 regression] GCC spins forever compiling loop Reply-To: Janis Johnson X-SW-Source: 2002-12/txt/msg01131.txt.bz2 List-Id: The following reply was made to PR optimization/8492; it has been noted by GNATS. From: Janis Johnson To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, thorpej@shagadelic.org, jh@suse.cz Cc: Subject: Re: optimization/8492: [3.3 regression] GCC spins forever compiling loop Date: Fri, 20 Dec 2002 14:51:32 -0800 The mainline regression reported in PR optimization/8492 (an infinite loop in the compiler) showed up starting with this patch: Sun Jul 21 00:54:54 CEST 2002 Jan Hubicka * gcse.c: Include cselib.h (constptop_register): Break out from ... (cprop_insn): ... here; kill basic_block argument. (do_local_cprop, local_cprop_pass): New functions. (one_cprop_pass): Call local_cprop_pass. Here's a small test case that causes the compiler to hang when compiled on i686-linux with -O2: ------------------- /* compiler hangs when compiling with -O2 */ int count; int func(int *valp) { int val, locked = 0; while ((val = *valp) != 0) { if (count) { if (count) locked = 1; else locked = 1; if (!locked) continue; } if (!count) count--; break; } return val; } ------------------- http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8492