[J3] USE statement – wish: permit specifying additionally the access-spec
Tobias Burnus
burnus at net-b.de
Fri Nov 15 16:00:38 UTC 2019
Hi all,
I want to suggest to permit the 'access-spec' to the use-stmt to set the
public/private default for the symbols use-associated (overridable by an
explicit access-stmt). – Thoughs?
Real-world use case the following:
I have two modules, one contains some definitions of parameters and the
other contains some internal procedures. I now use-associate the two and
what I would like to do is the following.
Note the 'use, private' and 'use, public' with the access-spec.
Currently, I end up using 'private' and then adding 'public' for all
symbols from 'openacc_kinds', which is neither very readable nor
maintainable.
module openacc
use, private :: openacc_internal
use, public :: openacc_kinds
implicit none (type, external)
private
public :: acc_get_num_devices
interface acc_get_device_type
! shall be private, from openacc_internal
procedure :: acc_get_device_type_h
end interface
Tobias
PS: The current version of the real-world file is
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgomp/openacc.f90;hb=refs/heads/trunk
Some additions are in the pipeline (submitted) and I was looking at it
to do some public/private cleanup.
More information about the J3
mailing list