From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13186 invoked by alias); 11 Nov 2009 21:59:59 -0000 Received: (qmail 13159 invoked by uid 48); 11 Nov 2009 21:59:46 -0000 Date: Wed, 11 Nov 2009 21:59:00 -0000 Message-ID: <20091111215946.13158.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/41993] [sh] ICE in create_pre_exit, at mode-switching.c:399 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kkojima at gcc dot gnu dot org" 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: 2009-11/txt/msg00943.txt.bz2 ------- Comment #1 from kkojima at gcc dot gnu dot org 2009-11-11 21:59 ------- All 4.x sh compilers fail with similar way. Looks only when unoptimized. Does the patch below work for you? --- ORIG/trunk/gcc/mode-switching.c 2009-02-21 09:26:24.000000000 +0900 +++ trunk/gcc/mode-switching.c 2009-11-11 11:03:04.000000000 +0900 @@ -325,7 +325,14 @@ create_pre_exit (int n_entities, int *en else break; if (copy_start >= FIRST_PSEUDO_REGISTER) - break; + { + if (!optimize) + { + last_insn = return_copy; + continue; + } + break; + } copy_num = hard_regno_nregs[copy_start][GET_MODE (copy_reg)]; BTW, I guess that __builtin_apply/__builtin_return may be a bit obsolete. If my memory is correct, there was an argument on the list for dropping them from the compiler. -- kkojima at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkojima at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |ice-on-valid-code Known to fail| |4.0.4 4.1.3 4.2.4 4.3.4 | |4.4.2 4.5.0 Known to work| |3.4.6 Priority|P3 |P4 Last reconfirmed|0000-00-00 00:00:00 |2009-11-11 21:59:45 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41993