We were generating wrong code for cxx20-consteval-crash.cpp: instead of loading a value of a variable, we were using its address as the initializer.
Found while adding code to verify the size of constant initializers.
Paths
| Differential D123648
Restrict lvalue-to-rvalue conversions in CGExprConstant. ClosedPublic Authored by efriedma on Apr 12 2022, 5:32 PM.
Details Summary We were generating wrong code for cxx20-consteval-crash.cpp: instead of loading a value of a variable, we were using its address as the initializer. Found while adding code to verify the size of constant initializers.
Diff Detail
Event Timelineefriedma added a child revision: D123649: Allow flexible array initialization in C++..Apr 12 2022, 5:43 PM Miss_Grape added inline comments.
This revision is now accepted and ready to land.Apr 12 2022, 9:00 PM
This revision was landed with ongoing or failed builds.Apr 13 2022, 12:35 PM Closed by commit rGd791de0e25e1: Restrict lvalue-to-rvalue conversions in CGExprConstant. (authored by efriedma). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 422370 clang/lib/CodeGen/CGExprConstant.cpp
clang/test/CodeGenCXX/cxx20-consteval-crash.cpp
|
Could you add a test case?