aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/tree
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-07-02 18:03:57 -0400
committerJason Merrill <jason@redhat.com>2025-07-02 23:55:51 -0400
commit53c832282690ca1cd86e2eaf0128c70ba4edfc0f (patch)
tree47dfbefbb307cd41db580faf3f1e93fa4e3ce338 /gcc/rust/hir/tree
parentb8a7d51253695febe6598069ccd89280b45d0abe (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
c++: uninitialized TARGET_EXPR and constexpr [PR120684]HEADtrunkmaster
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