+2005-08-14 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/22615
+
+ * tree-ssa-structalias.c (solution_set_add): Handle
+ first_vi_for_offset returning NULL.
+ (do_da_constraint): Ditto.
+ (do_sd_constraint): Ditto.
+ (do_ds_constraint): Ditto
+ (find_func_aliases): Ditto.
+ (build_constraint_graph): RHS is allowed be ANYTHING.
+ (first_vi_for_offset): Return NULL if we couldn't find anything at
+ the offset.
+
2005-08-14 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (s390_canonicalize_comparison): Prefer register
{
unsigned HOST_WIDE_INT fieldoffset = get_varinfo (i)->offset + offset;
varinfo_t v = first_vi_for_offset (get_varinfo (i), fieldoffset);
+ if (!v)
+ continue;
bitmap_set_bit (result, v->id);
}
else if (get_varinfo (i)->is_artificial_var
/* x = &y */
bitmap_set_bit (get_varinfo (lhs.var)->solution, rhs.var);
}
- else if (rhs.var > anything_id && lhs.var > anything_id)
+ else if (lhs.var > anything_id)
{
/* Ignore 0 weighted self edges, as they can't possibly contribute
anything */
unsigned HOST_WIDE_INT fieldoffset = get_varinfo (j)->offset + offset;
v = first_vi_for_offset (get_varinfo (j), fieldoffset);
+ if (!v)
+ continue;
t = v->node;
sol = get_varinfo (t)->solution;
if (!bitmap_bit_p (sol, rhs))
unsigned int t;
v = first_vi_for_offset (get_varinfo (j), fieldoffset);
+ if (!v)
+ continue;
t = v->node;
if (int_add_graph_edge (graph, lhs, t, 0))
flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
unsigned HOST_WIDE_INT fieldoffset = get_varinfo (j)->offset + loff;
v = first_vi_for_offset (get_varinfo (j), fieldoffset);
+ if (!v)
+ continue;
t = v->node;
if (int_add_graph_edge (graph, t, rhs, roff))
{
OFFSET.
Effectively, walk the chain of fields for the variable START to find the
first field that overlaps with OFFSET.
- Abort if we can't find one. */
+ Return NULL if we can't find one. */
static varinfo_t
first_vi_for_offset (varinfo_t start, unsigned HOST_WIDE_INT offset)
return curr;
curr = curr->next;
}
-
- gcc_unreachable ();
+ return NULL;
}