[PATCH] D124571: Avoid strict aliasing violation on type punning inside llvm::PointerIntPair
Breno Rodrigues Guimaraes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 28 05:23:17 PDT 2022
brenoguim added a comment.
I created a compiler explorer example without PointerIntPair to show the core of the issue: https://godbolt.org/z/xvofbdYP8
I also added options in this example to use memcpy for reading the pointer and show that it solves the issue. I added an option to show that using "char" as underlying storage is not enough to solve the issue, though I still think it may be the correct thing to do.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124571/new/
https://reviews.llvm.org/D124571
More information about the llvm-commits
mailing list