Commit f8627856 by Steven Bosscher

* convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.

From-SVN: r185174
parent b364b425
2012-03-10 Steven Bosscher <steven@gcc.gnu.org>
* convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant.
2012-03-09 Steven Bosscher <steven@gcc.gnu.org> 2012-03-09 Steven Bosscher <steven@gcc.gnu.org>
* Make-lang.in (convert.o): Depend on convert.h. * Make-lang.in (convert.o): Depend on convert.h.
......
...@@ -95,7 +95,8 @@ convert (tree type, tree expr) ...@@ -95,7 +95,8 @@ convert (tree type, tree expr)
if (code == VOID_TYPE) if (code == VOID_TYPE)
return fold_build1_loc (input_location, CONVERT_EXPR, type, e); return fold_build1_loc (input_location, CONVERT_EXPR, type, e);
if (code == BOOLEAN_TYPE) if (code == BOOLEAN_TYPE)
return truthvalue_conversion (e); return fold_build1_loc (input_location, NOP_EXPR, type,
truthvalue_conversion (e));
if (code == INTEGER_TYPE) if (code == INTEGER_TYPE)
return fold (convert_to_integer (type, e)); return fold (convert_to_integer (type, e));
if (code == POINTER_TYPE || code == REFERENCE_TYPE) if (code == POINTER_TYPE || code == REFERENCE_TYPE)
......
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