[Bug target/45234] [4.4 Regression] ICE in expand_call, at calls.c:2845 when passing aligned function argument from unaligned stack after alloca
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Aug 9 17:01:00 GMT 2010
------- Comment #11 from hjl dot tools at gmail dot com 2010-08-09 17:01 -------
(In reply to comment #9)
> Does this patch:
>
> --
> diff --git a/gcc/calls.c b/gcc/calls.c
> index cd0d9c5..cbb0944 100644
> --- a/gcc/calls.c
> +++ b/gcc/calls.c
> @@ -2846,7 +2846,8 @@ expand_call (tree exp, rtx target, int ignore)
>
> /* Stack must be properly aligned now. */
> gcc_assert (!pass
> - || !(stack_pointer_delta % preferred_unit_stack_boundary));
> + || !(stack_pointer_delta
> + % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)));
>
> /* Generate the actual call instruction. */
> emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size,
> --
>
> make any senses?
>
This is incorrect. If SUPPORTS_STACK_ALIGNMENT is true, expand_call needs
to check stack_pointer_delta and preferred_unit_stack_boundary, and adjust
stack is needed before expanding call if needed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45234
More information about the Gcc-bugs
mailing list