http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816
--- Comment #9 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-07 11:28:45 UTC --- Created attachment 29817 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29817 Another tentative patch This variant moves the namespace allocation to parse_select_type_block (parse.c), like it's done for associate blocks. This implies delaying name to symbol resolution for associate-name, i.e. register the name only in gfc_match_select_type, and wait for the namespace to be allocated in parse_select_type_block to retrieve the symbol.