This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PRs 70031 and 69524 - submodule tweaks
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Damian Rouson <damian at sourceryinstitute dot org>
- Date: Sat, 12 Mar 2016 15:00:16 +0100
- Subject: Re: [Patch, fortran] PRs 70031 and 69524 - submodule tweaks
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGi+OO0OuXDN0Q0j8tZor0YCYjwi-9bKm=_CScGRbswXHaQ at mail dot gmail dot com> <56DE131A dot 1090705 at charter dot net>
Hi Jerry,
Thanks - committed as revision 234161.
All the best
Paul
On 8 March 2016 at 00:47, Jerry DeLisle <jvdelisle@charter.net> wrote:
> On 03/06/2016 10:18 AM, Paul Richard Thomas wrote:
>> Dear All,
>>
>> These are two rather trivial modifications to permit, 'module' to
>> appear at any position in the list of prefixes in the procedure
>> declaration and to allow module procedures to appear within a module
>> contains section. I was rather astonished at this latter since it does
>> seem to be rather contrary to having an module interface declaration
>> for the same procedure. However, from the Fortran 2008 standard:
>>
>> C1247 (R1225) MODULE shall appear only in the function-stmt or
>> subroutine-stmt of a module subprogram or of a nonabstract interface
>> body that is declared in the scoping unit of a module or submodule.
>>
>> Whilst I was about it, I prevented an ICE from occurring following the
>> error generated by decl.c(copy_prefix), when prefixes in the interface
>> are repeated in the procedure declaration. I have not included a test
>> for this, since I am not convinced that repeating the prefixes is
>> strictly speaking an error. In fact, it would make a lot of sense to
>> repeat the interface declaration completely in the submodule
>> declaration. I will investigate further before committing. The fix is
>> even more trivial than preventing the ICE.
>>
>> Since the patch is entirely permissive, it will not prevent correct
>> code from compiling. In this sense, it is safe for stage 4.
>>
>> Bootstrapped and regtested on FC21/x86_64. OK for trunk?
>>
>> Best regards
>>
>> Paul
>>
> OK Paul, thanks for work.
>
> Jerry
--
The difference between genius and stupidity is; genius has its limits.
Albert Einstein