aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-01-16 09:40:16 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-16 09:40:16 +0000
commit3f2ec06a70b07a1088921e3e8144c39177b98517 (patch)
treefc6d702400be0fd59d870552e0212a004b075ee4 /gcc/fortran/trans-stmt.c
parentcab2264d17e4602aa2de844413c36a207ba4665a (diff)
downloadgcc-3f2ec06a70b07a1088921e3e8144c39177b98517.zip
gcc-3f2ec06a70b07a1088921e3e8144c39177b98517.tar.gz
gcc-3f2ec06a70b07a1088921e3e8144c39177b98517.tar.bz2
trans-expr.c (gfc_conv_function_call): Use fold_build2.
2006-01-16 Richard Guenther <rguenther@suse.de> * trans-expr.c (gfc_conv_function_call): Use fold_build2. * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst. * trans.c (gfc_trans_runtime_check): Don't fold the condition again. From-SVN: r109745
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index df93db6..44d5819 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -162,7 +162,8 @@ gfc_trans_goto (gfc_code * code)
assign_error =
gfc_build_cstring_const ("Assigned label is not a target label");
tmp = GFC_DECL_STRING_LEN (se.expr);
- tmp = build2 (NE_EXPR, boolean_type_node, tmp, integer_minus_one_node);
+ tmp = fold_build2 (NE_EXPR, boolean_type_node, tmp,
+ build_int_cst (TREE_TYPE (tmp), -1));
gfc_trans_runtime_check (tmp, assign_error, &se.pre);
assigned_goto = GFC_DECL_ASSIGN_ADDR (se.expr);