Hello world, here is a correct version of a fix for PR 44693. This contains the necessary special case for SPREAD (where dim can be one larger than the rank of the array), an expanded test case and a correction to an old test case. I think this is finally correct. Regression-tested, no new regressions. OK for trunk? Thomas 2010-07-06 Thomas Koenig PR fortran/PR44693 * check.c (dim_rank_check): Also check intrinsic functions. Adjust permissible rank for functions which reduce the rank of their argument. Spread is an exception, where DIM can be one larger than the rank of array. 2010-07-06 Thomas Koenig PR fortran/PR44693 * gfortran.dg/dim_range_1.f90: New test. * gfortran.dg/minmaxloc_4.f90: Remove invalid test.