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
101 lines
3.7 KiB
Fortran
101 lines
3.7 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
|
|
! Allow the same external or intrinsic procedure to be use-associated
|
|
! by multiple paths when they are unambiguous.
|
|
module m1
|
|
intrinsic :: sin
|
|
intrinsic :: iabs
|
|
interface
|
|
subroutine ext1(a, b)
|
|
integer, intent(in) :: a(:)
|
|
real, intent(in) :: b(:)
|
|
end subroutine
|
|
subroutine ext2(a, b)
|
|
real, intent(in) :: a(:)
|
|
integer, intent(in) :: b(:)
|
|
end subroutine
|
|
end interface
|
|
end module m1
|
|
|
|
module m2
|
|
intrinsic :: sin, tan
|
|
intrinsic :: iabs, idim
|
|
interface
|
|
subroutine ext1(a, b)
|
|
integer, intent(in) :: a(:)
|
|
real, intent(in) :: b(:)
|
|
end subroutine
|
|
subroutine ext2(a, b)
|
|
real, intent(in) :: a(:)
|
|
integer, intent(in) :: b(:)
|
|
end subroutine
|
|
end interface
|
|
end module m2
|
|
|
|
subroutine s2a
|
|
use m1
|
|
use m2
|
|
!PORTABILITY: Procedure pointer 'p1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(sin), pointer :: p1 => sin
|
|
!PORTABILITY: Procedure pointer 'p2' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iabs), pointer :: p2 => iabs
|
|
procedure(ext1), pointer :: p3 => ext1
|
|
procedure(ext2), pointer :: p4 => ext2
|
|
end subroutine
|
|
|
|
subroutine s2b
|
|
use m1, only: x1 => sin, x2 => iabs, x3 => ext1, x4 => ext2
|
|
use m2, only: x1 => sin, x2 => iabs, x3 => ext1, x4 => ext2
|
|
use m1, only: iface1 => sin, iface2 => iabs, iface3 => ext1, iface4 => ext2
|
|
!PORTABILITY: Procedure pointer 'p1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iface1), pointer :: p1 => x1
|
|
!PORTABILITY: Procedure pointer 'p2' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iface2), pointer :: p2 => x2
|
|
procedure(iface3), pointer :: p3 => x3
|
|
procedure(iface4), pointer :: p4 => x4
|
|
end subroutine
|
|
|
|
module m3
|
|
use m1
|
|
use m2
|
|
end module
|
|
subroutine s3
|
|
use m3
|
|
!PORTABILITY: Procedure pointer 'p1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(sin), pointer :: p1 => sin
|
|
!PORTABILITY: Procedure pointer 'p2' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iabs), pointer :: p2 => iabs
|
|
procedure(ext1), pointer :: p3 => ext1
|
|
procedure(ext2), pointer :: p4 => ext2
|
|
end subroutine
|
|
|
|
module m4
|
|
use m1, only: x1 => sin, x2 => iabs, x3 => ext1, x4 => ext2
|
|
use m2, only: x1 => sin, x2 => iabs, x3 => ext1, x4 => ext2
|
|
end module
|
|
subroutine s4
|
|
use m4
|
|
use m1, only: iface1 => sin, iface2 => iabs, iface3 => ext1, iface4 => ext2
|
|
!PORTABILITY: Procedure pointer 'p1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iface1), pointer :: p1 => x1
|
|
!PORTABILITY: Procedure pointer 'p2' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
procedure(iface2), pointer :: p2 => x2
|
|
procedure(iface3), pointer :: p3 => x3
|
|
procedure(iface4), pointer :: p4 => x4
|
|
end subroutine
|
|
|
|
subroutine s5
|
|
use m1, only: x1 => sin, x2 => iabs, x3 => ext1, x4 => ext2
|
|
use m2, only: x1 => tan, x2 => idim, x3 => ext2, x4 => ext1
|
|
use m1, only: iface1 => sin, iface2 => iabs, iface3 => ext1, iface4 => ext2
|
|
!PORTABILITY: Procedure pointer 'p1' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
!ERROR: Reference to 'x1' is ambiguous
|
|
procedure(iface1), pointer :: p1 => x1
|
|
!PORTABILITY: Procedure pointer 'p2' should not have an ELEMENTAL intrinsic as its interface [-Wportability]
|
|
!ERROR: Reference to 'x2' is ambiguous
|
|
procedure(iface2), pointer :: p2 => x2
|
|
!ERROR: Reference to 'x3' is ambiguous
|
|
procedure(iface3), pointer :: p3 => x3
|
|
!ERROR: Reference to 'x4' is ambiguous
|
|
procedure(iface4), pointer :: p4 => x4
|
|
end subroutine
|