Commit 1f39323f by Roger Sayle Committed by Roger Sayle

re PR fortran/22527 (fortran produces mismatch types in comparision with integer…

re PR fortran/22527 (fortran produces mismatch types in comparision with integer to logic assignment)


	PR fortran/22527
	* f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
	integer type when building an inequality.

From-SVN: r108341
parent 98bfa2fb
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
......
......@@ -257,7 +257,8 @@ gfc_truthvalue_conversion (tree expr)
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");
......
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