[clang][Sparc] Pass packed structs and unions in integer registers on SPARC64 (#246226)
GCC never passes or returns a union in floating-point registers on
SPARC64, and does the same for a struct with a packed field, which is
every struct declared with __attribute__((packed)). Being packed carries
over to the structs and base classes nested in such a struct, but not to
the struct a packed struct is nested in. Clang passed and returned the
floating-point fields of both in floating-point registers.
Follow GCC's traverse_record_type() and keep those fields out of
floating-point registers, treating base classes like fields as GCC does.
As in GCC, the packed attribute has no effect on a byte-aligned
non-bit-field, and a packed class does not pack a field of a non-POD
class type. #pragma pack does not make fields packed.
-fclang-abi-compat=23 restores the previous behavior.
Fixes #39500
Fixes #214840
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>