From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9691 invoked by alias); 27 Apr 2004 17:55:27 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 9672 invoked from network); 27 Apr 2004 17:55:27 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sources.redhat.com with SMTP; 27 Apr 2004 17:55:27 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.0); Tue, 27 Apr 2004 18:53:58 +0100 From: "Dave Korn" To: Subject: RE: Error while using LOG_LINKS information. Date: Tue, 27 Apr 2004 18:48:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20040427163515.40040.qmail@web40307.mail.yahoo.com> Message-ID: X-OriginalArrivalTime: 27 Apr 2004 17:53:58.0781 (UTC) FILETIME=[9DC86AD0:01C42C80] X-SW-Source: 2004-04/txt/msg01275.txt.bz2 > -----Original Message----- > From: gcc-owner On Behalf Of kernel_learner > Sent: 27 April 2004 17:35 > Hi all, > > IN a machine-dependent-reorg pass that I am writing I > wrote a simple piece of code which traverses the > LOG_LINKS: > > for(;insns;insns=NEXT_INSN(insns)) > { > for(link = LOG_LINKS (insns); link; link = > XEXP(link, 1)); > } > This gives me a problem while building gcc: > > make[2]: *** [libgcc/./_muldi3.o] Error 1 > make[2]: Leaving directory > `/home/SOK_STUFF/or1k/b-gcc/gcc' > make[1]: *** [libgcc.a] Error 2 > make[1]: Leaving directory > `/home/SOK_STUFF/or1k/b-gcc/gcc' > make: *** [all-gcc] Error 2 > > I am sure that the problem is cause by this code since > if I take it away it builds PERFECT! > > Is the LOG_LINKS information corrupted or invalid at > the machine dependent reorganization part. Or am I > traversing it wrong? From my reading of the docs, LOG_LINKS (insn) is only valid if the insn is of type insn, call_insn or jump_insn. You should make sure in your outer loop that insn is of one of those types before the inner loop is allowed to run, otherwise you might be applying LOG_LINKS to a code_label, barrier or note. Or it could be some kind of corruption, if that doesn't fix it. cheers, DaveK -- Can't think of a witty .sigline today....