Commit 31579a22 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/36257 (SPREAD gives wrong results with array CHARACTER parameters)

	PR fortran/36257

	* gfortran.dg/char_length_12.f90: New test.

	* iresolve.c (check_charlen_present): Don't force the rank to 1.

From-SVN: r135723
parent fb291f50
2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36257
* iresolve.c (check_charlen_present): Don't force the rank to 1.
2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36265
......
......@@ -75,11 +75,8 @@ check_charlen_present (gfc_expr *source)
source->rank = 0;
}
else if (source->expr_type == EXPR_ARRAY)
{
source->ts.cl->length =
source->ts.cl->length =
gfc_int_expr (source->value.constructor->expr->value.character.length);
source->rank = 1;
}
}
/* Helper function for resolving the "mask" argument. */
......
2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/36257
* gfortran.dg/char_length_12.f90: New test.
2008-05-20 Nathan Sidwell <nathan@codesourcery.com>
* gcc.c-torture/execute/builtins/memops-asm.c: Set inside_main.
......
! { dg-do run }
implicit none
character(len=3), dimension(3,3), parameter :: &
p = reshape(["xyz", "abc", "mkl", "vpn", "lsd", "epo", "tgv", &
"bbc", "wto"], [3,3])
character(len=3), dimension(3,3) :: m1
m1 = p
if (any (spread (p, 1, 2) /= spread (m1, 1, 2))) call abort
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment