re PR middle-end/51323 (g++ confuses this with function argument in optimized call)
authorJakub Jelinek <jakub@redhat.com>
Mon, 5 Dec 2011 08:15:23 +0000 (09:15 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 5 Dec 2011 08:15:23 +0000 (09:15 +0100)
commit5275901c43a4c3f8feb32999af281ae5d009bac6
tree94692863619a18f281ead69f54e9055cdfeffd93
parent2adac2a72b5a63a0e264bf7d345cd31edfe4e700
re PR middle-end/51323 (g++ confuses this with function argument in optimized call)

PR middle-end/51323
PR middle-end/50074
* calls.c (internal_arg_pointer_exp_state): New variable.
(internal_arg_pointer_based_exp_1,
internal_arg_pointer_exp_scan): New functions.
(internal_arg_pointer_based_exp): New function.
(mem_overlaps_already_clobbered_arg_p): Use it.
(expand_call): Free internal_arg_pointer_exp_state.cache vector
and clear internal_arg_pointer_exp_state.scan_start.

* gcc.c-torture/execute/pr51323.c: New test.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r182000
gcc/ChangeLog
gcc/calls.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr51323.c [new file with mode: 0644]