diff options
author | Alexandre Oliva <oliva@adacore.com> | 2022-12-29 14:32:49 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2022-12-29 14:39:46 -0300 |
commit | d7c8a16537aaf0fca623bf01813f5679f845edcf (patch) | |
tree | 1b9f59fec451dd1bb8244a28432b3427f830dcaa /gcc/tree-inline.cc | |
parent | 50a0270389925e0b3d82b025d48f702fdab542f6 (diff) | |
download | gcc-d7c8a16537aaf0fca623bf01813f5679f845edcf.zip gcc-d7c8a16537aaf0fca623bf01813f5679f845edcf.tar.gz gcc-d7c8a16537aaf0fca623bf01813f5679f845edcf.tar.bz2 |
tree-inline decl_map: skip mapping NULL to itself
Mapping a NULL key is no use, skip it.
for gcc/ChangeLog
* tree-inline.cc (insert_decl_map): Skip mapping a NULL decl
as value to itself.
Diffstat (limited to 'gcc/tree-inline.cc')
-rw-r--r-- | gcc/tree-inline.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index c6c86af..bfea1cc 100644 --- a/gcc/tree-inline.cc +++ b/gcc/tree-inline.cc @@ -148,7 +148,7 @@ insert_decl_map (copy_body_data *id, tree key, tree value) /* Always insert an identity map as well. If we see this same new node again, we won't want to duplicate it a second time. */ - if (key != value) + if (key != value && value) id->decl_map->put (value, value); } |