------- Comment #4 from dfranke at gcc dot gnu dot org 2009-01-24 18:39 ------- After adding the the missing checks to gfc_check_cshift() and gfc_check_eoshift() respectively, I get a couple of errors for gfortran.dg/zero_sized_1.f90:
$> gfortran-svn -g -Wall -W zero_sized_1.f90 zero_sized_1.f90:18.36: if (any(cshift(tempm(5:4,:),shift=(/1,-1/),dim=2)/= 0)) call abort 1 Error: 'shift' argument of 'cshift' intrinsic at (1) has invalid shape in dimension 1 (0/2) [... snipped more ...] zero_sized_1.f90:37.37: if (any(eoshift(tempm(5:4,:),shift=(/1,-1/),dim=2)/= 0)) call abort 1 Error: 'shift' argument of 'eoshift' intrinsic at (1) has invalid shape in dimension 1 (0/2) [... snipped more ...] In comparison, Intel-10.1 accepts it as is while Lahey rejects it with similar (but less detailed) error messages. Are runtime checks required to check the shape of the other arguments if ARRAY is zero-sized? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36874