File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,7 @@ RUN(NAME array_size_01 LABELS cpython llvm c)
284
284
RUN (NAME array_size_02 LABELS cpython llvm c )
285
285
RUN (NAME array_01 LABELS cpython llvm wasm c )
286
286
RUN (NAME array_02 LABELS cpython wasm c )
287
+ RUN (NAME array_03 LABELS cpython llvm )
287
288
RUN (NAME bindc_01 LABELS cpython llvm c )
288
289
RUN (NAME bindc_02 LABELS cpython llvm c )
289
290
RUN (NAME bindc_04 LABELS llvm c )
Original file line number Diff line number Diff line change
1
+ from lpython import Allocatable , f64 , i32
2
+ from numpy import empty , float64 , int32
3
+
4
+ def f ():
5
+ n : i32 = 5
6
+ a : Allocatable [f64 [:]] = empty ((n ,), dtype = float64 )
7
+ i : i32
8
+ for i in range (n ):
9
+ a [i ] = f64 (i + 1 )
10
+ b : Allocatable [i32 [:]]
11
+ n = 10
12
+ b = empty ((n ,), dtype = int32 )
13
+ for i in range (n ):
14
+ b [i ] = i + 1
15
+ print (a )
16
+ for i in range (n ):
17
+ assert b [i ] == i + 1
18
+
19
+ f ()
You can’t perform that action at this time.
0 commit comments