From: Roger Sayle Date: Fri, 18 Jun 2004 03:35:29 +0000 (+0000) Subject: fold-const.c (constant_boolean_node): Handle boolean_type_node directly... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bb80bb2de9425d04f47d3570d1ccde5e383e66d;p=gcc.git fold-const.c (constant_boolean_node): Handle boolean_type_node directly... * fold-const.c (constant_boolean_node): Handle boolean_type_node directly, return either boolean_true_node or boolean_false_node. From-SVN: r83338 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c9ad8454ef..959012f4d1b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-17 Roger Sayle + + * fold-const.c (constant_boolean_node): Handle boolean_type_node + directly, return either boolean_true_node or boolean_false_node. + 2004-06-18 Kelley Cook * opts.sh: Delete. Break out generated code to next four files. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 3494d4af41c..f559fffeede 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4936,6 +4936,8 @@ constant_boolean_node (int value, tree type) { if (type == integer_type_node) return value ? integer_one_node : integer_zero_node; + else if (type == boolean_type_node) + return value ? boolean_true_node : boolean_false_node; else if (TREE_CODE (type) == BOOLEAN_TYPE) return lang_hooks.truthvalue_conversion (value ? integer_one_node : integer_zero_node);