https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358

--- Comment #24 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed May 27 13:25:01 2015
New Revision: 223753

URL: https://gcc.gnu.org/viewcvs?rev=223753&root=gcc&view=rev
Log:
[expr.c] PR target/65358 Avoid clobbering partial argument during sibcall

        PR target/65358
        * expr.c (memory_load_overlap): New function.
        (emit_push_insn): When pushing partial args to the stack would
        clobber the register part load the overlapping part into a pseudo
        and put it into the hard reg after pushing.  Change return type
        to bool.  Add bool argument.
        * expr.h (emit_push_insn): Change return type to bool.
        Add bool argument.
        * calls.c (expand_call): Cancel sibcall optimization when encountering
        partial argument on targets with ARGS_GROW_DOWNWARD and
        !STACK_GROWS_DOWNWARD.
        (emit_library_call_value_1): Update callsite of emit_push_insn.
        (store_one_arg): Likewise. 

        PR target/65358
        * gcc.dg/pr65358.c: New test. 


Added:
    trunk/gcc/testsuite/gcc.dg/pr65358.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/expr.c
    trunk/gcc/expr.h
    trunk/gcc/testsuite/ChangeLog

Reply via email to