From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20959 invoked by alias); 12 May 2014 10:48:59 -0000 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 Received: (qmail 20906 invoked by uid 48); 12 May 2014 10:48:56 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/61058] [4.7/4.8/4.9/4.10 Regression] ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in distance_agu_use_in_bb, at config/i386/i386.c:16740 with __builtin_unreachable() Date: Mon, 12 May 2014 10:48: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-Version: 4.10.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00999.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61058 --- Comment #7 from Jakub Jelinek --- On the other side, pass_cleanup_barriers is performed after pass_free_cfg, so making it unconditionally cfg-aware is not going to work, it is just that i386 (as well as few other targets) calls compute_bb_for_insn in its mach_reorg pass and doesn't free_bb_for_insn afterwards. So perhaps do nothing if BLOCK_FOR_INSN (prev), or call reorder_insns instead of reorder_insns_nobb if BLOCK_FOR_INSN (prev)? Though, calling reorder_insns there doesn't seem to work either, it isn't prepared to handle the case of moving a BARRIER into the middle of some bb.