Issue |
136756
|
Summary |
clang-cl rejects address of constinit dllimport variable in consteval constructor call
|
Labels |
|
Assignees |
|
Reporter |
EpicRobertMillar
|
Hello, I'm trying to initialize a web of constinit objects which refer to each other (cyclically..., trying to migrate some legacy code to the data segment as much as possible) and running into an issue with clang-cl when I try and do this across dll boundaries. MSVC, clang-linux and gcc-linux accept the construction of one constinit object with a pointer to another in another dll/so, but clang-cl rejects it as not a constant _expression_.
Repro, with conformance viewer showing which compilers accept this and which don't.
https://godbolt.org/z/3nx6Y3nTK
Possible duplicate of these issues, posting separately because initializing a constinit variable might be considered more worthy of the necessary fixups during the dll initialization.
https://github.com/llvm/llvm-project/issues/125952
https://github.com/llvm/llvm-project/issues/50900
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs