From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14773 invoked by alias); 28 Apr 2003 22:36: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 14735 invoked by uid 71); 28 Apr 2003 22:36:00 -0000 Date: Mon, 28 Apr 2003 22:36:00 -0000 Message-ID: <20030428223600.14734.qmail@sources.redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Steven Bosscher Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code Reply-To: Steven Bosscher X-SW-Source: 2003-04/txt/msg01297.txt.bz2 List-Id: The following reply was made to PR middle-end/10336; it has been noted by GNATS. From: Steven Bosscher To: gcc-gnats@gcc.gnu.org, reichelt@igpm.rwth-aachen.de, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jason@gcc.gnu.org, bangerth@gcc.gnu.org Cc: Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code Date: Tue, 29 Apr 2003 00:29:12 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10336 Jason, Your patch added this line: + for (insn = PREV_INSN (avoided_insn); ; insn = PREV_INSN (insn)) I fixed a bug some time ago where such a loop ignored BARRIER insns, walked the whole list of INSNs until insn was NULL, which caused a segfault. It seems that for this test case, the same thing happens in your new loop. You can see in gdb that the C front end is ignoring "(barrier 14 13 15)". Two insns later you have a the segfault... So maybe something like this would fix it?? + for (insn = PREV_INSN (avoided_insn); + GET_CODE (insn) != BARRIER; + insn = PREV_INSN (insn)) Assuming PREV_INSN (avoided_insn) is never NULL, but of course we make that assumption now, too. Can't test it this week. Wolfgang, maybe you can, and if it works, submit a patch and use your new privileges? :-) Greetz Steven