]> gcc.gnu.org Git - gcc.git/commit
c++: Fix up VEC_INIT_EXPR gimplification after r12-7069
authorJakub Jelinek <jakub@redhat.com>
Wed, 3 May 2023 08:38:04 +0000 (10:38 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 3 May 2023 09:03:32 +0000 (11:03 +0200)
commit585ebf8439be7407c66d131068552764810e1ab8
tree0f42aca45ca9306ea4c8dfb05c9ca73ef6fe5a8a
parente5891f2da97d4db789db270798812744e005ef38
c++: Fix up VEC_INIT_EXPR gimplification after r12-7069

During patch backporting, I've noticed that while most cp_walk_tree calls
with cp_fold_r callback callers were changed from &pset to cp_fold_data
&data, the VEC_INIT_EXPR gimplifications has not, so it still passes just
address of a hash_set<tree> and so if during the folding we ever touch
data->flags, we use uninitialized data there.

The following patch changes it to do the same thing as cp_fold_function
because the VEC_INIT_EXPR gimplifications will happen on function bodies
only.

2023-05-03  Jakub Jelinek  <jakub@redhat.com>

* cp-gimplify.cc (cp_fold_data): Move definition earlier.
(cp_gimplify_expr): Pass address of ff_genericize | ff_mce_false
constructed data rather than &pset to cp_walk_tree with cp_fold_r.

(cherry picked from commit 8d193b12d6f07ae0196db8296a49c881c1638c01)
gcc/cp/cp-gimplify.cc
This page took 0.058177 seconds and 5 git commands to generate.