https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65428
Harald Anlauf <anlauf at gmx dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gmx dot de --- Comment #2 from Harald Anlauf <anlauf at gmx dot de> --- (In reply to Francois-Xavier Coudert from comment #1) > The original example is Fortran 2003 (array constructor with type > specification). Here is a pure Fortran 95 example, which is also an > ice-on-valid-code: > > integer :: i > print *, (/ (/ (i, i=1,0) /) /) > end > > > Surprisingly, this constructor works OK when used as initializer: > > integer :: i > integer, parameter :: x(0) = (/ (/ (i, i=1,0) /) /) > print *, x > print *, (/ x /) > end Another data point: integer :: i print *, sum ( (/ (i, i=1,0) /) ) ! OK print *, sum ( (/ (/ (i, i=1,0) /) /) ) ! Error end pr65428.f90:3:17: print *, sum ( (/ (/ (i, i=1,0) /) /) ) ! Error 1 Error: 'array' argument of 'sum' intrinsic at (1) must be a numeric type