public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] tree-inline decl_map: skip mapping NULL to itself
@ 2022-12-23  0:58 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2022-12-23  0:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c970ba27da4df7f21b90318eb2b8fd510051119e

commit c970ba27da4df7f21b90318eb2b8fd510051119e
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Dec 22 21:28:50 2022 -0300

    tree-inline decl_map: skip mapping NULL 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] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] tree-inline decl_map: skip mapping NULL to itself
@ 2022-12-28  5:23 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2022-12-28  5:23 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:914b14d99ec153c78761f4b90e7168ca1e62723c

commit 914b14d99ec153c78761f4b90e7168ca1e62723c
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Dec 28 02:21:31 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] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] tree-inline decl_map: skip mapping NULL to itself
@ 2022-12-23  7:31 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2022-12-23  7:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:397220c8ce6038d4087d161920caa009a7c8f0d8

commit 397220c8ce6038d4087d161920caa009a7c8f0d8
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Dec 22 21:28:50 2022 -0300

    tree-inline decl_map: skip mapping NULL 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] 4+ messages in thread

* [gcc(refs/users/aoliva/heads/testme)] tree-inline decl_map: skip mapping NULL to itself
@ 2022-12-23  5:27 Alexandre Oliva
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 2022-12-23  5:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:fae9c95e0ecb704caa2d4006703b99f6cebce574

commit fae9c95e0ecb704caa2d4006703b99f6cebce574
Author: Alexandre Oliva <oliva@gnu.org>
Date:   Thu Dec 22 21:28:50 2022 -0300

    tree-inline decl_map: skip mapping NULL 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] 4+ messages in thread

end of thread, other threads:[~2022-12-28  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23  0:58 [gcc(refs/users/aoliva/heads/testme)] tree-inline decl_map: skip mapping NULL to itself Alexandre Oliva
2022-12-23  5:27 Alexandre Oliva
2022-12-23  7:31 Alexandre Oliva
2022-12-28  5:23 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).