http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152
--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-10-23 20:18:40 UTC --- On Sat, Oct 23, 2010 at 07:50:55PM +0000, burnus at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46152 > > --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-23 > 19:50:52 UTC --- > (In reply to comment #3) > > > implicit none ! << crucial > > > integer, allocatable :: a > > > > It even more crucial that 'a' is a scalar. > > Note really, if I comment-out the "allocate(integer :: a)" line I get: > > allocate (integer :: b(1)) > 1 > Error: 'integer' at (1) is not an accessible derived type > Oh! I've fixed that once. This is due to janus' changes in match_type_spec to allow derived types in the type-spec. If you change match_type_spec to have #if 0 m = match_derived_type_spec (ts); if (m == MATCH_YES) { old_locus = gfc_current_locus; if (gfc_match (" :: ") != MATCH_YES) return MATCH_ERROR; gfc_current_locus = old_locus; /* Enfore F03:C401. */ if (ts->u.derived->attr.abstract) { gfc_error ("Derived type '%s' at %L may not be ABSTRACT", ts->u.derived->name, &old_locus); return MATCH_ERROR; } return MATCH_YES; } #endif the longer example code I posted will compile.