This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto][patch] Fix reading of cgraph when multiple files are passed to lto1

...and I just ran into it. Thanks for catching.


Rafael Espindola wrote:
While reading multiple files, cgraph_nodes contains the nodes from all
previous files. Because of this, the inlined_to field was getting
corrupted if lto1 was passed multiple files.

2008-10-24 Rafael Espindola <>

* lto-lang.c (input_cgraph_1): Iterate over nodes, not cgraph_nodes.


diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 52872fa..089dee2 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -1317,7 +1317,7 @@ input_cgraph_1 (struct lto_file_decl_data* file_data,
if (flag_ltrans)
- for (node = cgraph_nodes; node; node = node->next)
+ for (i = 0; VEC_iterate (cgraph_node_ptr, nodes, i, node); i++)
const int ref = (int) (intptr_t) node->global.inlined_to;

Google UK Limited | Registered Office: Belgrave House, 76 Buckingham
Palace Road, London SW1W 9TQ | Registered in England Number: 3977902

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]