On Mon, 2 May 2016, Tom de Vries wrote: > Hi, > > this patch fixes PR70700, an ICE in tree-ssa-structalias.c:dump_pred_graph for > the test-case contained in the patch. > > In the constraint graph, a node representing a variable varinfo_t var is > represented as the corresponding var->id, ranging from 1 to FIRST_REF_NODE - > 1. > > A node representing a DEREF of a varinfo_t var is represented as the > corresponding var->id + FIRST_REF_NODE, ranging from FIRST_REF_NODE + 1 to > LAST_REF_NODE. > > So, for a DEREF node, we need to substract FIRST_REF_NODE to find the > corresponding variable. This logic is missing in a print statement in > dump_pred_graph (which is triggered with TDF_GRAPH), which causes the ICE. > > This patch fixes the ICE by substracting FIRST_REF_NODE from the node number > of a DEREF node to find the varinfo, and prints it as a DEREF node (by adding > an '*' prefix). > > Bootstrapped and reg-tested on x86_64. Extracted graphs from ealias dump and > verified that valid pdfs were produced. > > OK for trunk?
Ok. Richard. > Thanks, > - Tom > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)