On Thu, 17 Mar 2016, Tom de Vries wrote: > Hi, > > this patch fixes PR70269, an 5/6 regression. > > When compiling with "-O2 -fipa-pta -fdump-ipa-pta-graph" we try to initialize > a graph dump file for ipa-cp, while the dump file is not enabled, which causes > an ICE because dump_file_name is NULL. > > This condition in pass_init_dump_file enables the unnecessary initialization, > because dump_file is non-NULL: > ... > if (initializing_dump > && dump_file && (dump_flags & TDF_GRAPH) > && cfun && (cfun->curr_properties & PROP_cfg)) > ... > > The dump_file is non-NULL, but it's the dump file for ipa-pta, the pass that > calls cgraph_node:get_body which triggers the ipa transform of ipa-cp. > > The patch fixes this by resetting dump_file to NULL in cgraph_node::get_body. > > OK for stage 4 trunk/5 branch if bootstrap and reg-test succeeds?
Ok. Richard.