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.
19 lines
521 B
Fortran
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: }
|