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

95 lines
3.8 KiB
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! Check errors from illegal (10.1.12 para 2) forward references
! in specification expressions to entities declared later in the
! same specification part.
module m1
integer :: m1j1, m1j2, m1j3, m1j4
contains
subroutine s1
!ERROR: Forward reference to 'm1j1' is not allowed in the same specification part
integer(kind=kind(m1j1)) :: t_s1m1j1
integer(kind=kind(m1s1j1)) :: t_s1j1 ! implicitly typed in s1
integer :: m1j1, m1s1j1, m1s1j2, m1s1j4
block
!ERROR: Forward reference to 'm1j2' is not allowed in the same specification part
integer(kind=kind(m1j2)) :: t_s1bm1j2
!ERROR: Forward reference to 'm1s1j2' is not allowed in the same specification part
integer(kind=kind(m1s1j2)) :: t_s1bm1s1j2
!ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part
integer(kind=kind(m1s1j3)) :: t_m1s1j3 ! m1s1j3 implicitly typed in s1
integer :: m1j2, m1s1j2, m1s1j3
end block
contains
subroutine s2
!ERROR: Forward reference to 'm1j3' is not allowed in the same specification part
integer(kind=kind(m1j3)) :: t_m1j3
!ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part
integer(kind=kind(m1s1j3)) :: t_m1s1j3
integer :: m1j3, m1s1j3, m1s2j1
block
!ERROR: Forward reference to 'm1j4' is not allowed in the same specification part
integer(kind=kind(m1j4)) :: t_m1j4
!ERROR: Forward reference to 'm1s1j4' is not allowed in the same specification part
integer(kind=kind(m1s1j4)) :: t_m1s1j4
!ERROR: Forward reference to 'm1s2j1' is not allowed in the same specification part
integer(kind=kind(m1s2j1)) :: t_m1s2j1
!ERROR: Forward reference to 'm1s2j2' is not allowed in the same specification part
integer(kind=kind(m1s2j2)) :: t_m1s2j2 ! m1s2j2 implicitly typed in s2
integer :: m1j4, m1s1j4, m1s2j1, m1s2j2
end block
end subroutine
end subroutine
end module
module m2
implicit none
integer :: m2j1, m2j2, m2j3, m2j4
contains
subroutine s1
!ERROR: Forward reference to 'm2j1' is not allowed in the same specification part
integer(kind=kind(m2j1)) :: t_s1m2j1
!ERROR: No explicit type declared for 'm2s1j1'
integer(kind=kind(m2s1j1)) :: t_s1j1
integer :: m2j1, m2s1j1, m2s1j2, m2s1j4
block
!ERROR: Forward reference to 'm2j2' is not allowed in the same specification part
integer(kind=kind(m2j2)) :: t_s1bm2j2
!ERROR: Forward reference to 'm2s1j2' is not allowed in the same specification part
integer(kind=kind(m2s1j2)) :: t_s1bm2s1j2
!ERROR: No explicit type declared for 'm2s1j3'
integer(kind=kind(m2s1j3)) :: t_m2s1j3
integer :: m2j2, m2s1j2, m2s1j3
end block
contains
subroutine s2
!ERROR: Forward reference to 'm2j3' is not allowed in the same specification part
integer(kind=kind(m2j3)) :: t_m2j3
!ERROR: No explicit type declared for 'm2s1j3'
integer(kind=kind(m2s1j3)) :: t_m2s1j3
integer :: m2j3, m2s1j3, m2s2j1
block
!ERROR: Forward reference to 'm2j4' is not allowed in the same specification part
integer(kind=kind(m2j4)) :: t_m2j4
!ERROR: Forward reference to 'm2s1j4' is not allowed in the same specification part
integer(kind=kind(m2s1j4)) :: t_m2s1j4
!ERROR: Forward reference to 'm2s2j1' is not allowed in the same specification part
integer(kind=kind(m2s2j1)) :: t_m2s2j1
!ERROR: No explicit type declared for 'm2s2j2'
integer(kind=kind(m2s2j2)) :: t_m2s2j2
integer :: m2j4, m2s1j4, m2s2j1, m2s2j2
end block
end subroutine
end subroutine
end module
! Case that elicited bad errors
SUBROUTINE KEEL
INTEGER NODES
CONTAINS
SUBROUTINE SGEOM
REAL :: RADIUS(nodes)
END SUBROUTINE
END SUBROUTINE KEEL