From: Richard Biener Date: Fri, 6 May 2016 10:18:59 +0000 (+0000) Subject: re PR tree-optimization/70960 (ICE: tree check: expected ssa_name, have integer_cst... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=078f7e37ba6e00cc64b6c5ffb5f7e0c596d9c0a9;p=gcc.git re PR tree-optimization/70960 (ICE: tree check: expected ssa_name, have integer_cst in ifcvt_walk_pattern_tree, at tree-if-conv.c:2465) 2016-05-06 Richard Biener PR tree-optimization/70960 * tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops. * gfortran.fortran-torture/compile/pr70960.f90: New testcase. From-SVN: r235953 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b575931ddb6..ef437c5c5c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-06 Richard Biener + + PR tree-optimization/70960 + * tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops. + 2016-05-06 Oleg Endo PR target/52933 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 762c2a80367..52caa638fe7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-06 Richard Biener + + PR tree-optimization/70960 + * gfortran.fortran-torture/compile/pr70960.f90: New testcase. + 2016-05-06 Oleg Endo PR target/52933 diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 new file mode 100644 index 00000000000..675fb56ad6c --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 @@ -0,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 diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 52292c36cd2..3d7c613dc9c 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2462,6 +2462,9 @@ ifcvt_walk_pattern_tree (tree var, vec *defuse_list, 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;