From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15418 invoked by alias); 11 Nov 2012 22:45:44 -0000 Received: (qmail 15316 invoked by uid 48); 11 Nov 2012 22:45:25 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/41993] [sh] ICE in create_pre_exit, at mode-switching.c:399 Date: Sun, 11 Nov 2012 22:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned 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: 2012-11/txt/msg00975.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41993 --- Comment #11 from Uros Bizjak 2012-11-11 22:45:18 UTC --- (In reply to comment #10) > Fixed on trunk. Actually, implementing post-reload pass it looks to me, that in this place we are only interested in function return hard registers. In pre-reload mode-switching pass, there is no possibility for others, and in post-reload pass, we got bitten by the same issue as in comment #4 (again with -O0), but with hard registers. Kaz, can you please test following patch, if it works ok SH4? --cut here-- Index: mode-switching.c =================================================================== --- mode-switching.c (revision 193407) +++ mode-switching.c (working copy) @@ -330,7 +330,7 @@ short_block = 1; break; } - if (copy_start >= FIRST_PSEUDO_REGISTER) + if (!targetm.calls.function_value_regno_p (copy_start)) { last_insn = return_copy; continue; --cut here--