On Sun, May 30, 2021 at 11:35 PM apinski--- via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> From: Andrew Pinski <apin...@marvell.com>
>
> The problem here is we don't have an assignment type any more
> for zero-length structs as they were removed during gimplifcation.
> This adds a special case where the assignment var does not exist
> and the return decl is zero-length.
>
> OK? Tested on aarch64-linux-gnu with no regressions.
>
> Thanks,
> Andrew Pinski
>
> gcc/ChangeLog:
>         * tree-tailcall.c (zero_sized_decl): New function.
>         (find_tail_calls): Handle zero sized return decls.
>
> gcc/testsuite/ChangeLog:
>
>         * gcc.dg/tree-ssa/tailcall-10.c: New test.
>         * gcc.dg/tree-ssa/tailcall-11.c: New test.
>         * gcc.dg/tree-ssa/tailcall-12.c: New test.
>         * gcc.dg/tree-ssa/tailcall-13.c: New test.
>         * gcc.dg/tree-ssa/tailrecursion-8.c: New test.

Please mention PR 95481 in the commit log.

Thanks.

H.J.

Reply via email to