From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7932 invoked by alias); 28 Jan 2013 13:34:25 -0000 Received: (qmail 6479 invoked by uid 48); 28 Jan 2013 13:33:48 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55270] [4.8 Regression] ICE in get_loop_body, at cfgloop.c:823 Date: Mon, 28 Jan 2013 13:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg02566.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55270 --- Comment #4 from Marek Polacek 2013-01-28 13:33:47 UTC --- The problem here is in dfs_enumerate_from, which wrongly detects the number of BBs in a loop. get_loop_body_with_size calls dfs_enumerate_from with reverse = 1, thus we go against direction of edges. I.e., we start at the header, then go through its predecessors and if the predecessor hasn't been visited yet and is dominated by the header, we count it. But, we don't count BB which only has an exit edge--thus its successor is outside of the loop. Moving in !reverse direction doesn't seem to help. I'm not exactly sure what to do here, I'm afraid of touching dfs_enumerate_from algorithm ;).