[(pushed)] lto: do not load LTO stream for aliases [PR107418]

Message ID f39da44c-7a2f-3f24-0876-50aa1a28d33f@suse.cz
State New
Headers
Series [(pushed)] lto: do not load LTO stream for aliases [PR107418] |

Commit Message

Martin Liška Oct. 27, 2022, 8:30 a.m. UTC
  It's the similar condition we use in lto-dump.

Pushed as obvious.

MArtin

	PR lto/107418

gcc/lto/ChangeLog:

	* lto-dump.cc (lto_main): Do not load LTO stream for aliases.
---
  gcc/lto/lto-dump.cc | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gcc/lto/lto-dump.cc b/gcc/lto/lto-dump.cc
index f3d852df51f..cb9782722a9 100644
--- a/gcc/lto/lto-dump.cc
+++ b/gcc/lto/lto-dump.cc
@@ -347,7 +347,8 @@  lto_main (void)
        /* Dump gimple statement statistics.  */
        cgraph_node *node;
        FOR_EACH_DEFINED_FUNCTION (node)
-	node->get_untransformed_body ();
+	if (!node->alias)
+	  node->get_untransformed_body ();
        if (!GATHER_STATISTICS)
  	warning_at (input_location, 0,
  		    "Not configured with "