http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57895
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic, | |ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2013-07-15 CC| |burnus at gcc dot gnu.org Known to work| |4.1.2 Ever confirmed|0 |1 Known to fail| |4.3.4, 4.5.3, 4.6.3, 4.7.3, | |4.8.1, 4.9.0 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- That's a regression. GCC 4.1 gives: Error: Syntax error in COMMON statement at (1) due to the '$' (and exits without failure). But GCC 4.3 and later segfault. I think one should apply the following patch to give a good error message (instead of none). However, it does not prevent the segfault. --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -557,6 +557,6 @@ gfc_match_name (char *buffer) if (c == '$' && !gfc_option.flag_dollar_ok) { - gfc_error ("Invalid character '$' at %C. Use -fdollar-ok to allow it " - "as an extension"); + gfc_error_now ("Invalid character '$' at %C. Use -fdollar-ok to allow it " + "as an extension"); return MATCH_ERROR; }