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

            Bug ID: 124189
           Summary: IMPORT can block intrinsics subprograms
           Product: gcc
           Version: 16.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: ---

The new IMPORT feature can block intrinsic subprogram due to confusion
over namespaces.  Consider,

  program foo
   implicit none
   real x
   x = 1.245
   x = sin(x)           ! This use of sin()
   print *, x
   call sub
   contains
      subroutine sub
         import, none   ! and this statement
         real x
         x = 3.
         x = sin(x)     ! causes an error here.
         print *, x
      end subroutine sub
  end

% gfcx -o z rrr.f90
rrr.f90:13:13:

   13 |          x = sin(x)
      |             1
Error: F2018: C8102 'sin' at (1) is host associated in a scope that has IMPORT,
NONE

Reply via email to