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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #0)
> % cat a.f90
> program bug
>    implicit none
>    integer i
>    i = 42
>    block
>       import none  ! <-- This is valid Fortran 2018

Note, there is a comma missing after import.  So this isn't valid.
One finds these things while implementing a patch.  The patch
includes a description of all constraints in F2018, but I did not
implement them all.  For example, this is invalid (assuming i and
j are available via host association)

interface
   subroutine foo
      import, only : i
      import
   end subroutine foo
end interface

as is

interface
   subroutine foo
      import, only : i
      import :: j
   end subroutine foo
end interface

To do this correctly, gfortran likely needs IMPORT_NONE, IMPORT_ONLY, and
IMPORT_ALL enumerators and then gfc_current_ns->has_import_set would be
set according to one of these instead of using just 0 and 1 for a namespace.

Reply via email to