This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Fix C++ ABI for passing args of structs containing zero width bitfield.
ClosedPublic

Authored by jonpa on Mar 24 2022, 5:36 AM.

Details

Summary

A struct like { float a; int :0; } should per the SystemZ ABI be passed in a GPR, but to match a bug in GCC it has been passed in an FPR (see 759449c).

GCC has now corrected the C++ ABI for this case, and this patch for clang follows suit.

Not yet sure about what diagnostic should be emitted and when.

Diff Detail

Event Timeline

jonpa created this revision.Mar 24 2022, 5:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2022, 5:36 AM
jonpa requested review of this revision.Mar 24 2022, 5:36 AM
uweigand accepted this revision.Apr 26 2022, 6:52 AM

Not yet sure about what diagnostic should be emitted and when.

Looks like clang doesn't usually emit this type of diagnostic, so I think we don't need it in this special case either.

Patch LGTM.

This revision is now accepted and ready to land.Apr 26 2022, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2022, 8:17 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript