]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Fix C23 (...) functions returning large aggregates [PR114175]
authorEdwin Lu <ewlu@rivosinc.com>
Mon, 18 Mar 2024 18:43:41 +0000 (11:43 -0700)
committerEdwin Lu <ewlu@rivosinc.com>
Tue, 19 Mar 2024 16:55:04 +0000 (09:55 -0700)
commit60586710b0646efdbbd77a7f53b93fb5edb87a61
treebaa97df071854553fc483b65420aeb2c4afa5819
parent07e03761a7fc1626a6a74ed957e117f56981558c
RISC-V: Fix C23 (...) functions returning large aggregates [PR114175]

We assume that TYPE_NO_NAMED_ARGS_STDARG_P don't have any named arguments and
there is nothing to advance, but that is not the case for (...) functions
returning by hidden reference which have one such artificial argument.
This causes gcc.dg/c23-stdarg-[68].c to fail

Fix the issue by checking if arg.type is NULL as r14-9503-g218d1749612
explains

Tested on linux rv64gcv.

gcc/ChangeLog:

PR target/114175
* config/riscv/riscv.cc (riscv_setup_incoming_varargs): Only skip
riscv_funciton_arg_advance for TYPE_NO_NAMED_ARGS_STDARG_P functions
if arg.type is NULL
gcc/config/riscv/riscv.cc
This page took 0.068347 seconds and 6 git commands to generate.