Commit b06e1dce by Jozef Lawrynowicz Committed by Jozef Lawrynowicz

re PR middle-end/86705 (pr45678-2.c ICE with msp430-elf -mlarge)

	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: r263177
parent 31f52518
2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
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-07-31 Richard Earnshaw <rearnsha@arm.com> 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
......
...@@ -1257,10 +1257,10 @@ set_parm_rtl (tree parm, rtx x) ...@@ -1257,10 +1257,10 @@ set_parm_rtl (tree parm, rtx x)
allocate it, which means that in-frame portion is just a allocate it, which means that in-frame portion is just a
pointer. ??? We've got a pseudo for sure here, do we pointer. ??? We've got a pseudo for sure here, do we
actually dynamically allocate its spilling area if needed? actually dynamically allocate its spilling area if needed?
??? Isn't it a problem when POINTER_SIZE also exceeds ??? Isn't it a problem when Pmode alignment also exceeds
MAX_SUPPORTED_STACK_ALIGNMENT, as on cris and lm32? */ MAX_SUPPORTED_STACK_ALIGNMENT, as can happen on cris and lm32? */
if (align > MAX_SUPPORTED_STACK_ALIGNMENT) if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
align = POINTER_SIZE; align = GET_MODE_ALIGNMENT (Pmode);
record_alignment_for_reg_var (align); record_alignment_for_reg_var (align);
} }
...@@ -1381,7 +1381,7 @@ expand_one_ssa_partition (tree var) ...@@ -1381,7 +1381,7 @@ expand_one_ssa_partition (tree var)
/* If the variable alignment is very large we'll dynamicaly allocate /* If the variable alignment is very large we'll dynamicaly allocate
it, which means that in-frame portion is just a pointer. */ it, which means that in-frame portion is just a pointer. */
if (align > MAX_SUPPORTED_STACK_ALIGNMENT) if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
align = POINTER_SIZE; align = GET_MODE_ALIGNMENT (Pmode);
record_alignment_for_reg_var (align); record_alignment_for_reg_var (align);
...@@ -1608,7 +1608,7 @@ expand_one_var (tree var, bool toplevel, bool really_expand) ...@@ -1608,7 +1608,7 @@ expand_one_var (tree var, bool toplevel, bool really_expand)
/* If the variable alignment is very large we'll dynamicaly allocate /* If the variable alignment is very large we'll dynamicaly allocate
it, which means that in-frame portion is just a pointer. */ it, which means that in-frame portion is just a pointer. */
if (align > MAX_SUPPORTED_STACK_ALIGNMENT) if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
align = POINTER_SIZE; align = GET_MODE_ALIGNMENT (Pmode);
} }
record_alignment_for_reg_var (align); record_alignment_for_reg_var (align);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment