tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state.
2008-08-29 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state. For NO_ALIAS_ANYTHING variables add a self-constraint, not one from ESCAPED. * gfortran.fortran-torture/compile/20080806-1.f90: New testcase. From-SVN: r139765
This commit is contained in:
parent
dce2b2f6cb
commit
13c6bff447
4 changed files with 47 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-08-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree-ssa-structalias.c (create_variable_info_for): Do not
|
||||
create fields for heap vars or vars with a noalias state.
|
||||
For NO_ALIAS_ANYTHING variables add a self-constraint, not one
|
||||
from ESCAPED.
|
||||
|
||||
2008-08-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* common.opt (ftree-store-ccp): Mark as preserved for
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2008-08-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* gfortran.fortran-torture/compile/20080805-1.f90: New testcase.
|
||||
|
||||
2008-08-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/37236
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
MODULE M1
|
||||
IMPLICIT NONE
|
||||
TYPE mmm
|
||||
COMPLEX(KIND=8), DIMENSION(:,:), POINTER :: data
|
||||
END TYPE mmm
|
||||
|
||||
CONTAINS
|
||||
|
||||
SUBROUTINE S(ma,mb,mc)
|
||||
TYPE(mmm), POINTER :: ma,mb,mc
|
||||
COMPLEX(KIND=8), DIMENSION(:, :), &
|
||||
POINTER :: a, b, c
|
||||
INTEGER :: i,j
|
||||
a=>ma%data
|
||||
b=>mb%data
|
||||
c=>mc%data
|
||||
DO i=1,size(a,1)
|
||||
DO j=1,size(a,2)
|
||||
c(i,j)=a(i,j)*b(i,j)
|
||||
ENDDO
|
||||
ENDDO
|
||||
END SUBROUTINE
|
||||
|
||||
END MODULE M1
|
|
@ -4354,7 +4354,11 @@ create_variable_info_for (tree decl, const char *name)
|
|||
if (TREE_CODE (decl) == FUNCTION_DECL && in_ipa_mode)
|
||||
return create_function_info_for (decl, name);
|
||||
|
||||
if (var_can_have_subvars (decl) && use_field_sensitive)
|
||||
if (var_can_have_subvars (decl) && use_field_sensitive
|
||||
&& (!var_ann (decl)
|
||||
|| var_ann (decl)->noalias_state == 0)
|
||||
&& (!var_ann (decl)
|
||||
|| !var_ann (decl)->is_heapvar))
|
||||
push_fields_onto_fieldstack (decl_type, &fieldstack, 0);
|
||||
|
||||
/* If the variable doesn't have subvars, we may end up needing to
|
||||
|
@ -4380,7 +4384,13 @@ create_variable_info_for (tree decl, const char *name)
|
|||
VEC_safe_push (varinfo_t, heap, varmap, vi);
|
||||
if (is_global && (!flag_whole_program || !in_ipa_mode)
|
||||
&& could_have_pointers (decl))
|
||||
make_constraint_from (vi, escaped_id);
|
||||
{
|
||||
if (var_ann (decl)
|
||||
&& var_ann (decl)->noalias_state == NO_ALIAS_ANYTHING)
|
||||
make_constraint_from (vi, vi->id);
|
||||
else
|
||||
make_constraint_from (vi, escaped_id);
|
||||
}
|
||||
|
||||
stats.total_vars++;
|
||||
if (use_field_sensitive
|
||||
|
|
Loading…
Add table
Reference in a new issue