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, gfortran] PR22304, 17917, 16511, 18870 and 23270 - modules,equivalences and commons


Steven Bosscher wrote:

On Monday 22 August 2005 08:18, Paul Thomas wrote:

=================fortran.diff===============


Mostly looks good to me. One question:


+         /* Check to see if the symbol is already in an equivalence group.
+            If it is, set the other members as being in common.  */
+         if (sym->attr.in_equivalence)
+           {
+             for (e1 = gfc_current_ns->equiv; e1; e1 = e1->next)
+               {


What if the equivalenced sym is defined in the parent name space, or is that impossible?

I'll have a think about that and I'll check the standard too; I have not thought through the rules concerning the relative scopes of common and equivalences. An equivalence can be made with a host associated common variable but the reverse cannot be right, can it?

I just realised that I need to generalize the common block name demangling in module.c; you can be sure somebody will succeed in nesting modules 10 or more times! This is a trivial modification to the patch.

Paul


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