Commit 14e000de by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/61684 (ICE at -Os and above on x86_64-linux-gnu in tree…

re PR tree-optimization/61684 (ICE at -Os and above on x86_64-linux-gnu in tree check: expected ssa_name, have addr_expr in recognize_single_bit_test, at tree-ssa-ifcombine.c:238)

	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.

	* gcc.c-torture/compile/pr61684.c: New test.

From-SVN: r212290
parent 17bf6d25
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
......
/* 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;
}
......@@ -233,7 +233,8 @@ recognize_single_bit_test (gimple cond, tree *name, tree *bit, bool inv)
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));
......
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