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

When -fimplicit-none-ext is passed, flang behaves as if "implicit none(external)" was specified for all relevant constructs in Fortran source file. Note: implicit17.f90 was based on implicit07.f90 with `implicit none(external)` removed and `-fimplicit-none-ext` added.
15 lines
512 B
Fortran
15 lines
512 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -fimplicit-none-ext
|
|
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
|