From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27787 invoked by alias); 29 Apr 2003 00:16:01 -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 27770 invoked by uid 71); 29 Apr 2003 00:16:01 -0000 Date: Tue, 29 Apr 2003 00:16:00 -0000 Message-ID: <20030429001601.27769.qmail@sources.redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code Reply-To: Wolfgang Bangerth X-SW-Source: 2003-04/txt/msg01305.txt.bz2 List-Id: The following reply was made to PR middle-end/10336; it has been noted by GNATS. From: Wolfgang Bangerth To: Steven Bosscher Cc: gcc-gnats@gcc.gnu.org, Volker Reichelt , , Subject: Re: middle-end/10336: [3.4 regression] ICE with -Wunreachable-code Date: Mon, 28 Apr 2003 19:09:33 -0500 (CDT) > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10336 > 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? :-) Too bad ;-) I tried it, but it ain't workin', assuming I did it right. Since this about exhausts my possibilities (not knowing all this stuff), I fear I have to leave this to more experienced hackers. At least the testcase is short... W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ices.utexas.edu www: http://www.ices.utexas.edu/~bangerth/