Skip to content

Commit 3dd3af8

Browse files
committed
Add test
1 parent 2578891 commit 3dd3af8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flang/test/Lower/CUDA/cuda-derived.cuf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@ module m1
44
type ty_device
55
integer, device, allocatable, dimension(:) :: x
66
end type
7+
8+
type t1; real, device, allocatable :: a(:); end type
9+
type t2; type(t1) :: b; end type
710
end module
811

912
program main
1013
use m1
1114
type(ty_device) :: a
15+
type(t2) :: b
1216
end
1317

1418
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "main"}
1519
! CHECK: %{{.*}} = fir.alloca !fir.type<_QMm1Tty_device{x:!fir.box<!fir.heap<!fir.array<?xi32>>>}> {bindc_name = "a", uniq_name = "_QFEa"}
20+
! CHECK: %{{.*}} = fir.alloca !fir.type<_QMm1Tt2{b:!fir.type<_QMm1Tt1{a:!fir.box<!fir.heap<!fir.array<?xf32>>>}>}> {bindc_name = "b", uniq_name = "_QFEb"}

0 commit comments

Comments
 (0)