http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152
--- Comment #9 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-10-25 00:33:49 UTC --- On Sat, Oct 23, 2010 at 06:50:21PM +0000, burnus at gcc dot gnu.org wrote: > > Compiling the following program: > > implicit none ! << crucial > integer, allocatable :: a > allocate (integer :: a) > end > > Fails with: > > allocate (integer :: a) > 1 > Error: Symbol 'integer' at (1) has no IMPLICIT type > I believe that this is due to gfc_match_symbol() in match_derived_type_spec(). If I understand gfc_match_symbol() correctly, then 'integer' is added to the symbol table of the current namespace. When match_derived_type_spec() returns either MATCH_NO or MATCH_ERROR, it does not clean up the namespace.