diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-20 12:39:45 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-20 12:39:45 +0000 |
commit | 3eaadea64f843ec8640a057929ea966d1853fd2c (patch) | |
tree | 2771bc5c4b21ad3d0d5f1c0fe7a0ea7808989a26 /gcc/tree-ssa-structalias.c | |
parent | affd1d6108459c61e0afb7c593a9cf2429fc0005 (diff) | |
download | gcc-3eaadea64f843ec8640a057929ea966d1853fd2c.tar.gz |
2010-04-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (do_structure_copy): Properly handle
DEREF.
(dump_sa_points_to_info): Remove asserts.
(init_base_vars): nothing_id isn't an escape point nor does it
have pointers.
* gcc.dg/ipa/ipa-pta-14.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158553 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index ad4c10d3261..781eff30872 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3403,7 +3403,19 @@ do_structure_copy (tree lhsop, tree rhsop) if (lhsp->type == DEREF || (lhsp->type == ADDRESSOF && lhsp->var == anything_id) || rhsp->type == DEREF) - process_all_all_constraints (lhsc, rhsc); + { + if (lhsp->type == DEREF) + { + gcc_assert (VEC_length (ce_s, lhsc) == 1); + lhsp->offset = UNKNOWN_OFFSET; + } + if (rhsp->type == DEREF) + { + gcc_assert (VEC_length (ce_s, rhsc) == 1); + rhsp->offset = UNKNOWN_OFFSET; + } + process_all_all_constraints (lhsc, rhsc); + } else if (lhsp->type == SCALAR && (rhsp->type == SCALAR || rhsp->type == ADDRESSOF)) @@ -5910,13 +5922,7 @@ dump_sa_points_to_info (FILE *outfile) { varinfo_t vi = get_varinfo (i); if (!vi->may_have_pointers) - { - gcc_assert (find (i) == i - || !(vi = get_varinfo (find (i)))->may_have_pointers); - /* ??? See create_variable_info_for. - gcc_assert (bitmap_empty_p (vi->solution)); */ - continue; - } + continue; dump_solution_for_var (outfile, i); } } @@ -5955,6 +5961,8 @@ init_base_vars (void) var_nothing->size = ~0; var_nothing->fullsize = ~0; var_nothing->is_special_var = 1; + var_nothing->may_have_pointers = 0; + var_nothing->is_global_var = 0; /* Create the ANYTHING variable, used to represent that a variable points to some unknown piece of memory. */ |