This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR70960
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 May 2016 12:14:10 +0200 (CEST)
- Subject: [PATCH] Fix PR70960
- Authentication-results: sourceware.org; auth=none
The following fixes $subject.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2016-05-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/70960
* tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops.
* gfortran.fortran-torture/compile/pr70960.f90: New testcase.
Index: gcc/tree-if-conv.c
===================================================================
*** gcc/tree-if-conv.c (revision 235945)
--- gcc/tree-if-conv.c (working copy)
*************** ifcvt_walk_pattern_tree (tree var, vec<g
*** 2462,2467 ****
--- 2462,2470 ----
enum tree_code code;
gimple *def_stmt;
+ if (TREE_CODE (var) != SSA_NAME)
+ return;
+
def_stmt = SSA_NAME_DEF_STMT (var);
if (gimple_code (def_stmt) != GIMPLE_ASSIGN)
return;
Index: gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90
===================================================================
*** gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 (revision 0)
--- gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 (working copy)
***************
*** 0 ****
--- 1,10 ----
+ SUBROUTINE calbrec(a,ai,error)
+ REAL(KIND=8) :: a(3,3), ai(3,3)
+ DO i = 1, 3
+ il = 1
+ IF (i==1) il = 2
+ DO j = 1, 3
+ ai(j,i) = (-1.0_8)**(i+j)*det*(a(il,jl)*a(iu,ju)-a(il,ju)*a(iu,jl))
+ END DO
+ END DO
+ END SUBROUTINE calbrec