[clang] [clang][CodeGen] Use dynamic init for vague-linkage variables without constant initialization (PR #226645)
Divyansh Yadav via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 16 02:19:26 PDT 2026
schizophrenicmaniac wrote:
> Can you verify that your patch fixes the following variation?
Yes. Since `internal()` has internal linkage the patch doesn't touch it: `i` is still emitted as an internal constant null with no guard, which matches what dynamic init produces, and the program prints a null pointer. If I make the function inline instead, `i` now gets a guard and a dynamic store of null, whereas GCC 15 emits it statically with no guard, so that's another case where we'd now differ from GCC.
https://github.com/llvm/llvm-project/pull/226645
More information about the cfe-commits
mailing list