Skip to content

Commit 497a471

Browse files
committed
Add test
1 parent 991ceb3 commit 497a471

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
2+
3+
! Test lowering of CUDA pointers.
4+
5+
subroutine allocate_pointer
6+
real, device, pointer :: pr(:)
7+
allocate(pr(10))
8+
end
9+
10+
! CHECK-LABEL: func.func @_QPallocate_pointer()
11+
! CHECK-COUNT-2: fir.embox %{{.*}} {allocator_idx = 2 : i32} : (!fir.ptr<!fir.array<?xf32>>, !fir.shape<1>) -> !fir.box<!fir.ptr<!fir.array<?xf32>>>

0 commit comments

Comments
 (0)