http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52606
--- Comment #1 from Steven Bosscher <steven at gcc dot gnu.org> 2012-03-16 23:18:26 UTC --- Someting as trivial as the following would perhaps already help (not tested): Index: match.c =================================================================== --- match.c (revision 185477) +++ match.c (working copy) @@ -546,8 +546,8 @@ gfc_match_name (char *buffer) if (i > gfc_option.max_identifier_length) { - gfc_error ("Name at %C is too long"); - return MATCH_ERROR; + gfc_error_now ("Name at %C is too long"); + goto too_long_or_done; } old_loc = gfc_current_locus; @@ -555,6 +555,7 @@ gfc_match_name (char *buffer) } while (ISALNUM (c) || c == '_' || (gfc_option.flag_dollar_ok && c == '$')); +too_long_or_done: if (c == '$' && !gfc_option.flag_dollar_ok) { gfc_error ("Invalid character '$' at %C. Use -fdollar-ok to allow it " Ideally, we'd just accept long identifiers, but the maximum name length is hard-coded (GFC_MAX_SYMBOL_LEN) and already way too large. I want to change this to string pointers (probably using a string pool, maybe the GCC common implementation, TBD).