mips: Emit psabi diagnostic for return values affected by C++ zero-width bit-field...
authorXi Ruoyao <xry111@mengyan1223.wang>
Wed, 30 Mar 2022 14:22:45 +0000 (22:22 +0800)
committerXi Ruoyao <xry111@mengyan1223.wang>
Fri, 1 Apr 2022 14:37:43 +0000 (22:37 +0800)
commit0d4b97f1ee5213dffce107bc9f260a22fb23b4b1
treee0ccf6bd93a74828f946a644daea4211e4683ffd
parent86d8e0c0652ef5236a460b75c25e4f7093cc0651
mips: Emit psabi diagnostic for return values affected by C++ zero-width bit-field ABI change [PR 102024]

gcc/
PR target/102024
* config/mips/mips.cc (mips_fpr_return_fields): Detect C++
zero-width bit-fields and set up an indicator.
(mips_return_in_msb): Adapt for mips_fpr_return_fields change.
(mips_function_value_1): Diagnose when the presense of a C++
zero-width bit-field changes function returning in GCC 12.

gcc/testsuite/
PR target/102024
* g++.target/mips/mips.exp: New test supporting file.
* g++.target/mips/pr102024.C: New test.
gcc/config/mips/mips.cc
gcc/testsuite/g++.target/mips/mips.exp [new file with mode: 0644]
gcc/testsuite/g++.target/mips/pr102024.C [new file with mode: 0644]