public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4920] tree-inline decl_map: skip mapping NULL to itself
@ 2022-12-29 17:41 Alexandre Oliva
0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2022-12-29 17:41 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d7c8a16537aaf0fca623bf01813f5679f845edcf
commit r13-4920-gd7c8a16537aaf0fca623bf01813f5679f845edcf
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Dec 29 14:32:49 2022 -0300
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.
Diff:
---
gcc/tree-inline.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc
index c6c86af6c4e..bfea1cc1182 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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-29 17:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-29 17:41 [gcc r13-4920] tree-inline decl_map: skip mapping NULL to itself Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).