+2014-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61684
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
+
2014-07-04 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito@0xlab.org>
Monk Chiang <sh.chiang04@gmail.com>
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61684
+ * gcc.c-torture/compile/pr61684.c: New test.
+
2014-07-04 Thomas Schwinge <thomas@codesourcery.com>
* lib/g++-dg.exp (g++-dg-runtest): Change interface to match
--- /dev/null
+/* PR tree-optimization/61684 */
+
+int a, c;
+static int *b = 0;
+short d;
+static short **e = 0;
+
+void
+foo ()
+{
+ for (; c < 1; c++)
+ ;
+ *e = &d;
+ a = d && (c && 1) & *b;
+}
while (is_gimple_assign (stmt)
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
|| gimple_assign_ssa_name_copy_p (stmt)))
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));