|
|
Hi,
I believe the following patch should fix PR lto/41932. I have not
tried with it with their testcase but we have a similiar one in our
testsuite, namely gcc.dg/lto/20090126-1, which only passes because
Honza disabled indirect inlining in whopr. When I implemented parm
call note streaming and enabled it the problem surfaced.
The NULL pointer dereference is fixed by calling the proper function
to initialize ipa-prop parameter descriptor array. I have also added
code to ensure that ipa-prop node and edge descriptor arrays are big
enough since I did not see anything always doing that earlier on the
paths leading to this function.
Bootstrapped and tested on x86_64-linux. OK for trunk?
Thanks,
Martin
2009-11-10 Martin Jambor <mjambor@xxxxxxx>
PR lto/41932
* ipa-prop.c (ipa_update_after_lto_read): Call
ipa_check_create_node_params and ipa_check_create_edge_args. Also
call ipa_initialize_node_params instead of ipa_populate_param_decls.
Index: icln/gcc/ipa-prop.c
===================================================================
--- icln.orig/gcc/ipa-prop.c
+++ icln/gcc/ipa-prop.c
@@ -2158,11 +2158,14 @@ ipa_update_after_lto_read (void)
struct cgraph_node *node;
struct cgraph_edge *cs;
+ ipa_check_create_node_params ();
+ ipa_check_create_edge_args ();
+
for (node = cgraph_nodes; node; node = node->next)
{
if (!node->analyzed)
continue;
- ipa_populate_param_decls (node, IPA_NODE_REF (node));
+ ipa_initialize_node_params (node);
for (cs = node->callees; cs; cs = cs->next_callee)
{
if (ipa_get_cs_argument_count (IPA_EDGE_REF (cs))
|
|