Commit 81fada9a by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/46985 (ICE: SIGSEGV in is_gimple_min_invariant…

re PR tree-optimization/46985 (ICE: SIGSEGV in is_gimple_min_invariant (gimple.c:2742) with -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-fre)

	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
parent 16923e7b
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> 2010-12-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/46915 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> 2010-12-18 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/46232 PR tree-optimization/46232
......
! 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
...@@ -2616,7 +2616,8 @@ instantiate_scev_r (basic_block instantiate_below, ...@@ -2616,7 +2616,8 @@ instantiate_scev_r (basic_block instantiate_below,
if (size_expr++ > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE)) if (size_expr++ > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE))
return chrec_dont_know; return chrec_dont_know;
if (automatically_generated_chrec_p (chrec) if (chrec == NULL_TREE
|| automatically_generated_chrec_p (chrec)
|| is_gimple_min_invariant (chrec)) || is_gimple_min_invariant (chrec))
return chrec; return chrec;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment