mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-03 07:10:28 +08:00
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
This commit is contained in:
parent
db753da024
commit
a01de5ece5
@ -1,3 +1,8 @@
|
||||
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)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user