re PR tree-optimization/70960 (ICE: tree check: expected ssa_name, have integer_cst...
authorRichard Biener <rguenther@suse.de>
Fri, 6 May 2016 10:18:59 +0000 (10:18 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 6 May 2016 10:18:59 +0000 (10:18 +0000)
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.

From-SVN: r235953

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/pr70960.f90 [new file with mode: 0644]
gcc/tree-if-conv.c

index b575931ddb6914d6ceedb7b9045082edae6690c1..ef437c5c5c933a971a2447d0b291a4709ff7525b 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-06  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/70960
+       * tree-if-conv.c (ifcvt_walk_pattern_tree): Handle non-SSA ops.
+
 2016-05-06  Oleg Endo  <olegendo@gcc.gnu.org>
 
        PR target/52933
index 762c2a8036748502d409a6e3119b3e7ecb3d0044..52caa638fe73801a5f85aae9238fb458cb8bb704 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-06  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/70960
+       * gfortran.fortran-torture/compile/pr70960.f90: New testcase.
+
 2016-05-06  Oleg Endo  <olegendo@gcc.gnu.org>
 
        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 (file)
index 0000000..675fb56
--- /dev/null
@@ -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
index 52292c36cd21a4a70c0a17f0996aacc4236d3500..3d7c613dc9cb63136869feb5f52c4f4b9e033d34 100644 (file)
@@ -2462,6 +2462,9 @@ ifcvt_walk_pattern_tree (tree var, vec<gimple *> *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;