Hi Paul!

Am 24.07.25 um 08:07 schrieb Paul Richard Thomas:
I forgot to include subroutine tests. Please find attached the patch with
updated testcases.

Paul

On Wed, 23 Jul 2025 at 17:53, Paul Richard Thomas <
paul.richard.tho...@gmail.com> wrote:

Hi All,

The attached implements the F2018 generic statement, which has the same
semantics as the typebound version but can appear in any specification
statement.

As it says in the first comment in the patch, use is made of the existing,
typebound matching functions to obtain access-spec and generic-spec.  After
this the standard INTERFACE machinery is used.

I spent a stupidly long time allowing the mixing of generic statements
with generic interfaces until I realised that I was accepting ST_GENERIC in
the wrong place in parse_spec :-(

Regtests on x86_64/FC42 - OK for mainline?

Paul



The patch looks basically OK, although I stumbled across the following:

- testing the testcase with ifx and NAG (both of which required
 commenting the generic within the block, probably a bug in both),
 I needed to change in submodule subm the declaration

   real function realg (arg1, arg2)

 to

   real module function realg (arg1, arg2)

 otherwise they both complained.  Can you comment?

- I am a little confused about the handling of the access specification.
 After the first "public :: g", NAG complains about the

 generic, public :: g ...

 and only allows

 generic :: g ...

 Then duplicate public specifications are not allowed.  What do you think?

Thanks,
Harald


Reply via email to