https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85357

--- Comment #5 from c...@mnet-mail.de ---
It would be rather surprising if the Fortran standard viewed this as being
invalid code (the procedure in question is bound to a dervied type, 
hence should
be overridable).

Better to consult the standard to be sure (don't have a copy at hand,
unfortunately).

On 08/29/2018 09:47 PM, janus at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85357
>
> janus at gcc dot gnu.org changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |janus at gcc dot gnu.org
>
> --- Comment #4 from janus at gcc dot gnu.org ---
> I would argue that the code is actually invalid. A current trunk build shows:
>
>   23 |    use base
>      |       2
> ....
>   34 |    subroutine summation(self,i,j)
>      |                       1
> Error: Procedure ‘summation’ at (1) is already defined at (2)
>
> That's also what I get with all earlier versions I tried, and I think the 
> error
> is correct.
>
> The only bug I can see is the ICE that occurs with trunk (after the original
> error message and a couple of follow-up errors):
>
> f951: internal compiler error: Segmentation fault
> 0xc5ac8f crash_signal
>          /home/jweil/github/gcc/trunk/gcc/toplev.c:325
> 0x6a75b4 free_sym_tree
>          /home/jweil/github/gcc/trunk/gcc/fortran/symbol.c:3892
> 0x6a75bc free_sym_tree
>          /home/jweil/github/gcc/trunk/gcc/fortran/symbol.c:3892
> 0x6a75bc free_sym_tree
>          /home/jweil/github/gcc/trunk/gcc/fortran/symbol.c:3892
> 0x6a75bc free_sym_tree
>          /home/jweil/github/gcc/trunk/gcc/fortran/symbol.c:3892
> 0x6a75bc free_sym_tree
>          /home/jweil/github/gcc/trunk/gcc/fortran/symbol.c:3892
>
> Looks like an infinite recursion in 'free_sym_tree'.
>

Reply via email to