------- Comment #4 from burnus at gcc dot gnu dot org  2010-03-03 15:32 -------
Regarding the error message: The problem is the lazy evaluation of error
messages. If one sets a breakpoint at "gfc_error" one finds:

gfc_error (gmsgid=0xd25bd0 "Syntax error in %s statement at %C")
gfc_error (gmsgid=0xd33510 "Invalid character in name at %C")
gfc_error (gmsgid=0xd23678 "Syntax error in array constructor at %C")
gfc_error (gmsgid=0xd33510 "Invalid character in name at %C")
gfc_error (gmsgid=0xd23678 "Syntax error in array constructor at %C")
gfc_error (gmsgid=0xd28d28 "FINAL declaration at %C must be inside a derived
type CONTAINS section")

Where only the last message is printed; I think the "Syntax error" call can
also appear in a valid programs (where it is never printed to the screen). One
way to force an error message is to use "gfc_error_now" - thus this change for
"Syntax error in array constructor" would work. (Caveat: Untested, might have
side effects, better fix could exist.)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43244

Reply via email to