http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46299
Summary: Diagnose specification expressions involving host-associated vars with deferred bounds Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid, diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Crayftn diagnoses the following error while gfortran, NAG, g95 and ifort accept the program. My gut feeling is that cray is right, but I have not checked it. Maybe it also has changed between F95/F2003/F2008. integer :: x(size(A)) ^ ftn-812 crayftn: ERROR FOO, File = diag.f90, Line = 5, Column = 23 Object "A" is an argument to inquiry intrinsic "SIZE" in a declaration expression. Its array bounds must not be deferred. Using the example !--------------- integer, allocatable :: a(:) contains subroutine foo(x) integer :: x(size(A)) end subroutine end !--------------- If one changes "a" to "integer :: a(4)" it compiles without any error.