aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-04-07 11:49:19 -0400
committerJason Merrill <jason@redhat.com>2025-04-07 13:04:34 -0400
commitc7dc9b6f889fa8f9e4ef060c3af107eaf54265c5 (patch)
tree6899780475998ea9a0397d920c611ee843576737 /gcc/rust
parent3a77a567b1028a28ecbb2f2eadc351d8bd004352 (diff)
downloadgcc-c7dc9b6f889fa8f9e4ef060c3af107eaf54265c5.zip
gcc-c7dc9b6f889fa8f9e4ef060c3af107eaf54265c5.tar.gz
gcc-c7dc9b6f889fa8f9e4ef060c3af107eaf54265c5.tar.bz2
c++: constinit and value-initialization [PR119652]
Value-initialization built an AGGR_INIT_EXPR to set AGGR_INIT_ZERO_FIRST on. Passing that AGGR_INIT_EXPR to maybe_constant_value returned a TARGET_EXPR, which potential_constant_expression_1 mistook for a temporary. We shouldn't add a TARGET_EXPR to the AGGR_INIT_EXPR in this case, just like we already avoid adding it to CONSTRUCTOR or CALL_EXPR. PR c++/119652 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_outermost_constant_expr): Also don't add a TARGET_EXPR around AGGR_INIT_EXPR. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/constinit20.C: New test.
Diffstat (limited to 'gcc/rust')
0 files changed, 0 insertions, 0 deletions