Files
TheRock/compiler/amd-llvm/flang/test/Semantics/call30.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

73 lines
4.7 KiB
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror -pedantic
! This test is responsible for checking the fix for passing non-variables as
! actual arguments to subroutines/functions whose corresponding dummy argument
! expects a VOLATILE variable
! c.f. llvm-project GitHub issue #58973
module m
contains
subroutine vol_dum_int(my_int)
integer, volatile :: my_int
end subroutine vol_dum_int
subroutine vol_dum_real(my_real)
real, volatile :: my_real
end subroutine vol_dum_real
subroutine vol_dum_complex(my_complex)
complex, volatile :: my_complex
end subroutine vol_dum_complex
subroutine vol_dum_int_arr(my_int_arr)
integer, dimension(2,2), volatile :: my_int_arr
end subroutine vol_dum_int_arr
subroutine test_all_subprograms()
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '6_4' is not a variable or pointer
call vol_dum_int(6)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '18_4' is not a variable or pointer
call vol_dum_int(6+12)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '72_4' is not a variable or pointer
call vol_dum_int(6*12)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '-3_4' is not a variable or pointer
call vol_dum_int(-6/2)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_real=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '3.1415927410125732421875_4' is not a variable or pointer
call vol_dum_real(3.141592653)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_real=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '3.1415927410125732421875_4' is not a variable or pointer
call vol_dum_real(3.141592653 + (-10.6e-11))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_real=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '3.3300884272335906644002534449100494384765625e-10_4' is not a variable or pointer
call vol_dum_real(3.141592653 * 10.6e-11)
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_real=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '-2.9637666816e10_4' is not a variable or pointer
call vol_dum_real(3.141592653 / (-10.6e-11))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_complex=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '(1._4,3.2000000476837158203125_4)' is not a variable or pointer
call vol_dum_complex((1., 3.2))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_complex=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '(-1._4,6.340000152587890625_4)' is not a variable or pointer
call vol_dum_complex((1., 3.2) + (-2., 3.14))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_complex=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '(-1.2048000335693359375e1_4,-3.2599999904632568359375_4)' is not a variable or pointer
call vol_dum_complex((1., 3.2) * (-2., 3.14))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_complex=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '(5.80680549144744873046875e-1_4,-6.8833148479461669921875e-1_4)' is not a variable or pointer
call vol_dum_complex((1., 3.2) / (-2., 3.14))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int_arr=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '[INTEGER(4)::1_4,2_4,3_4,4_4]' is not a variable or pointer
call vol_dum_int_arr((/ 1, 2, 3, 4 /))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int_arr=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: 'reshape([INTEGER(4)::1_4,2_4,3_4,4_4],shape=[2,2])' is not a variable or pointer
call vol_dum_int_arr(reshape((/ 1, 2, 3, 4 /), (/ 2, 2/)))
!WARNING: Actual argument associated with VOLATILE dummy argument 'my_int_arr=' is not definable [-Wundefinable-asynchronous-or-volatile-actual]
!BECAUSE: '[INTEGER(4)::1_4,2_4,3_4,4_4]' is not a variable or pointer
call vol_dum_int_arr((/ 1, 2, 3, 4 /))
end subroutine test_all_subprograms
end module m