Commit 2dc95548 by Paul Thomas

re PR fortran/33733 (ICEs in simplify_transfer)

2007-10-18  Paul Thomas  <pault@gcc.gnu.org>
	    Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/33733
	* simplify.c (gfc_simplify_transfer): Return null if the source
	expression is EXPR_FUNCTION.

2007-10-18  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33733
	* gfortran.dg/transfer_simplify_6.f90: New test.

From-SVN: r129435
parent 741e7594
......@@ -4011,6 +4011,9 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size)
|| !gfc_is_constant_expr (size))
return NULL;
if (source->expr_type == EXPR_FUNCTION)
return NULL;
/* Calculate the size of the source. */
if (source->expr_type == EXPR_ARRAY
&& gfc_array_size (source, &tmp) == FAILURE)
......
! { dg-do compile }
! Checks the fix for PR33733, in which the functions of arrays
! for the 'source' argument would cause an ICE.
!
! Contributed by FX Coudert <fxcoudert@gcc.gnu.org>
!
print *, transfer(sqrt([100.]), 0_1)
print *, transfer(achar([100]), 0_1)
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