From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11764 invoked by alias); 19 Dec 2012 15:13:16 -0000 Received: (qmail 11691 invoked by uid 48); 19 Dec 2012 15:12:56 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/55740] [4.8 Regression] ICE in verify_loop_structure, at cfgloop.c:1582, error: loop 2's header does not belong directly to it Date: Wed, 19 Dec 2012 15:13: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: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Status Component AssignedTo 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: 2012-12/txt/msg01886.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55740 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|middle-end |rtl-optimization AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | --- Comment #3 from Richard Biener 2012-12-19 15:12:56 UTC --- And it's of course after RTL CSE ... Which ends up merging two loop headers as we cross-jumped the tails ... /* If we merge a loop header into its predecessor, update the loop structure. */ if (current_loops != NULL) { if (b->loop_father->header == b) { remove_bb_from_loops (a); add_bb_to_loop (a, b->loop_father); a->loop_father->header = a; } remove_bb_from_loops (b); } Which looks broken if a is already a loop header. I have a patch.