diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-11 21:31:35 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-11 21:31:35 +0000 |
commit | c9ff1de3ae81dc074cac1fcf12292d38f1224b33 (patch) | |
tree | f0f8bee8983ea715a8607999cc83e01bdcf62541 /libgfortran/intrinsics/string_intrinsics.c | |
parent | 4862826d55a2cdc42cfa3093b90349fc234dee6c (diff) | |
download | gcc-c9ff1de3ae81dc074cac1fcf12292d38f1224b33.tar.gz |
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 'libgfortran/intrinsics/string_intrinsics.c')
-rw-r--r-- | libgfortran/intrinsics/string_intrinsics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c index 3e0940f59ee..be028114476 100644 --- a/libgfortran/intrinsics/string_intrinsics.c +++ b/libgfortran/intrinsics/string_intrinsics.c @@ -79,7 +79,7 @@ export_proto(string_minmax); /* Strings of unequal length are extended with pad characters. */ -GFC_INTEGER_4 +int compare_string (GFC_INTEGER_4 len1, const char * s1, GFC_INTEGER_4 len2, const char * s2) { |