https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65542
Bug ID: 65542 Summary: SPREAD intrinsic incorrectly accepted in initialization expressions with -std=f95 Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: spam.brian.taylor at gmail dot com Prior to the Fortran 2003 standard, only a subset of transformational intrinsic functions were allowed in initialization expressions (specifically: REPEAT, RESHAPE, SELECTED_INT_KIND, SELECTED_REAL_KIND, TRANSFER, and TRIM). See Fortran 95 ISO draft standard, section 7.1.6.1, lines 9-11, page 94. The following code should not compile with -std=f95: module bug integer :: ibug(42) = spread(42, 1, 42) end module