aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-04-14 22:40:43 -0400
committerJason Merrill <jason@redhat.com>2023-04-15 12:35:15 -0400
commit13669741e673fa6a7b7c8d68f992e58ecd393160 (patch)
treef190676b790120b2bb39791625db4b245e47b6bd /gcc/ada/gcc-interface/decl.cc
parentde0ee9d14165eebb3d31c84e98260c05c3b33acb (diff)
downloadgcc-13669741e673fa6a7b7c8d68f992e58ecd393160.zip
gcc-13669741e673fa6a7b7c8d68f992e58ecd393160.tar.gz
gcc-13669741e673fa6a7b7c8d68f992e58ecd393160.tar.bz2
c++: constexpr aggregate destruction [PR109357]
We were assuming that the result of evaluation of TARGET_EXPR_INITIAL would always be the new value of the temporary, but that's not necessarily true when the initializer is complex (i.e. target_expr_needs_replace). In that case evaluating the initializer initializes the temporary as a side-effect. PR c++/109357 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: Check for complex initializer. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/constexpr-dtor15.C: New test.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
0 files changed, 0 insertions, 0 deletions