[Bug fortran/34432] integer(kind=init_expression) function is rejected
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Dec 14 14:00:00 GMT 2007
------- Comment #2 from burnus at gcc dot gnu dot org 2007-12-14 14:00 -------
The problem for (...) expressions is:
In match_primary, several gfc_match_* are called, which all return MATCH_NO,
until gfc_match_char ('('), which returns true. (So far so good.)
However, before "gfc_match_char" there is a call to gfc_match_rvalue.
gfc_match_rvalue calls gfc_match_name -- and the latter not only returns
MATCH_NO, but also issues
if (gfc_error_flag_test() == 0)
gfc_error ("Invalid character in name at %C");
which is at the heart of the problem. Without the call to gfc_error, the
program works.
The next question is how to solve this without breaking the diagnostics. I'd
assume this affects much more expressions than this one.
I was thinking of a flag (like "bool match_only"), which means that on needs to
audit all 37 uses of gfc_match_name.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34432
More information about the Gcc-bugs
mailing list