From: Jozef Lawrynowicz Date: Thu, 2 Aug 2018 20:36:14 +0000 (+0000) Subject: backport: re PR middle-end/86705 (pr45678-2.c ICE with msp430-elf -mlarge) X-Git-Tag: releases/gcc-7.4.0~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=188bc018cdbf1eaa3ca485b506315d191fdd9168;p=thirdparty%2Fgcc.git backport: re PR middle-end/86705 (pr45678-2.c ICE with msp430-elf -mlarge) 2018-08-02 Jozef Lawrynowicz Backport from mainline 2018-07-31 Jozef Lawrynowicz PR middle-end/86705 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the requested variable alignment. (expand_one_ssa_partition): Likewise. (expand_one_var): Likewise. From-SVN: r263277 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8a30835bc13..670dc4d7bc91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2018-08-02 Jozef Lawrynowicz + + Backport from mainline + 2018-07-31 Jozef Lawrynowicz + + PR middle-end/86705 + * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when + MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the + requested variable alignment. + (expand_one_ssa_partition): Likewise. + (expand_one_var): Likewise. + 2018-08-01 Richard Biener PR bootstrap/86724 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index e15013b11490..4b9858225688 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -1252,10 +1252,10 @@ set_parm_rtl (tree parm, rtx x) allocate it, which means that in-frame portion is just a pointer. ??? We've got a pseudo for sure here, do we actually dynamically allocate its spilling area if needed? - ??? Isn't it a problem when POINTER_SIZE also exceeds - MAX_SUPPORTED_STACK_ALIGNMENT, as on cris and lm32? */ + ??? Isn't it a problem when Pmode alignment also exceeds + MAX_SUPPORTED_STACK_ALIGNMENT, as can happen on cris and lm32? */ if (align > MAX_SUPPORTED_STACK_ALIGNMENT) - align = POINTER_SIZE; + align = GET_MODE_ALIGNMENT (Pmode); record_alignment_for_reg_var (align); } @@ -1375,7 +1375,7 @@ expand_one_ssa_partition (tree var) /* If the variable alignment is very large we'll dynamicaly allocate it, which means that in-frame portion is just a pointer. */ if (align > MAX_SUPPORTED_STACK_ALIGNMENT) - align = POINTER_SIZE; + align = GET_MODE_ALIGNMENT (Pmode); record_alignment_for_reg_var (align); @@ -1592,7 +1592,7 @@ expand_one_var (tree var, bool toplevel, bool really_expand) /* If the variable alignment is very large we'll dynamicaly allocate it, which means that in-frame portion is just a pointer. */ if (align > MAX_SUPPORTED_STACK_ALIGNMENT) - align = POINTER_SIZE; + align = GET_MODE_ALIGNMENT (Pmode); } record_alignment_for_reg_var (align);