This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32664] [sh] ICE in create_pre_exit, at mode-switching.c:373
- From: "kkojima at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2007 10:42:57 -0000
- Subject: [Bug target/32664] [sh] ICE in create_pre_exit, at mode-switching.c:373
- References: <bug-32664-14137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from kkojima at gcc dot gnu dot org 2007-07-07 10:42 -------
This is same on sh4-unknown-linux-gnu. A reduced testcase
long long
foo (long long u)
{
return u;
}
fails on sh4 with -fnon-call-exceptions.
It looks that it started to fail after the patch
r126403 | uros | 2007-07-06 17:53:15 +0900 (Fri, 06 Jul 2007) | 13 lines
PR rtl_optimization/32450
* function.c (thread_prologue_and_epilogue_insns): Emit blockage insn
to ensure that instructions are not moved into the prologue when
profiling is on. Remove unused prologue_end variable.
(expand_function_end): Emit blockage insn instead of ASM_INPUT rtx
as a scheduling barrier.
mode-switching.c:create_pre_exit skipped the above scheduling barrier
when scanning the insns:
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00457.html
Now the barrier is replaced with a real blockage insn, we should skip
this real blockage insn. I'm testing the patch below:
* mode-switching.c: Skip blockage insn instead of ASM_INPUT rtx.
--- ORIG/trunk/gcc/mode-switching.c 2007-06-12 09:34:43.000000000 +0900
+++ LOCAL/trunk/gcc/mode-switching.c 2007-07-07 18:31:46.000000000 +0900
@@ -209,6 +209,7 @@ create_pre_exit (int n_entities, int *en
edge eg;
edge_iterator ei;
basic_block pre_exit;
+ rtx blockage_insn = gen_blockage ();
/* The only non-call predecessor at this stage is a block with a
fallthrough edge; there can be at most one, but there could be
@@ -255,8 +256,7 @@ create_pre_exit (int n_entities, int *en
last_insn = return_copy;
continue;
}
- if (GET_CODE (PATTERN (return_copy)) == ASM_INPUT
- && strcmp (XSTR (PATTERN (return_copy), 0), "") == 0)
+ if (rtx_equal_p (PATTERN (return_copy), blockage_insn))
{
last_insn = return_copy;
continue;
--
kkojima at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |build, ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2007-07-07 10:42:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32664