This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFT PATCH, i386]: Fix PR87928, ICE in ix86_compute_frame_layout


Hello!

Attached patch fixes PR87928, where we ICE in ix86_compute_frame_layout in

  gcc_assert (preferred_alignment >= STACK_BOUNDARY / BITS_PER_UNIT);

when __attribute__ ((sysv_abi) is used. When the testcase is compiled,
ix86_cfun_abi () returns SYSV_ABI due to function __attribute__
override, while ix86_abi returns MS_ABI. These ABIs have different
STACK_BOUNDARY definition, so we compare preferred_alignment with
wrong STACK boundary definition.

Attached patch makes STACK_BOUNDARY dependant on function ABI attribute.

2018-11-09  Uros Bizjak  <ubizjak@gmail.com>

    PR target/87928
    * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
    instead of (TARGET_64BIT && ix86_abi == MS_ABI).
    * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
    * config/i386/cygming.h (STACK_BOUNDARY): Remove.

testsuite /Changelog:

2018-11-09  Uros Bizjak  <ubizjak@gmail.com>

    PR target/87928
    * gcc.target/i386/pr87928.c: New test.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

I will commit the patch to mainline SVN early next week to allow
Darwin and Ming/Cygwin maintainers some time to test the patch on
their targets.

Uros.

Attachment: p.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]