From: Alexandre Oliva Date: Thu, 29 Dec 2022 17:32:49 +0000 (-0300) Subject: tree-inline decl_map: skip mapping NULL to itself X-Git-Tag: basepoints/gcc-14~2287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7c8a16537aaf0fca623bf01813f5679f845edcf;p=thirdparty%2Fgcc.git 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 --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index c6c86af6c4ea..bfea1cc11822 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); }