[Bug fortran/106035] New: F2018 allows an IMPORT statement within the BLOCK construct.

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 20 17:33:43 GMT 2022


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

            Bug ID: 106035
           Summary: F2018 allows an IMPORT statement within the BLOCK
                    construct.
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

% cat a.f90
program bug
   implicit none
   integer i
   i = 42
   block
      import none  ! <-- This is valid Fortran 2018
      integer j
      j = 12
      print *, j
   end block
   print *, i
end program bug

% gfortran -c a.f90
a.f90:6:13:

    6 |       import none
      |             1
Error: IMPORT statement at (1) only permitted in an INTERFACE body


More information about the Gcc-bugs mailing list