http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46484
Summary: Should reject ALLOCATED(non-variable expression ) Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org gfortran should reject non-variable expressions for ALLOCATED: "13.7.11 ALLOCATED (ARRAY) or ALLOCATED (SCALAR) Description. Query allocation status. Class. Inquiry function. Arguments. ARRAY shall be an allocatable array. SCALAR shall be an allocatable scalar." Test case: implicit none logical :: ll ll = allocated (f()) contains function f() integer, allocatable :: f end function f end