summaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2018-11-04 20:22:50 +0100
committerUros Bizjak <uros@gcc.gnu.org>2018-11-04 20:22:50 +0100
commite237f9f31d463d7a4616b70519f5bc6eb38750e5 (patch)
tree5bfbe69edfd78aeea1ace410d65180a57f2ab3a9 /gcc/cfgexpand.c
parent2901f42f4bd75cf7f3fd00efc1b4f0719bc9b728 (diff)
re PR c++/58372 (internal compiler error: ix86_compute_frame_layout)
PR middle-end/58372 * cfgexpand.c (pass_expand::execute): Move the call to finish_eh_generation in front of the call to expand_stack_alignment. testsuite/ChangeLog: PR middle-end/58372 * g++.target/i386/pr58372.C: New test. From-SVN: r265776
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 9d1eab6dfe2..672fc57687c 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -6510,6 +6510,14 @@ pass_expand::execute (function *fun)
find_many_sub_basic_blocks (blocks);
purge_all_dead_edges ();
+ /* After initial rtl generation, call back to finish generating
+ exception support code. We need to do this before cleaning up
+ the CFG as the code does not expect dead landing pads. */
+ if (fun->eh->region_tree != NULL)
+ finish_eh_generation ();
+
+ /* Call expand_stack_alignment after finishing all
+ updates to crtl->preferred_stack_boundary. */
expand_stack_alignment ();
/* Fixup REG_EQUIV notes in the prologue if there are tailcalls in this
@@ -6517,12 +6525,6 @@ pass_expand::execute (function *fun)
if (crtl->tail_call_emit)
fixup_tail_calls ();
- /* After initial rtl generation, call back to finish generating
- exception support code. We need to do this before cleaning up
- the CFG as the code does not expect dead landing pads. */
- if (fun->eh->region_tree != NULL)
- finish_eh_generation ();
-
/* BB subdivision may have created basic blocks that are are only reachable
from unlikely bbs but not marked as such in the profile. */
if (optimize)