This is an archive of the discontinued LLVM Phabricator instance.

[openmp] Fix strict aliasing issue in cmpxchg routine
ClosedPublic

Authored by serge-sans-paille on May 12 2022, 6:39 AM.

Details

Summary

Avoid warning under -fstrict-aliasing by using a call to memcpy to perform type punning.

Compiler output seems unaffected, see https://godbolt.org/z/E4hhvox1x

Diff Detail

Event Timeline

serge-sans-paille requested review of this revision.May 12 2022, 6:39 AM
Herald added a project: Restricted Project. · View Herald Transcript
This revision is now accepted and ready to land.May 12 2022, 6:40 AM