This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] SELECT TYPE with associate-name


Janus Weil wrote:
+      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 :)

This all looks fine to me basically. Regarding the construct_entities flag: That was part of my attempt to make block_7.f08 (I think it was that one, the XFAIL'ed test) work originally, but I deferred this. So the short answer is I'm aware of this flag and kept it in on purpose, but it is not currently used (should be in the future, though).


Maybe you could extract the common code building the BLOCK namespace in some short usability routine if you want (I'd try this if possible), but that's just a matter of preferrence.

Is the patch ok in the attached form? (I have regtested it again successfully.)

I think it's once again ok, but please also give Tobias another chance to look at your patch from his point of view. I did not in detail study your solutions to the problems he found with your first patch.


Thanks!

Daniel

--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]