CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
169 lines
6.6 KiB
Fortran
169 lines
6.6 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
|
|
|
|
module module_before_1
|
|
end
|
|
|
|
module module_before_2
|
|
end
|
|
|
|
block data block_data_before_1
|
|
end
|
|
|
|
block data block_data_before_2
|
|
end
|
|
|
|
subroutine explicit_before_1(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
subroutine explicit_before_2(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
subroutine implicit_before_1(a)
|
|
real :: a
|
|
end
|
|
|
|
subroutine implicit_before_2(a)
|
|
real :: a
|
|
end
|
|
|
|
function explicit_func_before_1(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
function explicit_func_before_2(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
function implicit_func_before_1(a)
|
|
real :: a
|
|
end
|
|
|
|
function implicit_func_before_2(a)
|
|
real :: a
|
|
end
|
|
|
|
program test
|
|
external justfine ! OK to name a BLOCK DATA if not called
|
|
!WARNING: The global entity 'module_before_1' corresponding to the local procedure 'module_before_1' is not a callable subprogram [-Wexternal-name-conflict]
|
|
external module_before_1
|
|
!WARNING: The global entity 'block_data_before_1' corresponding to the local procedure 'block_data_before_1' is not a callable subprogram [-Wexternal-name-conflict]
|
|
external block_data_before_1
|
|
!WARNING: The global subprogram 'explicit_before_1' should not be referenced via the implicit interface 'explicit_before_1' [-Wexternal-interface-mismatch]
|
|
external explicit_before_1
|
|
external implicit_before_1
|
|
!WARNING: The global subprogram 'explicit_func_before_1' should not be referenced via the implicit interface 'explicit_func_before_1' [-Wexternal-interface-mismatch]
|
|
external explicit_func_before_1
|
|
external implicit_func_before_1
|
|
!WARNING: The global entity 'module_after_1' corresponding to the local procedure 'module_after_1' is not a callable subprogram [-Wexternal-name-conflict]
|
|
external module_after_1
|
|
!WARNING: The global entity 'block_data_after_1' corresponding to the local procedure 'block_data_after_1' is not a callable subprogram [-Wexternal-name-conflict]
|
|
external block_data_after_1
|
|
!WARNING: The global subprogram 'explicit_after_1' should not be referenced via the implicit interface 'explicit_after_1' [-Wexternal-interface-mismatch]
|
|
external explicit_after_1
|
|
external implicit_after_1
|
|
!WARNING: The global subprogram 'explicit_func_after_1' should not be referenced via the implicit interface 'explicit_func_after_1' [-Wexternal-interface-mismatch]
|
|
external explicit_func_after_1
|
|
external implicit_func_after_1
|
|
call module_before_1
|
|
!ERROR: 'module_before_2' is not a callable procedure
|
|
call module_before_2
|
|
call block_data_before_1
|
|
!ERROR: 'block_data_before_2' is not a callable procedure
|
|
call block_data_before_2
|
|
call explicit_before_1(1.)
|
|
!ERROR: References to the procedure 'explicit_before_2' require an explicit interface
|
|
!BECAUSE: a dummy argument has the allocatable, asynchronous, optional, pointer, target, value, or volatile attribute
|
|
call explicit_before_2(1.)
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
call implicit_before_1
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
call implicit_before_2
|
|
print *, explicit_func_before_1(1.)
|
|
!ERROR: References to the procedure 'explicit_func_before_2' require an explicit interface
|
|
!BECAUSE: a dummy argument has the allocatable, asynchronous, optional, pointer, target, value, or volatile attribute
|
|
print *, explicit_func_before_2(1.)
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
print *, implicit_func_before_1()
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
print *, implicit_func_before_2()
|
|
call module_after_1
|
|
call module_after_2
|
|
call block_data_after_1
|
|
call block_data_after_2
|
|
call explicit_after_1(1.)
|
|
!ERROR: References to the procedure 'explicit_after_2' require an explicit interface
|
|
!BECAUSE: a dummy argument has the allocatable, asynchronous, optional, pointer, target, value, or volatile attribute
|
|
call explicit_after_2(1.)
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
call implicit_after_1
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
call implicit_after_2
|
|
print *, explicit_func_after_1(1.)
|
|
!ERROR: References to the procedure 'explicit_func_after_2' require an explicit interface
|
|
!BECAUSE: a dummy argument has the allocatable, asynchronous, optional, pointer, target, value, or volatile attribute
|
|
print *, explicit_func_after_2(1.)
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
print *, implicit_func_after_1()
|
|
!WARNING: If the procedure's interface were explicit, this reference would be in error [-Wknown-bad-implicit-interface]
|
|
!BECAUSE: Dummy argument 'a=' (#1) is not OPTIONAL and is not associated with an actual argument in this procedure reference
|
|
print *, implicit_func_after_2()
|
|
end program
|
|
|
|
block data justfine
|
|
end
|
|
|
|
module module_after_1
|
|
end
|
|
|
|
!ERROR: 'module_after_2' is already declared in this scoping unit
|
|
module module_after_2
|
|
end
|
|
|
|
block data block_data_after_1
|
|
end
|
|
|
|
!ERROR: BLOCK DATA 'block_data_after_2' has been called
|
|
block data block_data_after_2
|
|
end
|
|
|
|
subroutine explicit_after_1(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
subroutine explicit_after_2(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
subroutine implicit_after_1(a)
|
|
real :: a
|
|
end
|
|
|
|
subroutine implicit_after_2(a)
|
|
real :: a
|
|
end
|
|
|
|
function explicit_func_after_1(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
function explicit_func_after_2(a)
|
|
real, optional :: a
|
|
end
|
|
|
|
function implicit_func_after_1(a)
|
|
real :: a
|
|
end
|
|
|
|
function implicit_func_after_2(a)
|
|
real :: a
|
|
end
|