PR tree-optimization/46985
* tree-scalar-evolution.c (instantiate_scev_r): If chrec is NULL,
return it immediately.
* gfortran.dg/pr46985.f90: New test.
From-SVN: r168027
+2010-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46985
+ * tree-scalar-evolution.c (instantiate_scev_r): If chrec is NULL,
+ return it immediately.
+
2010-12-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/46915
+2010-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46985
+ * gfortran.dg/pr46985.f90: New test.
+
2010-12-18 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/46232
--- /dev/null
+! PR tree-optimization/46985
+! { dg-do compile }
+! { dg-options "-O -ftree-pre -ftree-vrp -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre" }
+
+ type :: t
+ integer :: i
+ end type t
+ type(t), target :: tar(2) = (/t(2), t(4)/)
+ integer, pointer :: ptr(:)
+ ptr => tar%i
+ call foo (ptr)
+contains
+ subroutine foo (arg)
+ integer :: arg(:)
+ arg = arg - 1
+ end subroutine
+end
if (size_expr++ > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return chrec_dont_know;
- if (automatically_generated_chrec_p (chrec)
+ if (chrec == NULL_TREE
+ || automatically_generated_chrec_p (chrec)
|| is_gimple_min_invariant (chrec))
return chrec;