From: Uros Bizjak Date: Sun, 11 Nov 2018 17:49:33 +0000 (+0100) Subject: re PR target/87928 (ICE in ix86_compute_frame_layout, at config/i386/i386.c:11161... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd5d3961572e2d65ed0e612235f0c7a28305cf98;p=gcc.git re PR target/87928 (ICE in ix86_compute_frame_layout, at config/i386/i386.c:11161 since r228607) 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: PR target/87928 * gcc.target/i386/pr87928.c: New test. From-SVN: r266016 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c19badc61c3..67a6b80c0a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-11-11 Uros Bizjak + + 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. + 2018-11-11 Xianmiao Qu * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile. diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index d7c7dd7057b..0a3c9a0dd40 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -268,9 +268,6 @@ do { \ bytes in one go. */ #define CHECK_STACK_LIMIT 4000 -#undef STACK_BOUNDARY -#define STACK_BOUNDARY (TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD) - /* By default, target has a 80387, uses IEEE compatible arithmetic, returns float values in the 387 and needs stack probes. We also align doubles to 64-bits for MSVC default compatibility. */ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index cf7d4effd1e..1ea5dc3b829 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -113,8 +113,7 @@ extern int darwin_emit_branch_islands; or dynamic loader. */ #undef STACK_BOUNDARY #define STACK_BOUNDARY \ - ((profile_flag || (TARGET_64BIT && ix86_abi == MS_ABI)) \ - ? 128 : BITS_PER_WORD) + ((profile_flag || TARGET_64BIT_MS_ABI) ? 128 : BITS_PER_WORD) #undef MAIN_STACK_BOUNDARY #define MAIN_STACK_BOUNDARY 128 diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 3a26644b490..813c86dbdfa 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -809,8 +809,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define PARM_BOUNDARY BITS_PER_WORD /* Boundary (in *bits*) on which stack pointer should be aligned. */ -#define STACK_BOUNDARY \ - (TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD) +#define STACK_BOUNDARY (TARGET_64BIT_MS_ABI ? 128 : BITS_PER_WORD) /* Stack boundary of the main function guaranteed by OS. */ #define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 562c4e2896e..dd2cc13ccfc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-11-11 Uros Bizjak + + PR target/87928 + * gcc.target/i386/pr87928.c: New test. + 2018-11-09 Martin Sebor PR testsuite/87965 diff --git a/gcc/testsuite/gcc.target/i386/pr87928.c b/gcc/testsuite/gcc.target/i386/pr87928.c new file mode 100644 index 00000000000..5edaa5f0676 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr87928.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O1 -mstackrealign -mabi=ms" } */ + +struct foo +{ + int a; + int b; + int c; + int d; +}; + +__attribute__ ((sysv_abi)) +struct foo bar (void) +{ + struct foo retval; + + retval.a = 1; + retval.b = 2; + retval.c = 3; + retval.d = 4; + + return retval; +}