Commit 5f8ecf45 by Richard Guenther Committed by Richard Biener

re PR tree-optimization/36967 (segfault in is_gimple_real_type with…

re PR tree-optimization/36967 (segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math)

2008-07-30  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36967
	* tree-predcom.c (remove_stmt): Use gimple_assign_ssa_name_copy_p.
	Release defs of statements we remove.

	* gfortran.dg/pr36967.f: New testcase.

From-SVN: r138318
parent 44bfa35b
2008-07-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36967
* tree-predcom.c (remove_stmt): Use gimple_assign_ssa_name_copy_p.
Release defs of statements we remove.
2008-07-30 Nathan Froyd <froydnj@codesourcery.com>
* config/arm/arm.c (arm_expand_prologue): Use 0-length rtvec
......
2008-07-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36967
* gfortran.dg/pr36967.f: New testcase.
2008-07-30 Rafael Avila de Espindola <espindola@google.com>
* gcc.dg/visibility-14.c: New test.
......
! { dg-options "-O2 -fpredictive-commoning" }
subroutine foo(x,y,n)
integer n
real*8 y(n,n,n),x(n,n,n)
integer k, j, i
do k = 2, n-1
do j = 2, n-1
do I = 2, n-1
y(i,j,k) = y(i,j,k)
+ + (x(i-1,j-1,k)
+ + x(i,j-1,k-1)
+ + x(i,j+1,k-1)
+ + x(i,j+1,k+1)
+ + x(i+1,j,k+1))
+ + (x(i-1,j-1,k-1)
+ + x(i+1,j-1,k-1)
+ + x(i-1,j+1,k-1)
+ + x(i+1,j+1,k-1)
+ + x(i-1,j+1,k+1)
+ + x(i+1,j+1,k+1))
enddo
enddo
enddo
return
end
......@@ -1707,7 +1707,7 @@ remove_stmt (gimple stmt)
remove_phi_node (&psi, true);
if (!next
|| !gimple_assign_copy_p (next)
|| !gimple_assign_ssa_name_copy_p (next)
|| gimple_assign_rhs1 (next) != name)
return;
......@@ -1727,9 +1727,10 @@ remove_stmt (gimple stmt)
mark_virtual_ops_for_renaming (stmt);
gsi_remove (&bsi, true);
release_defs (stmt);
if (!next
|| !gimple_assign_copy_p (next)
|| !gimple_assign_ssa_name_copy_p (next)
|| gimple_assign_rhs1 (next) != name)
return;
......
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