From 14c28276e0f55bf6a3aeea783db18c747794867c Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sat, 31 Jan 2009 10:25:41 +0000 Subject: [PATCH] re PR tree-optimization/38937 (dereferencing pointer '' does break strict-aliasing) 2009-01-30 Richard Guenther PR tree-optimization/38937 * tree-ssa-structalias.c (do_sd_constraint): Do not shortcut computing the transitive closure. From-SVN: r143819 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-structalias.c | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e871bd645cd..96051f625a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-01-31 Richard Guenther + + PR tree-optimization/38937 + * tree-ssa-structalias.c (do_sd_constraint): Do not shortcut + computing the transitive closure. + 2009-01-30 Richard Guenther PR tree-optimization/39041 diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 21566bbe5d8..3e8940e5166 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -1502,12 +1502,6 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c, unsigned int j; bitmap_iterator bi; - if (bitmap_bit_p (delta, anything_id)) - { - flag |= bitmap_set_bit (sol, anything_id); - goto done; - } - /* For x = *ESCAPED and x = *CALLUSED we want to compute the reachability set of the rhs var. As a pointer to a sub-field of a variable can also reach all other fields of the variable @@ -1553,6 +1547,12 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c, } } + if (bitmap_bit_p (delta, anything_id)) + { + flag |= bitmap_set_bit (sol, anything_id); + goto done; + } + /* For each variable j in delta (Sol(y)), add an edge in the graph from j to x, and union Sol(j) into Sol(x). */ EXECUTE_IF_SET_IN_BITMAP (delta, 0, j, bi)