This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR fortran/37193: USE m, ONLY: i, j => i
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Daniel Kraft" <d at domob dot eu>
- Cc: "Tobias Burnus" <burnus at net-b dot de>, "Fortran List" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 1 Sep 2008 14:20:34 +0200
- Subject: Re: [Patch, Fortran] PR fortran/37193: USE m, ONLY: i, j => i
- References: <48B961CD.8060606@domob.eu> <339c37f20808300905w11d0cc06x805f6d6c899ab32d@mail.gmail.com> <48B97648.4090705@domob.eu> <339c37f20808301016j4157ff60u54d45c9b0a50fe09@mail.gmail.com> <48B989DD.6010304@domob.eu> <48BB9B8C.9010209@net-b.de> <48BBD381.3000801@domob.eu>
Daniel,
> The assertion fails e.g. on use_only_1.f90. I can only speculate here, but
> my interpretation is this:
I thought that this might be the case.
>
> load_needed() loads symbols that are "needed" for the ones USE'd (in
> use_only_1.f90, on USE'ing mod2::yfoobar (an INTERFACE) the procedures that
> are part of this interface are needed) and those can be symbols not listed
> in the USE...ONLY and thus the initialization there is necessary as is the
> one I added to get round the problem the PR was about.
>
> I've added a comment to my new line explaining why we need to initialize
> here and would suggest to take the patch as it is; but maybe you can come up
> with a better solution as you probably know the code better than I do.
> Otherwise, ok to commit?
I think that we had better take the pragmatic view - it works.
"probably" is the operative word here - I wade into module.c every 6
months or so and have to learn afresh each time..... as I am doing
right now.
OK to commit.
Cheers
Paul