+ gfc_error ("Selector is not a named variable in SELECT TYPE statement "
+ "at %C. Please use associate-name.");
Remove the trailing fullstop. I am tempted to add an "an" before
associated name or alternately, I also like the idea of "ifort" to write
"associate-name=>":
"If selector expression in SELECT TYPE is not a named variable,
associate-name=> shall appear."
Maybe the following? "Selector in SELECT TYPE at %C is not a named
variable; use associate-name=>"
Alright, I changed this error message, and I also extended the
implementation such that every SELECT TYPE statement is put into a
BLOCK, with the effect that the associate-name for the selector as
well as the temporaries for the TYPE cases are local to that block.
The important stuff happens in gfc_match_select type, where I set up
the local namespace for the block, and in resolve_select_type, where I
generate the BLOCK code. This makes use of Daniel's BLOCK
implementation, and I hope it is in the sense of the inventor :)