On Thu, Aug 07, 2025 at 10:02:33PM +0100, Paul Richard Thomas wrote:
> Hi Jerry et al.,
>
> I attached an earlier version of the patch - apologies!
>
> Please find the latest attached.
>
Thanks for taking my comments into account. The
patch passes regression testing on amf64-*-freebsd.
The only minor cosmetic thing I found is the locus
points to a slightly confusing location.
% gfcx -o z -fmax-errors=1 g1.f90 && ./z
g1.f90:6:30:
6 | generic, private :: bar => bak
| 1
Error: The access specification at (1) conflicts with that
already given to 'bar'
If I move
+ memset (&tbattr, 0, sizeof (tbattr));
+ tbattr.where = gfc_current_locus;
The above line from here ...
+ /* See if we get an access-specifier. */
+ m = match_binding_attributes (&tbattr, true, false);
+ if (m == MATCH_ERROR)
+ goto error;
... to here, and update the error message
+ if (generic_spec->attr.access != tbattr.access)
+ {
+ gfc_error ("The access specification at %C conflicts with "
+ "that already given to %qs", generic_spec->name);
+ goto error;
+ }
to use %L and &tbattr.where to
if (generic_spec->attr.access != tbattr.access)
{
gfc_error ("The access specification at %L conflicts with "
"that already given to %qs",
i &tbattr.where, generic_spec->name);
goto error;
}
I get a better locus
% gfcx -o z -fmax-errors=1 g1.f90 && ./z
g1.f90:6:19:
6 | generic, private :: bar => bak
| 1
Error: The access specification at (1) conflicts with
that already given to 'bar'
Again, it's cosmetic. I'll leave up to you to decide if you
want to pursue %C to %L changes; otherwise, the patch is OK
with me.
--
Steve