This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2, middle end]: Fix PR58372, internal compiler error: ix86_compute_frame_layout
- From: Jeff Law <law at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: "H. J. Lu" <hjl dot tools at gmail dot com>, "Guo, Xuepeng" <xuepeng dot guo at intel dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Sun, 4 Nov 2018 10:59:37 -0700
- Subject: Re: [PATCH v2, middle end]: Fix PR58372, internal compiler error: ix86_compute_frame_layout
- References: <CAFULd4YHjPCyt7=OE5xkCTx0bbqt3QSdzcsM11y0Q+M4-zJzyA@mail.gmail.com> <CAFULd4ZO68sirbWgaw9Y8RRK6R6GqqmpyRe8JHCGpCu-Zrr_nQ@mail.gmail.com>
On 11/1/18 10:18 AM, Uros Bizjak wrote:
> Hello!
>
> v2 of the patch hits the real problem: in pass_expand::execute
> finish_eh_generation is called after expand_stack_alignment is called.
> Construction of SjLj landing pads calls emit_library_call, which can
> change crtl->preferred_stack_boundary value after all dependant
> variables are already calculated by expand_stack_alignment.
>
> The solution is to move the call to finish_eh_generation in front of
> the call to expand_stack_alignment.
>
> 2018-11-01 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.
>
> testsuite/ChangeLog:
>
> 2018-11-01 Uros Bizjak <ubizjak@gmail.com>
>
> PR middle-end/58372
> * g++.target/i386/pr58372.C: New test.
>
> Patch was bootstrapped and regression tested on x86_64-linux-gnu
> {,-m32}, all default languages plus go. Additionally, the testcase
> from PR (and a couple of similar ones) were compiled for
> i686-w64-mingw32 target with various combinations of
> -mpreferred-stack-boundary= -mincoming-stack-boundary= -mforce-drap
> and -m{no-}accumulate-outgoing-args.
>
> OK for mainline and release branches?
>
> Uros.
>
OK, but please add a comment indicating why the new sequencing is needed
in the code.
jeff