[Bug target/91229] RISC-V ABI problem with zero-length bit-fields and float struct fields
wilson at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 8 19:05:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91229
--- Comment #3 from Jim Wilson <wilson at gcc dot gnu.org> ---
Author: wilson
Date: Thu Aug 8 19:04:56 2019
New Revision: 274215
URL: https://gcc.gnu.org/viewcvs?rev=274215&root=gcc&view=rev
Log:
RISC-V: Fix C ABI for flattened struct with 0-length bitfield.
gcc/
PR target/91229
* config/riscv/riscv.c (riscv_flatten_aggregate_field): New arg
ignore_zero_width_bit_field_p. Skip zero size bitfields when true.
Pass into recursive call.
(riscv_flatten_aggregate_argument): New arg. Pass to
riscv_flatten_aggregate_field.
(riscv_pass_aggregate_in_fpr_pair_p): New local warned. Call
riscv_flatten_aggregate_argument twice, with false and true as last
arg. Process result twice. Compare results and warn if different.
(riscv_pass_aggregate_in_fpr_and_gpr_p): Likewise.
gcc/testsuite/
* gcc.target/riscv/flattened-struct-abi-1.c: New test.
* gcc.target/riscv/flattened-struct-abi-2.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/riscv/flattened-struct-abi-1.c
trunk/gcc/testsuite/gcc.target/riscv/flattened-struct-abi-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/riscv/riscv.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list