aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-11 21:31:35 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-08-11 21:31:35 +0000
commitc9ff1de3ae81dc074cac1fcf12292d38f1224b33 (patch)
treef0f8bee8983ea715a8607999cc83e01bdcf62541 /gcc/fortran/trans-array.c
parent4862826d55a2cdc42cfa3093b90349fc234dee6c (diff)
downloadgcc-c9ff1de3ae81dc074cac1fcf12292d38f1224b33.zip
gcc-c9ff1de3ae81dc074cac1fcf12292d38f1224b33.tar.gz
gcc-c9ff1de3ae81dc074cac1fcf12292d38f1224b33.tar.bz2
re PR fortran/32937 (segfault with string and -fdefault-integer-8)
PR fortran/32937 * trans-array.c (gfc_conv_expr_descriptor): Use gfc_conv_const_charlen to generate backend_decl of right type. * trans-expr.c (gfc_conv_expr_op): Use correct return type. (gfc_build_compare_string): Use int type instead of default integer kind for single character comparison. (gfc_conv_aliased_arg): Give backend_decl the right type. * trans-decl.c (gfc_build_intrinsic_function_decls): Make compare_string return an int. * gfortran.dg/char_length_6.f90: New test. * intrinsics/string_intrinsics.c (compare_string): Return an int. * libgfortran.h (compare_string): Likewise. From-SVN: r127363
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 78b038a..1cf00fd 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -4573,9 +4573,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
else if (expr->ts.cl->length
&& expr->ts.cl->length->expr_type == EXPR_CONSTANT)
{
- expr->ts.cl->backend_decl
- = gfc_conv_mpz_to_tree (expr->ts.cl->length->value.integer,
- expr->ts.cl->length->ts.kind);
+ gfc_conv_const_charlen (expr->ts.cl);
loop.temp_ss->data.temp.type
= gfc_typenode_for_spec (&expr->ts);
loop.temp_ss->string_length