public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/25708] Module loading is not good at all
Date: Tue, 31 Oct 2006 08:29:00 -0000	[thread overview]
Message-ID: <20061031082937.959.qmail@sourceware.org> (raw)
In-Reply-To: <bug-25708-6528@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]



------- Comment #5 from paul dot richard dot thomas at cea dot fr  2006-10-31 08:29 -------
Subject: RE:  Module loading is not good at all

FX

> -----Message d'origine-----
> De : fxcoudert at gcc dot gnu dot org 
> [mailto:gcc-bugzilla@gcc.gnu.org]
> Envoyé : mardi 31 octobre 2006 08:01
>
> I like that idea. I've looked at the code in symbol.c, and 
> don't see clearly
> how to get it done (where do you get the master symtree from, eg?)
> 

I haven't really thought about this enough yet but.....

(i) I think that a namespace will have to be built for each module.  This will
allow the initial part of read_module to be left completely unmodified. *grin*

(ii) The namespaces should be contained in a linked list or binary tree; the
structures should be something like

typedef struct gfc_module_namespace
{
  const char *name;
  struct gfc_module_namespace *next;
  maybe some attributes?;
}
gfc_module_namespace;

I think that a list should be sufficient, since numbers of modules are likely
to remain limited for real-life codes.... aren't they?  Or is your 25Mb monster
an indication that I am wrong?

(iii) As the modules get USEd, new symtrees are added to the current namespace
and I think that it is OK to point to the symbols in the module namespaces.
This would simplify derived type association a lot.  I have not the foggiest
idea what to do about interfaces; they are on my list of urgent things to try
to understand.  I am about to create a meta-bug of interface PRs. I had a
notion to look at modules after I had had a stab at that.

(There is a PR on doubly USEd interfaces that I had a stab at in the airport
last Friday - I got absolutely nowhere; even though I thought that I was
touching the right places, it had no effect on the fault!  This is one and the
same problem of doubly USEd variables that I fixed by explicitly going through
and checking each against the other.  To do likewise for interfaces requires
some understanding!  I note, however, that these problems are fixed in g95 and
there is no sign whatsoever of the corresponding fixes... It is a crying shame
that Andy Vaught is not on-side.) 

(iv) As at present, the symtree carries the local name and the symbol the true
name - that's why I think that the symbols can be shared.

Regards

Paul

(v) Clearly, a clean-up at the end of the compilation of the file will have to
be done but all the mechanisms to do that exist already.

As I say, the problems are a) interfaces, b) interfaces and c) interfaces.

Ciao

Paul


-- 


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


  parent reply	other threads:[~2006-10-31  8:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-07  5:05 [Bug fortran/25708] New: " pinskia at gcc dot gnu dot org
2006-01-07  5:10 ` [Bug fortran/25708] " pinskia at gcc dot gnu dot org
2006-01-09  7:37 ` paul dot richard dot thomas at cea dot fr
2006-10-02 11:24 ` fxcoudert at gcc dot gnu dot org
2006-10-31  7:00 ` fxcoudert at gcc dot gnu dot org
2006-10-31  8:29 ` paul dot richard dot thomas at cea dot fr [this message]
2007-01-15 10:28 ` pault at gcc dot gnu dot org
2007-04-25  8:42 ` jb at gcc dot gnu dot org
2007-05-02  7:41 ` pault at gcc dot gnu dot org
     [not found] <bug-25708-4@http.gcc.gnu.org/bugzilla/>
2010-09-29 15:12 ` burnus at gcc dot gnu.org
2011-04-03 18:33 ` jvdelisle at gcc dot gnu.org
2011-04-04 11:51 ` pault at gcc dot gnu.org
2011-04-04 12:35 ` burnus at gcc dot gnu.org
2011-04-05  4:47 ` jvdelisle at gcc dot gnu.org
2011-04-05  5:25 ` jvdelisle at gcc dot gnu.org
2011-04-05  5:35 ` jb at gcc dot gnu.org
2011-04-10 17:47 ` jvdelisle at gcc dot gnu.org
2011-11-30 19:57 ` Joost.VandeVondele at mat dot ethz.ch
2011-12-01  7:30 ` Joost.VandeVondele at mat dot ethz.ch
2011-12-01 14:13 ` jb at gcc dot gnu.org
2011-12-03 13:29 ` jvdelisle at gcc dot gnu.org
2012-08-24 14:02 ` Joost.VandeVondele at mat dot ethz.ch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061031082937.959.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).