I have *not* checked the standard (F2008), but I think the following is invalid as "a" is not an array but a scalar. gfortran accepts it but does not print any value.
integer :: a(3) print *, shape(a(1)) end -- Summary: Accepts invalid: SHAPE with scalar Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45757