* dwarf2out.c (loc_descriptor_from_tree): Add handling for MIN_EXPR.

From-SVN: r79549
This commit is contained in:
J. Brobecker 2004-03-16 21:29:03 +00:00 committed by Joel Brobecker
parent 78fab00fb0
commit fd5580cb8e
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2004-03-16 J. Brobecker <brobecker@gnat.com>
* dwarf2out.c (loc_descriptor_from_tree): Add handling for MIN_EXPR.
2004-03-16 Nathanael Nerode <neroden@gcc.gnu.org>
PR bootstrap/12974

View File

@ -9011,11 +9011,17 @@ loc_descriptor_from_tree (tree loc, int addressp)
add_loc_descr (&ret, new_loc_descr (op, 0, 0));
break;
case MIN_EXPR:
case MAX_EXPR:
loc = build (COND_EXPR, TREE_TYPE (loc),
build (LT_EXPR, integer_type_node,
TREE_OPERAND (loc, 0), TREE_OPERAND (loc, 1)),
TREE_OPERAND (loc, 1), TREE_OPERAND (loc, 0));
{
const enum tree_code code =
TREE_CODE (loc) == MIN_EXPR ? GT_EXPR : LT_EXPR;
loc = build (COND_EXPR, TREE_TYPE (loc),
build (code, integer_type_node,
TREE_OPERAND (loc, 0), TREE_OPERAND (loc, 1)),
TREE_OPERAND (loc, 1), TREE_OPERAND (loc, 0));
}
/* ... fall through ... */