This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug fortran/52846] [F2008] Support submodules - part 3/3
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Mikael Morin <mikael dot morin at sfr dot fr>
- Cc: Damian Rouson <damian at sourceryinstitute dot org>, "Bader, Reinhold" <Reinhold dot Bader at lrz dot de>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "salvatore dot filippone at uniroma2 dot it" <salvatore dot filippone at uniroma2 dot it>
- Date: Mon, 3 Aug 2015 14:36:27 +0200
- Subject: Re: [Bug fortran/52846] [F2008] Support submodules - part 3/3
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiJ-HQA97YRC0fSjR4KFxS=7ft8ci6YjYyO7AWGi_md+cw at mail dot gmail dot com> <55B10B58 dot 9000302 at sfr dot fr> <CAGkQGi+NODX-wo+HKOf1V9nD8PHUVdH9OSU_vaDHJct20DP0Tw at mail dot gmail dot com> <00370BD5-507A-42BF-9D59-E868BBAD3C94 at sourceryinstitute dot org> <CAGkQGiJDdTKbBrUYa-wG4iKHM7brF8=sGT=O6-gNgEEmfo0RXQ at mail dot gmail dot com> <55BF4611 dot 70609 at sfr dot fr>
Dear Mikael,
Thanks for your green light!
I have been mulling over the trans-decl part of the patch and having
been wondering if it is necessary. Without optimization, private
entities can be linked to. Given the discussion concerning the
combination of submodules and private entities, I wonder if this is
not sufficient? Within submodule scope, an advisory could be given for
undefined references to suggest recompiling the module without
optimization or making the entities public.
Cheers
Paul
On 3 August 2015 at 12:44, Mikael Morin <mikael.morin@sfr.fr> wrote:
> Le 29/07/2015 17:08, Paul Richard Thomas a Ãcrit :
>>
>> Dear All,
>>
>> On 24 July 2015 at 10:08, Damian Rouson <damian@sourceryinstitute.org>
>> wrote:
>>>
>>> I love this idea and had similar thoughts as well.
>>>
>>> :D
>>>
>>> Sent from my iPhone
>>>
>>>> On Jul 24, 2015, at 1:06 AM, Paul Richard Thomas
>>>> <paul.richard.thomas@gmail.com> wrote:
>>>>
>>>> Dear Mikael,
>>>>
>>>> It had crossed my mind also that a .mod and a .smod file could be
>>>> written. Normally, the .smod files are produced by the submodules
>>>> themselves, so that their descendants can pick up the symbols that
>>>> they generate. There is no reason at all why this could not be
>>>> implemented; early on in the development I did just this, although I
>>>> think that it would now be easier to modify this patch.
>>>>
>>>> One huge advantage of proceeding in this way is that any resulting
>>>> library can be distributed with the .mod file alone so that the
>>>> private entities are never exposed. The penalty is that a second file
>>>> is output.
>>>>
>>>> With best regards
>>>>
>>>> Paul
>>>>
>>
>> Please find attached the implementation of this suggestion.
>>
>> Bootstraps and regtests on FC21/x86_64 - OK for trunk or is the
>> original preferred?
>>
> There hasn't been a lot of voices about this among the other active and less
> active team members.
> I prefer this "private members to separate smod" variant.
> It's OK for trunk as far as I'm concerned.
> Thanks.
>
> Mikael
>
> PS: Regarding redundant initializations: rather have too many than too few.
> ;-)
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx