aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-05-31 00:17:22 +0000
committerAndrew Pinski <apinski@marvell.com>2021-06-01 18:28:59 +0000
commitea418485c700494c3efdc282854c5f5a08702416 (patch)
tree769672eb702b47d8a88a80540d300e667ce47c6d /gcc/tree-ssa-phiopt.c
parent34aae6b561871d6d8b10c810f303cb6f18b5fdd0 (diff)
downloadgcc-ea418485c700494c3efdc282854c5f5a08702416.zip
gcc-ea418485c700494c3efdc282854c5f5a08702416.tar.gz
gcc-ea418485c700494c3efdc282854c5f5a08702416.tar.bz2
Fix PR 95481: tail call fails with empty struct types
The problem here is we don't have an assignment type any more for empty structs as they were removed during gimplifcation. This adds a special case where the assignment var does not exist and the return decl is empty typed. OK? Tested on aarch64-linux-gnu with no regressions. Thanks, Andrew Pinski changes since v1: v2: Use is_empty_type instead of zero-sized type. gcc/ChangeLog: PR tree-optimization/95481 * tree-tailcall.c (find_tail_calls): Handle empty typed return decls. gcc/testsuite/ChangeLog: PR tree-optimization/95481 * 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.
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
0 files changed, 0 insertions, 0 deletions