https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102024
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hp at gcc dot gnu.org, | |mfortune at gmail dot com, | |paulhua at gcc dot gnu.org --- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> --- As for mips, https://techpubs.jurassic.nl/manuals/0640/developer/Mpro_n32_ABI/sgi_html/ch02.html says e.g.: "Regardless of the struct field structure, it is treated as a sequence of 64-bit chunks. If a chunk consists solely of a double float field (but not a double, which is part of a union), it is passed in a floating point register. Any other chunk is passed in an integer register." but it is ambiguous if in cases like: struct A { double a; int : 0; double b; }; struct B { double a; int : 0; }; struct C { int : 0; double a; }; those zero width bit-fields are considered part of any chunk and if so, which one (as they are zero size and on the chunk boundaries). The return value rule seems less ambigous: "A struct with only one or two floating point fields is returned in $f0 (and $f2 if necessary). This is a generalization of the Fortran COMPLEX case." my reading of that is that zero width bitfields shouldn't be ignored in that case, because if they are present, the struct doesn't contain only one or two floating point fields, it contains at least the zero width bitfield as well. CCing MIPS maintainers on this (and also LoongArch, while there is no ABI incompatibility for a new port, it is perhaps something to discuss and decide too).