From 23bae97dbde2902ddefab4ab941447bb52864880 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 1 Jul 2015 16:48:30 +0000 Subject: [PATCH] re PR middle-end/66685 (conftest.c:16:1: internal compiler error: in as_a, at is-a.h:192) gcc/ PR bootstrap/66685 * rtl.c (classify_insn): Only return JUMP_INSN for parallel returns if there are no CALLs in the same pattern. From-SVN: r225263 --- gcc/ChangeLog | 6 ++++++ gcc/rtl.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48e91596a76..75df9c0dd06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-01 Richard Sandiford + + PR bootstrap/66685 + * rtl.c (classify_insn): Only return JUMP_INSN for parallel returns if + there are no CALLs in the same pattern. + 2015-07-01 Bernd Edlinger PR rtl-optimization/61047 diff --git a/gcc/rtl.c b/gcc/rtl.c index 2f32c649b4d..dccf298563b 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -683,17 +683,20 @@ classify_insn (rtx x) if (GET_CODE (x) == PARALLEL) { int j; + bool has_return_p = false; for (j = XVECLEN (x, 0) - 1; j >= 0; j--) if (GET_CODE (XVECEXP (x, 0, j)) == CALL) return CALL_INSN; else if (ANY_RETURN_P (XVECEXP (x, 0, j))) - return JUMP_INSN; + has_return_p = true; else if (GET_CODE (XVECEXP (x, 0, j)) == SET && GET_CODE (SET_DEST (XVECEXP (x, 0, j))) == PC) return JUMP_INSN; else if (GET_CODE (XVECEXP (x, 0, j)) == SET && GET_CODE (SET_SRC (XVECEXP (x, 0, j))) == CALL) return CALL_INSN; + if (has_return_p) + return JUMP_INSN; } #ifdef GENERATOR_FILE if (GET_CODE (x) == MATCH_OPERAND -- 2.30.2