Files
clang-p2996/flang/test/Integration/amdgpu-target-desc-cast-to-global-addrspace.f90
Kareem Ergawy b1774222c7 [flang] Emit fir.global in the global address space (#146653)
Instead of emitting globals in the program/default address space, emit
them in the global address space. This also requires changes how address
of code-gen is handled, we need to cast to the default address space to
prevent code-gen issues.
2025-07-02 17:15:22 +02:00

19 lines
521 B
Fortran

!REQUIRES: amdgpu-registered-target
!RUN: %flang_fc1 -emit-llvm -triple amdgcn-amd-amdhsa -target-cpu gfx908 %s -o - | FileCheck %s
subroutine maintest
implicit none
type r1_t
end type r1_t
type(r1_t), pointer :: A
end subroutine
! CHECK: @[[TYPE_DESC:.*XdtXr1_t]] = linkonce_odr addrspace(1) constant %_QM__fortran_type_infoTderivedtype
! CHECK: define void @maintest_() {{.*}} {
! CHECK: store { {{.*}} } { {{.*}}, ptr addrspacecast (ptr addrspace(1) @[[TYPE_DESC]] to ptr), {{.*}} }, {{.*}}
! CHECK: }