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
backward compatibility.
* doc/invoke.texi (-ftree-store-ccp): Remove documentation.
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
* gfortran.fortran-torture/compile/pr37236.f: New testcase.
--- /dev/null
+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
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
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