Files
TheRock/compiler/amd-llvm/flang/test/Lower/CUDA/cuda-allocatable-device.cuf
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

53 lines
2.0 KiB
Plaintext

! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
! RUN: bbc --dump-symbols -fcuda %s -o - | FileCheck %s --check-prefix=SYMBOLS
module m
! SYMBOLS-LABEL: Module scope: m
type device_array
real(kind=8), allocatable, dimension(:), device :: ad
real(kind=8), pointer, dimension(:), device :: pd
end type
! SYMBOLS: .c.device_array, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(component) shape: 0_8:1_8 init:[component::component(name=.n.ad,genre=3_1,category=2_1,kind=8_1,rank=1_1,memoryspace=1_1,offset=0_8
type managed_array
real(kind=8), allocatable, dimension(:), managed :: ad
real(kind=8), pointer, dimension(:), managed :: pd
end type
! SYMBOLS: .c.managed_array, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(component) shape: 0_8:1_8 init:[component::component(name=.n.ad,genre=3_1,category=2_1,kind=8_1,rank=1_1,memoryspace=2_1,offset=0_8
type unified_array
real(kind=8), allocatable, dimension(:), unified :: ad
real(kind=8), pointer, dimension(:), unified :: pd
end type
! SYMBOLS: .c.unified_array, SAVE, TARGET (CompilerCreated, ReadOnly): ObjectEntity type: TYPE(component) shape: 0_8:1_8 init:[component::component(name=.n.ad,genre=3_1,category=2_1,kind=8_1,rank=1_1,memoryspace=3_1
type(device_array), allocatable :: da(:)
type(managed_array), allocatable :: ma(:)
type(unified_array), allocatable :: ua(:)
end module
program main
use m
type(device_array) :: local
type(managed_array) :: local_ma
type(unified_array) :: local_ua
end
! CHECK-LABEL: func.func @_QQmain()
! CHECK-COUNT-3: fir.call @_FortranAInitialize
! CHECK-LABEL: fir.global linkonce_odr @_QMmE.c.device_array
! CHECK: fir.insert_value %{{.*}}, %c1{{.*}}, ["memoryspace"
! CHECK-LABEL: fir.global linkonce_odr @_QMmE.c.managed_array
! CHECK: fir.insert_value %{{.*}}, %c2{{.*}}, ["memoryspace"
! CHECK-LABEL: fir.global linkonce_odr @_QMmE.c.unified_array
! CHECK: fir.insert_value %{{.*}}, %c3{{.*}}, ["memoryspace"