diff options
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 324e52ecee0..25edd4aca4c 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -1,5 +1,5 @@ /* Matching subroutines in all sizes, shapes and colors. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Andy Vaught @@ -519,6 +519,13 @@ gfc_match_name (char *buffer) } while (ISALNUM (c) || c == '_' || (gfc_option.flag_dollar_ok && c == '$')); + if (c == '$' && !gfc_option.flag_dollar_ok) + { + gfc_error ("Invalid character '$' at %C. Use -fdollar-ok to allow it as an extension"); + return MATCH_ERROR; + } + + buffer[i] = '\0'; gfc_current_locus = old_loc; |