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
128 lines
2.2 KiB
Fortran
128 lines
2.2 KiB
Fortran
! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
|
|
|
|
! Test that compiler directives can appear in various places.
|
|
|
|
#define PROC(KIND) \
|
|
interface; integer(KIND) function foo(a); \
|
|
integer(KIND), intent(in) :: a; \
|
|
!dir$ ignore_tkr a; \
|
|
end; end interface
|
|
|
|
!dir$ integer
|
|
module m
|
|
!dir$ integer
|
|
use iso_fortran_env
|
|
!dir$ integer
|
|
implicit integer(a-z)
|
|
!dir$ integer
|
|
!dir$ integer=64
|
|
!dir$ integer = 64
|
|
!dir$ integer = 64
|
|
PROC(4)
|
|
!dir$ optimize:1
|
|
!dir$ optimize : 1
|
|
!dir$ loop count (10000)
|
|
!dir$ loop count (1, 500, 5000, 10000)
|
|
type stuff
|
|
real(8), allocatable :: d(:)
|
|
!dir$ align : 1024 :: d
|
|
end type stuff
|
|
end
|
|
|
|
subroutine vector_always
|
|
!dir$ vector always
|
|
! CHECK: !DIR$ VECTOR ALWAYS
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|
|
|
|
subroutine vector_vectorlength
|
|
!dir$ vector vectorlength(fixed)
|
|
! CHECK: !DIR$ VECTOR VECTORLENGTH (FIXED)
|
|
do i=1,10
|
|
enddo
|
|
|
|
!dir$ vector vectorlength(scalable)
|
|
! CHECK: !DIR$ VECTOR VECTORLENGTH (SCALABLE)
|
|
do i=1,10
|
|
enddo
|
|
|
|
!dir$ vector vectorlength(8,scalable)
|
|
! CHECK: !DIR$ VECTOR VECTORLENGTH (8, SCALABLE)
|
|
do i=1,10
|
|
enddo
|
|
|
|
!dir$ vector vectorlength(4)
|
|
! CHECK: !DIR$ VECTOR VECTORLENGTH (4)
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|
|
|
|
subroutine unroll
|
|
!dir$ unroll
|
|
! CHECK: !DIR$ UNROLL
|
|
do i=1,10
|
|
enddo
|
|
!dir$ unroll 2
|
|
! CHECK: !DIR$ UNROLL 2
|
|
do i=1,10
|
|
enddo
|
|
!dir$ nounroll
|
|
! CHECK: !DIR$ NOUNROLL
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|
|
|
|
subroutine unroll_and_jam
|
|
!dir$ unroll_and_jam
|
|
! CHECK: !DIR$ UNROLL_AND_JAM
|
|
do i=1,10
|
|
enddo
|
|
!dir$ unroll_and_jam 2
|
|
! CHECK: !DIR$ UNROLL_AND_JAM 2
|
|
do i=1,10
|
|
enddo
|
|
!dir$ nounroll_and_jam
|
|
! CHECK: !DIR$ NOUNROLL_AND_JAM
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|
|
|
|
subroutine no_vector
|
|
!dir$ novector
|
|
! CHECK: !DIR$ NOVECTOR
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|
|
|
|
subroutine inline
|
|
integer :: a
|
|
!dir$ forceinline
|
|
! CHECK: !DIR$ FORCEINLINE
|
|
a = f(2)
|
|
|
|
!dir$ inline
|
|
! CHECK: !DIR$ INLINE
|
|
call g()
|
|
|
|
!dir$ noinline
|
|
! CHECK: !DIR$ NOINLINE
|
|
call g()
|
|
|
|
contains
|
|
function f(x)
|
|
integer :: x
|
|
f = x**2
|
|
end function
|
|
|
|
subroutine g()
|
|
end subroutine
|
|
end subroutine
|
|
|
|
subroutine ivdep
|
|
!dir$ ivdep
|
|
! CHECK: !DIR$ IVDEP
|
|
do i=1,10
|
|
enddo
|
|
end subroutine
|