[clang] static constexpr
variable initialized inside consteval
function is loosing its value
#92690
Labels
clang:codegen
confirmed
Verified by a second party
consteval
C++20 consteval
constexpr
Anything related to constant evaluation
duplicate
Resolved as duplicate
Any variable initialized as
static constexpr
variable insideconsteval
is not keeping its value in runtime:generates assembly (with clang 18.1):
confirmed with clang 16+ to current
main
branch (597ac471cc7da97ccf957362a7e9f7a52d6910ee
at compiler explorer)link to example: https://compiler-explorer.com/z/fj6zco3d5
same thing happens to strings and arrays ... their storage is all zeros
The text was updated successfully, but these errors were encountered: