diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-18 09:57:11 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-18 09:57:11 +0000 |
commit | 048f10331c5a0d1d3f9f5a60c8331e2a97b8fdc3 (patch) | |
tree | 263e2efcdc0579dc1cab4be734a4ef34e7d77d56 /gcc/tree-ssa-structalias.c | |
parent | 50918a37830538c2142491875e30adeff53064ea (diff) | |
download | gcc-048f10331c5a0d1d3f9f5a60c8331e2a97b8fdc3.tar.gz |
2010-01-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/42781
* tree-ssa-structalias.c (find_what_var_points_to): Skip
restrict processing only if the original variable was
artificial.
* gfortran.fortran-torture/compile/pr42781.f90: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156006 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 753eefee909..3db28745f1a 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4776,18 +4776,19 @@ set_uids_in_ptset (bitmap into, bitmap from, struct pt_solution *pt) /* Compute the points-to solution *PT for the variable VI. */ static void -find_what_var_points_to (varinfo_t vi, struct pt_solution *pt) +find_what_var_points_to (varinfo_t orig_vi, struct pt_solution *pt) { unsigned int i; bitmap_iterator bi; bitmap finished_solution; bitmap result; + varinfo_t vi; memset (pt, 0, sizeof (struct pt_solution)); /* This variable may have been collapsed, let's get the real variable. */ - vi = get_varinfo (find (vi->id)); + vi = get_varinfo (find (orig_vi->id)); /* Translate artificial variables into SSA_NAME_PTR_INFO attributes. */ @@ -4822,7 +4823,7 @@ find_what_var_points_to (varinfo_t vi, struct pt_solution *pt) /* Instead of doing extra work, simply do not create elaborate points-to information for pt_anything pointers. */ if (pt->anything - && (vi->is_artificial_var + && (orig_vi->is_artificial_var || !pt->vars_contains_restrict)) return; |