diff options
author | Alexandre Oliva <oliva@adacore.com> | 2022-12-29 14:33:06 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2022-12-29 14:39:47 -0300 |
commit | 512af6c3803c4714cb2a92a8db263fb7f2b4ea10 (patch) | |
tree | c6a09b10e1779b017b703a97e5d906a3dd5f6dd7 /gcc | |
parent | 8d48107702aa8027f5e8b35ade919c5c0d50ef1e (diff) | |
download | gcc-512af6c3803c4714cb2a92a8db263fb7f2b4ea10.zip gcc-512af6c3803c4714cb2a92a8db263fb7f2b4ea10.tar.gz gcc-512af6c3803c4714cb2a92a8db263fb7f2b4ea10.tar.bz2 |
parloops: don't request insert that won't be completed
In take_address_of, we may refrain from completing a decl_address
INSERT if gsi is NULL, so dnn't even ask for an INSERT in this case.
for gcc/ChangeLog
* tree-parloops.cc (take_address_of): Skip INSERT if !gsi.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree-parloops.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-parloops.cc b/gcc/tree-parloops.cc index e680d97..b829ba7 100644 --- a/gcc/tree-parloops.cc +++ b/gcc/tree-parloops.cc @@ -1221,8 +1221,11 @@ take_address_of (tree obj, tree type, edge entry, uid = DECL_UID (TREE_OPERAND (TREE_OPERAND (*var_p, 0), 0)); int_tree_map elt; elt.uid = uid; - int_tree_map *slot = decl_address->find_slot (elt, INSERT); - if (!slot->to) + int_tree_map *slot = decl_address->find_slot (elt, + gsi == NULL + ? NO_INSERT + : INSERT); + if (!slot || !slot->to) { if (gsi == NULL) return NULL; |