aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-13 09:04:54 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-13 09:04:54 +0100
commitfc31d739fb9feeadfeb28cf795530cd1d1be2d54 (patch)
tree368a65daa6856675d76a602635cf7073a9d88ebb /gcc/reg-stack.c
parent639e8522c050cd9b814bc1a085f38b0418a8759a (diff)
downloadgcc-fc31d739fb9feeadfeb28cf795530cd1d1be2d54.zip
gcc-fc31d739fb9feeadfeb28cf795530cd1d1be2d54.tar.gz
gcc-fc31d739fb9feeadfeb28cf795530cd1d1be2d54.tar.bz2
re PR target/84828 (ICE in verify_flow_info at gcc/cfghooks.c:265)
PR target/84828 * reg-stack.c (change_stack): Change update_end var from int to rtx_insn *, if non-NULL don't update just BB_END (current_block), but also call set_block_for_insn on the newly added insns and rescan. * g++.dg/ext/pr84828.C: New test. From-SVN: r258476
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 82feb5d..73bb4fc 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -2489,7 +2489,7 @@ change_stack (rtx_insn *insn, stack_ptr old, stack_ptr new_stack,
enum emit_where where)
{
int reg;
- int update_end = 0;
+ rtx_insn *update_end = NULL;
int i;
/* Stack adjustments for the first insn in a block update the
@@ -2511,7 +2511,7 @@ change_stack (rtx_insn *insn, stack_ptr old, stack_ptr new_stack,
if (where == EMIT_AFTER)
{
if (current_block && BB_END (current_block) == insn)
- update_end = 1;
+ update_end = insn;
insn = NEXT_INSN (insn);
}
@@ -2686,7 +2686,16 @@ change_stack (rtx_insn *insn, stack_ptr old, stack_ptr new_stack,
}
if (update_end)
- BB_END (current_block) = PREV_INSN (insn);
+ {
+ for (update_end = NEXT_INSN (update_end); update_end != insn;
+ update_end = NEXT_INSN (update_end))
+ {
+ set_block_for_insn (update_end, current_block);
+ if (INSN_P (update_end))
+ df_insn_rescan (update_end);
+ }
+ BB_END (current_block) = PREV_INSN (insn);
+ }
}
/* Print stack configuration. */