diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-03-02 14:04:50 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-03-02 14:04:50 -0500 |
commit | 5425159d176a7a92afc932cbb22d8822667099c4 (patch) | |
tree | 349fd3034e3c174622bc76c8c359ba2f747a0876 /gcc/gdbhooks.py | |
parent | cbaa1d9c218d9c0b5e34e510a462ff4e299a0f3f (diff) | |
download | gcc-5425159d176a7a92afc932cbb22d8822667099c4.zip gcc-5425159d176a7a92afc932cbb22d8822667099c4.tar.gz gcc-5425159d176a7a92afc932cbb22d8822667099c4.tar.bz2 |
c++: more mce_false folding from cp_fully_fold_init [PR108243]
We should also fold the overall initializer passed to cp_fully_fold_init
with mce_false, which allows folding of the copy-initialization of
'a1' in the below testcase (the initializer here is an AGGR_INIT_EXPR).
Unfortunately this doesn't help with direct- or default-initialization
because we don't call cp_fully_fold_init in that case, and even if we
did the initializer in that case is expressed as a bare CALL_EXPR
instead of an AGGR_INIT_EXPR, which cp_fully_fold_init can't really
fold.
PR c++/108243
PR c++/97553
gcc/cp/ChangeLog:
* cp-gimplify.cc (cp_fully_fold): Add an internal overload that
additionally takes and propagate an mce_value parameter, and
define the existing public overload in terms of it.
(cp_fully_fold_init): Pass mce_false to cp_fully_fold.
gcc/testsuite/ChangeLog:
* g++.dg/opt/is_constant_evaluated3.C: New test.
Diffstat (limited to 'gcc/gdbhooks.py')
0 files changed, 0 insertions, 0 deletions