re PR fortran/32937 (segfault with string and -fdefault-integer-8)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 11 Aug 2007 21:31:35 +0000 (21:31 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 11 Aug 2007 21:31:35 +0000 (21:31 +0000)
commitc9ff1de3ae81dc074cac1fcf12292d38f1224b33
treef0f8bee8983ea715a8607999cc83e01bdcf62541
parent4862826d55a2cdc42cfa3093b90349fc234dee6c
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
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/char_length_6.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/intrinsics/string_intrinsics.c
libgfortran/libgfortran.h