This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR rtl-optimization/61712
- From: lin zuojian <manjian2006 at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 4 Jul 2014 12:59:15 +0800
- Subject: [PATCH] PR rtl-optimization/61712
- Authentication-results: sourceware.org; auth=none
Hi,
This crash is due to fail to consider the exception situation that
the insn variable may not be a insn at all.
arm.c (thumb1_reorg): if the
selected insn is not a insn, continue to next bb.
---
gcc/config/arm/arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 89684bb..50ae64b 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -16720,7 +16720,7 @@ thumb1_reorg (void)
insn = PREV_INSN (insn);
/* Find the last cbranchsi4_insn in basic block BB. */
- if (INSN_CODE (insn) != CODE_FOR_cbranchsi4_insn)
+ if (!INSN_P (insn) || (INSN_CODE (insn) != CODE_FOR_cbranchsi4_insn))
continue;
/* Get the register with which we are comparing. */
--
1.9.1