diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-03-19 09:13:32 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-19 09:13:32 +0100 |
commit | 8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3 (patch) | |
tree | 1f5071ccba70038dd5558be9a2acfb7968ebfbc4 /gcc/system.h | |
parent | 8959ab63f1881a8a4b1921b946d4ea3986bf1063 (diff) | |
download | gcc-8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3.zip gcc-8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3.tar.gz gcc-8f85b46337f90c3126b9cefd72ffd29eb9a4ebf3.tar.bz2 |
rs6000: Fix up setup_incoming_varargs [PR114175]
The c23-stdarg-8.c test (as well as the new test below added to cover even
more cases) FAIL on powerpc64le-linux and presumably other powerpc* targets
as well.
Like in the r14-9503-g218d174961 change on x86-64 we need to advance
next_cum after the hidden return pointer argument even in case where
there are no user arguments before ... in C23.
The following patch does that.
There is another TYPE_NO_NAMED_ARGS_STDARG_P use later on:
if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl))
&& targetm.calls.must_pass_in_stack (arg))
first_reg_offset += rs6000_arg_size (TYPE_MODE (arg.type), arg.type);
but I believe it was added there in r13-3549-g4fe34cdc unnecessarily,
when there is no hidden return pointer argument, arg.type is NULL and
must_pass_in_stack_var_size as well as must_pass_in_stack_var_size_or_pad
return false in that case, and for the TYPE_NO_NAMED_ARGS_STDARG_P
case with hidden return pointer argument that argument should have pointer
type and it is the first argument, so must_pass_in_stack shouldn't be true
for it either.
2024-03-19 Jakub Jelinek <jakub@redhat.com>
PR target/114175
* config/rs6000/rs6000-call.cc (setup_incoming_varargs): Only skip
rs6000_function_arg_advance_1 for TYPE_NO_NAMED_ARGS_STDARG_P functions
if arg.type is NULL.
* gcc.dg/c23-stdarg-9.c: New test.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions