From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12647 invoked by alias); 2 Apr 2003 09:32:12 -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 12640 invoked from network); 2 Apr 2003 09:32:10 -0000 Received: from unknown (HELO ngate.noida.hcltech.com) (202.54.110.230) by sources.redhat.com with SMTP; 2 Apr 2003 09:32:10 -0000 Received: from exch-01.noida.hcltech.com (exch-01 [204.160.254.29]) by ngate.noida.hcltech.com (8.9.3/8.9.3) with ESMTP id OAA26356 for ; Wed, 2 Apr 2003 14:57:58 +0530 Received: by exch-01.noida.hcltech.com with Internet Mail Service (5.5.2656.59) id <21G23D94>; Wed, 2 Apr 2003 14:54:58 +0530 Message-ID: From: "Sanjiv Kumar Gupta, Noida" To: gcc@gcc.gnu.org Subject: RE: infinite loop in find_rgns Date: Wed, 02 Apr 2003 12:23:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2003-04/txt/msg00068.txt.bz2 >In my case , current_edge is 0 at start. This is running in >infinite loop then. I got the above problem while trying to enable the first scheduling pass for SH4. The problem is, find_rgns() doesn't work in case of CFG not having a basic block whose index is 0. In case of SH4, the CFG starts with BB1 instead of BB0 for find_rgns (optimize_mode_switching converts the CFG in this way). So the follwing assignment is probably not correct in this case. Line 628 sched-rgn.c ...,current_edge = out_edges[0]; Since the array out_edges is xcalloced, it gives current_edge as 0 even if the BB0 is not present in the CFG. And since the current_edge is 0 at start, it runs into infinite loop. One solution to correct this is to check the value of current_edge till you get a valid value (0 is an illegal value I guess). Looking for your suggestions while I am experimenting this. --Sanjiv