From 0f3cd532fa02d1787960bdd380d0a3f78343f024 Mon Sep 17 00:00:00 2001 From: Wang Liushuai Date: Mon, 24 May 2021 10:09:29 +0200 Subject: [PATCH] Do not load the thunk symbols. gcc/lto/ChangeLog: * lto-dump.c (get_size): Fix the NPD error about the thunk symbol. --- gcc/lto/lto-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/lto/lto-dump.c b/gcc/lto/lto-dump.c index 8344d3e17379..3586e208f9a5 100644 --- a/gcc/lto/lto-dump.c +++ b/gcc/lto/lto-dump.c @@ -122,7 +122,7 @@ public: cgraph_node *cnode = dyn_cast (node); gcc_assert (cnode); - return (cnode->definition && !cnode->alias) + return (cnode->definition && !cnode->thunk && !cnode->alias) ? n_basic_blocks_for_fn (DECL_STRUCT_FUNCTION (cnode->decl)) : 0; } -- 2.47.2