Files
TheRock/compiler/amd-llvm/flang/test/Semantics/symbol19.f90
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

52 lines
1.9 KiB
Fortran

! RUN: %python %S/test_symbols.py %s %flang_fc1
! Test that a procedure is only implicitly resolved as an intrinsic function
! (resp. subroutine) if this is a function (resp. subroutine)
!DEF: /expect_external (Subroutine) Subprogram
subroutine expect_external
!DEF: /acos EXTERNAL (Subroutine) ProcEntity
!DEF: /expect_external/x (Implicit) ObjectEntity REAL(4)
call acos(x)
!DEF: /expect_external/i (Implicit) ObjectEntity INTEGER(4)
!DEF: /system_clock EXTERNAL (Function, Implicit) ProcEntity REAL(4)
!DEF: /expect_external/icount (Implicit) ObjectEntity INTEGER(4)
i = system_clock(icount)
end subroutine
!DEF: /expect_intrinsic (Subroutine) Subprogram
subroutine expect_intrinsic
!DEF: /expect_intrinsic/y (Implicit) ObjectEntity REAL(4)
!DEF: /expect_intrinsic/acos ELEMENTAL, INTRINSIC, PURE (Function) ProcEntity
!DEF: /expect_intrinsic/x (Implicit) ObjectEntity REAL(4)
y = acos(x)
!DEF: /expect_intrinsic/system_clock INTRINSIC (Subroutine) ProcEntity
!DEF: /expect_intrinsic/icount (Implicit) ObjectEntity INTEGER(4)
call system_clock(icount)
end subroutine
! Sanity check that the EXTERNAL attribute is not bypassed by
! implicit intrinsic resolution, even if it otherwise perfectly
! matches an intrinsic call.
!DEF: /expect_external_2 (Subroutine) Subprogram
subroutine expect_external_2
!DEF: /expect_external_2/matmul EXTERNAL (Function, Implicit) ProcEntity INTEGER(4)
external :: matmul
!DEF: /expect_external_2/cpu_time EXTERNAL (Subroutine) ProcEntity
external :: cpu_time
!DEF: /expect_external_2/x ObjectEntity REAL(4)
!DEF: /expect_external_2/y ObjectEntity REAL(4)
!DEF: /expect_external_2/z ObjectEntity REAL(4)
!DEF: /expect_external_2/t ObjectEntity REAL(4)
real x(2,2), y(2), z(2), t
!REF: /expect_external_2/z
!REF: /expect_external_2/matmul
!REF: /expect_external_2/x
!REF: /expect_external_2/y
z = matmul(x, y)
!REF: /expect_external_2/cpu_time
!REF: /expect_external_2/t
call cpu_time(t)
end subroutine