http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152

--- Comment #12 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 
2010-10-26 04:21:41 UTC ---
On Mon, Oct 25, 2010 at 12:34:10AM +0000, sgk at troutmask dot
apl.washington.edu 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.

New patch attached.  This passed regression testing.
Janus, you may want to glance over the patch.

Reply via email to