diff options
author | Jason Merrill <jason@redhat.com> | 2022-09-20 16:25:42 +0200 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-09-29 21:27:02 -0400 |
commit | 43faf3e5445b571731e52faa1be085ecd0a09323 (patch) | |
tree | 095d0b528bcb5282e8edd8b950682dc4eddea4b3 /contrib | |
parent | bbdcdf5cc73e1b3385d9a25bdab4df70c4bd8c2e (diff) | |
download | gcc-43faf3e5445b571731e52faa1be085ecd0a09323.zip gcc-43faf3e5445b571731e52faa1be085ecd0a09323.tar.gz gcc-43faf3e5445b571731e52faa1be085ecd0a09323.tar.bz2 |
c++: reduce redundant TARGET_EXPR
An experiment led me to notice that in some cases we were ending up with
TARGET_EXPR initialized by TARGET_EXPR, which isn't useful.
The target_expr_needs_replace change won't make a difference in most cases,
since cp_genericize_init will have already expanded VEC_INIT_EXPR by the
time we consider it, but it is correct.
gcc/cp/ChangeLog:
* cp-gimplify.cc (cp_fold_r) [TARGET_EXPR]: Collapse
TARGET_EXPR within TARGET_EXPR.
* constexpr.cc (cxx_eval_outermost_constant_expr): Avoid
adding redundant TARGET_EXPR.
* cp-tree.h (target_expr_needs_replace): VEC_INIT_EXPR doesn't.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions