[Bug c++/58372] internal compiler error: ix86_compute_frame_layout

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 29 22:40:00 GMT 2018


Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
             Target|mingw32-sjlj                |x86 sjlj
                 CC|                            |hjl.tools at gmail dot com

--- Comment #18 from Uroš Bizjak <ubizjak at gmail dot com> ---
Digging a bit deeper: the testcase from Comment #14:

        void f(unsigned int * b) noexcept {

also fails for all x86 targets when the compiler is configured with
--enable-sjlj-exceptions, so the failure is not mingw specific.

Following is x86_64-linux-gnu target:

cc1plus -O2 -mpreferred-stack-boundary=4 -quiet -fpreprocessed pr58372.C
during RTL pass: ira
pr58372.C: In function ‘void f(unsigned int*)’:
pr58372.C:4:5: internal compiler error: in ix86_compute_frame_layout, at
    4 |     }
      |     ^
0x1821b24 ix86_compute_frame_layout
0x128b447 set_initial_elim_offsets

-mpreferred-stack-boundary=3 (instead of 4) again "fixes" the ICE.

It looks that stack realignment doesn't work with SjLj exceptions. As shown in
Comment #15, building the call to _Unwind_SjLj_Register sets
crtl->preferred_stack_boundary to 128, but nothing updates
crtl->stack_alignment_needed. This leads to the shown assert failure.

HJ, do you have an idea what is going wrong with realignment here?

More information about the Gcc-bugs mailing list