------- Comment #1 from burnus at gcc dot gnu dot org 2009-06-29 15:17 ------- I agree that && (gfc_option.flag_dollar_ok && c != '$')) is wrong and is should either be && !(gfc_option.flag_dollar_ok && c == '$')) ^^^ ^^ or equivalently && (!gfc_option.flag_dollar_ok || c != '$')) ^^^ ^^
The current version accepts with -fno-dollar-ok all characters '$', '@" etc. while for -fdollar-ok only '$' is allowed. However, those lines are in match_charkind_name. As the variable_"string" is parsed before (in gfc_match_name), the invalid character is noted before correctly. Thus if (!ISALNUM (c) && c != '_' && c != '$') is equivalent, taking the previous gfc_match_name into account. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40588