From: J. Brobecker Date: Tue, 16 Mar 2004 21:29:03 +0000 (+0000) Subject: * dwarf2out.c (loc_descriptor_from_tree): Add handling for MIN_EXPR. X-Git-Tag: releases/gcc-4.0.0~9367 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd5580cb8e3d9bb30d5c241ef8236e613c4d0fd6;p=thirdparty%2Fgcc.git * dwarf2out.c (loc_descriptor_from_tree): Add handling for MIN_EXPR. From-SVN: r79549 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index df135a4ac629..d5a91c1120a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-03-16 J. Brobecker + + * dwarf2out.c (loc_descriptor_from_tree): Add handling for MIN_EXPR. + 2004-03-16 Nathanael Nerode PR bootstrap/12974 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a9639c3f4a99..2fcc150b9312 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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 ... */