* f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
integer type when building an inequality.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108341
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-12-09 Roger Sayle <roger@eyesopen.com>
+
+ PR fortran/22527
+ * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
+ integer type when building an inequality.
+
2005-12-09 Richard Guenther <rguenther@suse.de>
* f95-lang.c (build_builtin_fntypes): Use correct
if (TREE_CODE (expr) == INTEGER_CST)
return integer_zerop (expr) ? boolean_false_node : boolean_true_node;
else
- return build2 (NE_EXPR, boolean_type_node, expr, integer_zero_node);
+ return build2 (NE_EXPR, boolean_type_node, expr,
+ build_int_cst (TREE_TYPE (expr), 0));
default:
internal_error ("Unexpected type in truthvalue_conversion");