mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 03:56:42 +00:00

Don't emit an error message for a possible implicit use of an external procedure when it is known that the symbol is not a procedure (e.g., an array). Fixes https://github.com/llvm/llvm-project/issues/62047 Differential Revision: https://reviews.llvm.org/D150789
16 lines
516 B
Fortran
16 lines
516 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
implicit none(external)
|
|
external x
|
|
integer :: f, i, arr(1) = [0]
|
|
call x
|
|
!ERROR: 'y' is an external procedure without the EXTERNAL attribute in a scope with IMPLICIT NONE(EXTERNAL)
|
|
call y
|
|
!ERROR: 'f' is an external procedure without the EXTERNAL attribute in a scope with IMPLICIT NONE(EXTERNAL)
|
|
i = f()
|
|
block
|
|
!ERROR: 'z' is an external procedure without the EXTERNAL attribute in a scope with IMPLICIT NONE(EXTERNAL)
|
|
call z
|
|
end block
|
|
print *, arr(1) ! no error
|
|
end
|