$> cat allocate.f90 INTEGER :: i ALLOCATE(i(3)) end $> gfortran-svn -g -Wall allocate.f90 allocate.f90:2.10: ALLOCATE(i(3)) 1 Error: Syntax error in ALLOCATE statement at (1) A message as "variable 'i' at (1) not a pointer or allocatable array" would be preferable.
In gfc_match_allocate m = gfc_match_variable (&tail->expr, 0); matches successfully, but it fails at: if (gfc_match (" )%t") != MATCH_YES) goto syntax; As "i" is scalar, it does not seem to match the "(4)" (or only partially) and thus it does not match " )%t".
The patch I submitted, here: http://gcc.gnu.org/ml/fortran/2008-12/msg00167.html gives troutmask:sgk[224] gfc4x -o z k.f90 k.f90:2.10: ALLOCATE(i(3)) 1 Error: Allocate-object at (1) is not a nonprocedure pointer or an allocatable variable
Fixed by revision 151023. No plans for a back port.