Re: [PATCH v2] mips: Fix C++14 vs. C++17 ABI incompatibility on mips64

2022-04-06 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-04-06 at 16:34 +0200, Jakub Jelinek wrote: > On Wed, Apr 06, 2022 at 09:44:33PM +0800, Xi Ruoyao wrote: > > @@ -6527,6 +6554,27 @@ mips_function_value_1 (const_tree valtype, > > const_tree fn_decl_or_type, > >    if (has_cxx_zero_width_bf) > > use_fpr = 0; > >   > > + 

Re: [PATCH v2] mips: Fix C++14 vs. C++17 ABI incompatibility on mips64

2022-04-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 06, 2022 at 09:44:33PM +0800, Xi Ruoyao wrote: > @@ -6527,6 +6554,27 @@ mips_function_value_1 (const_tree valtype, const_tree > fn_decl_or_type, >if (has_cxx_zero_width_bf) > use_fpr = 0; > > + if (TARGET_HARD_FLOAT > + && warn_psabi > + && use_fpr !=

[PATCH v2] mips: Fix C++14 vs. C++17 ABI incompatibility on mips64

2022-04-06 Thread Xi Ruoyao via Gcc-patches
v2: Add psABI warning and test. -- This fixes tmpdir-g++.dg-struct-layout-1/{t032,t059} failure. Clang++ also ignores C++17 empty bases in return values. gcc/ * config/mips/mips.cc (mips_fpr_return_fields): Ignore cxx17_empty_base_field_p fields and set an indicator.