diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2018-11-04 20:22:50 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2018-11-04 20:22:50 +0100 |
commit | e237f9f31d463d7a4616b70519f5bc6eb38750e5 (patch) | |
tree | 5bfbe69edfd78aeea1ace410d65180a57f2ab3a9 /gcc | |
parent | 2901f42f4bd75cf7f3fd00efc1b4f0719bc9b728 (diff) | |
download | gcc-e237f9f31d463d7a4616b70519f5bc6eb38750e5.zip gcc-e237f9f31d463d7a4616b70519f5bc6eb38750e5.tar.gz gcc-e237f9f31d463d7a4616b70519f5bc6eb38750e5.tar.bz2 |
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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 14 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/g++.target/i386/pr58372.C | 9 |
4 files changed, 30 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fa76f4..4b9ce0f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-11-04 Uros Bizjak <ubizjak@gmail.com> + + 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. + 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com> * common/config/i386/i386-common.c (processor_alias_table): Add diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 9d1eab6..672fc57 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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e728c1f..9bb5eb0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,9 +1,13 @@ +2018-11-04 Uros Bizjak <ubizjak@gmail.com> + + PR middle-end/58372 + * g++.target/i386/pr58372.C: New test. + 2018-11-03 Sandra Loosemore <sandra@codesourcery.com> PR target/87079 - - * gcc.target/nios2/pr87079-1.c: New. - * gcc.target/nios2/pr87079-2.c: New. + * gcc.target/nios2/pr87079-1.c: New. + * gcc.target/nios2/pr87079-2.c: New. 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> diff --git a/gcc/testsuite/g++.target/i386/pr58372.C b/gcc/testsuite/g++.target/i386/pr58372.C new file mode 100644 index 0000000..82e1b7f --- /dev/null +++ b/gcc/testsuite/g++.target/i386/pr58372.C @@ -0,0 +1,9 @@ +/* PR target/58372 */ +/* { dg-do compile { target c++14 } } */ +/* { dg-options "-O2" } */ + +__attribute__ ((__target__ ("rdrnd"))) +void f (unsigned int *b) noexcept +{ + __builtin_ia32_rdrand32_step (b); +} |