Commit 0f59b812 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/46307 (ICE with FMA_EXPR in DEBUG stmts)

	PR debug/46307
	* tree-ssa-operands.c (get_expr_operands): Handle FMA_EXPR.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	(op_code_prio): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.

	* gcc.dg/pr46307.c: New test.

From-SVN: r166351
parent fc36036b
2010-11-05 Jakub Jelinek <jakub@redhat.com>
PR debug/46307
* tree-ssa-operands.c (get_expr_operands): Handle FMA_EXPR.
* tree-pretty-print.c (dump_generic_node): Likewise.
(op_code_prio): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
2010-11-04 Paul Koning <ni1d@arrl.net>
* doc/md.texi (Machine Constraints): Correct formatting in PDP-11
......@@ -2360,6 +2360,7 @@ expand_debug_expr (tree exp)
case DOT_PROD_EXPR:
case WIDEN_MULT_PLUS_EXPR:
case WIDEN_MULT_MINUS_EXPR:
case FMA_EXPR:
goto ternary;
case TRUTH_ANDIF_EXPR:
......@@ -3201,6 +3202,9 @@ expand_debug_expr (tree exp)
}
return NULL;
case FMA_EXPR:
return gen_rtx_FMA (mode, op0, op1, op2);
default:
flag_unsupported:
#ifdef ENABLE_CHECKING
......
2010-11-05 Jakub Jelinek <jakub@redhat.com>
PR debug/46307
* gcc.dg/pr46307.c: New test.
2010-11-05 Jason Merrill <jason@redhat.com>
PR c++/46304
......
/* PR debug/46307 */
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
double fma (double, double, double);
double
foo (double x, double y, double z)
{
double a = x * y + z;
double b = __builtin_fma (x, y, z);
double c = fma (x, y, z);
return x / y / z;
}
......@@ -2040,6 +2040,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_string (buffer, " > ");
break;
case FMA_EXPR:
pp_string (buffer, " FMA_EXPR < ");
dump_generic_node (buffer, TREE_OPERAND (node, 0), spc, flags, false);
pp_string (buffer, ", ");
dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags, false);
pp_string (buffer, ", ");
dump_generic_node (buffer, TREE_OPERAND (node, 2), spc, flags, false);
pp_string (buffer, " > ");
break;
case OMP_PARALLEL:
pp_string (buffer, "#pragma omp parallel");
dump_omp_clauses (buffer, OMP_PARALLEL_CLAUSES (node), spc, flags);
......@@ -2546,6 +2556,7 @@ op_code_prio (enum tree_code code)
case CEIL_MOD_EXPR:
case FLOOR_MOD_EXPR:
case ROUND_MOD_EXPR:
case FMA_EXPR:
return 13;
case TRUTH_NOT_EXPR:
......
......@@ -999,6 +999,7 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
case REALIGN_LOAD_EXPR:
case WIDEN_MULT_PLUS_EXPR:
case WIDEN_MULT_MINUS_EXPR:
case FMA_EXPR:
{
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);
......
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