PR 69246: Invalid REG_ARGS_SIZE for sibcalls
commitd94a1f53475290eb1725ee2456c2785c1d07a49c
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jan 2016 14:41:10 +0000 (15 14:41 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 15 Jan 2016 14:41:10 +0000 (15 14:41 +0000)
treefa57a9eddd888c9241714cfcc44471d4d36211f8
parent607320fcd40aa6783478d8aed97ff891f3313ea0
PR 69246: Invalid REG_ARGS_SIZE for sibcalls

The problem in this PR was that we were treating a sibcall as popping
arguments, leading to a negative REG_ARGS_SIZE.

It doesn't really make sense to treat sibcalls as popping since
(a) they're deallocating the caller's stack, not ours, and
(b) there are no optabs for popping sibcalls (any more).

Tested on x86_64-linux-gnu.

gcc/
PR middle-end/69246
* calls.c (emit_call_1): Force n_popped to zero for sibcalls.

gcc/testsuite/
PR middle-end/69246
* gcc.target/i386/pr69246.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232428 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/calls.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr69246.c [new file with mode: 0644]