Commit a01de5ec by Roger Sayle Committed by Roger Sayle

trans-io.c (set_string): Use fold_build2 and build_int_cst instead of build2 and…

trans-io.c (set_string): Use fold_build2 and build_int_cst instead of build2 and convert to construct "x...


	* trans-io.c (set_string): Use fold_build2 and build_int_cst instead
	of build2 and convert to construct "x < 0" rather than "x <= -1".

From-SVN: r112968
parent db753da0
2006-04-14 Roger Sayle <roger@eyesopen.com>
* trans-io.c (set_string): Use fold_build2 and build_int_cst instead
of build2 and convert to construct "x < 0" rather than "x <= -1".
2006-04-13 Richard Henderson <rth@redhat.com>
* trans-openmp.c (gfc_trans_omp_sections): Adjust for changed
......
......@@ -532,8 +532,8 @@ set_string (stmtblock_t * block, stmtblock_t * postblock, tree var,
msg =
gfc_build_cstring_const ("Assigned label is not a format label");
tmp = GFC_DECL_STRING_LEN (se.expr);
tmp = build2 (LE_EXPR, boolean_type_node,
tmp, convert (TREE_TYPE (tmp), integer_minus_one_node));
tmp = fold_build2 (LT_EXPR, boolean_type_node,
tmp, build_int_cst (TREE_TYPE (tmp), 0));
gfc_trans_runtime_check (tmp, msg, &se.pre);
gfc_add_modify_expr (&se.pre, io,
fold_convert (TREE_TYPE (io), GFC_DECL_ASSIGN_ADDR (se.expr)));
......
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