Commit c8cfe96e by Richard Biener Committed by Richard Biener

re PR tree-optimization/69801 (gcc ICE on valid code on x86_64-linux-gnu in "operand_equal_p")

2016-02-16  Richard Biener  <rguenther@suse.de>

	PR middle-end/69801
	* fold-const.c (operand_equal_p): For COND_EXPR zero operand
	mask OEP_ADDRESS_OF.

	* gcc.dg/pr69801.c: New testcase.

From-SVN: r233444
parent 1262f780
2016-02-16 Richard Biener <rguenther@suse.de>
PR middle-end/69801
* fold-const.c (operand_equal_p): For COND_EXPR zero operand
mask OEP_ADDRESS_OF.
2016-02-16 Alan Modra <amodra@gmail.com>
PR target/68973
......
......@@ -3118,6 +3118,11 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
TREE_OPERAND (arg1, 0), flags));
case COND_EXPR:
if (! OP_SAME (1) || ! OP_SAME (2))
return 0;
flags &= ~OEP_ADDRESS_OF;
return OP_SAME (0);
case VEC_COND_EXPR:
case DOT_PROD_EXPR:
return OP_SAME (0) && OP_SAME (1) && OP_SAME (2);
......
2016-02-16 Richard Biener <rguenther@suse.de>
PR middle-end/69801
* gcc.dg/pr69801.c: New testcase.
2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/69651
......
/* { dg-do compile } */
struct {
char c[1];
} b, c;
int d, e;
void fn1() { e ? (d ? b : c).c : (d ? b : c).c; }
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