diff options
author | Jason Merrill <jason@redhat.com> | 2025-07-02 18:03:57 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2025-07-02 23:55:51 -0400 |
commit | 53c832282690ca1cd86e2eaf0128c70ba4edfc0f (patch) | |
tree | 47dfbefbb307cd41db580faf3f1e93fa4e3ce338 /gcc/rust/hir/tree | |
parent | b8a7d51253695febe6598069ccd89280b45d0abe (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
In r15-7532 for PR118856 I introduced a TARGET_EXPR with a
TARGET_EXPR_INITIAL of void_node to express that no initialization is done.
And indeed evaluating that doesn't store a value for the TARGET_EXPR_SLOT
variable.
But then at the end of the full-expression, destroy_value stores void_node
to express that its lifetime has ended. If we evaluate the same
full-expression again, global_ctx->values still holds the void_node, causing
confusion when we try to destroy it again. So clear out any value before
evaluating a TARGET_EXPR_INITIAL of void_type.
PR c++/120684
PR c++/118856
gcc/cp/ChangeLog:
* constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: Clear
the value first if is_complex.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/range-for10.C: New test.
Diffstat (limited to 'gcc/rust/hir/tree')
0 files changed, 0 insertions, 0 deletions