lfortran-0.64.0/0000775000175000017500000000000015227365540013625 5ustar alastairalastairlfortran-0.64.0/environment-wasm-build.yml0000664000175000017500000000026615227365530020761 0ustar alastairalastairname: xeus-lfortran-wasm-build channels: - https://prefix.dev/emscripten-forge-4x - https://prefix.dev/conda-forge dependencies: - cmake - emscripten_emscripten-wasm32==4.0.9lfortran-0.64.0/build1.sh0000775000175000017500000000113015227365530015336 0ustar alastairalastair#!/usr/bin/env bash set -e set -x cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DWITH_LLVM=yes \ -DLFORTRAN_BUILD_ALL=yes \ -DWITH_STACKTRACE=yes \ -DWITH_RUNTIME_STACKTRACE=yes \ -DWITH_LSP=no \ -DWITH_INTERNAL_ALLOC_CHECK=yes \ -DUSE_DYNAMIC_ZSTD=no \ -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH_LFORTRAN;$CONDA_PREFIX" \ -DCMAKE_INSTALL_LIBDIR=share/lfortran/lib \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_C_FLAGS="${CFLAGS} -fdiagnostics-color=always" \ -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fdiagnostics-color=always" \ -G Ninja \ . cmake --build . lfortran-0.64.0/tests/0000775000175000017500000000000015227365530014766 5ustar alastairalastairlfortran-0.64.0/tests/preprocessor5.f900000664000175000017500000000045515227365530020125 0ustar alastairalastairprogram preprocessor5 implicit none #define X 5 #define Y #ifdef X print *, 1 #else print *, 2 #endif #ifndef X print *, 11 #else print *, 12 #endif #ifdef Y print *, 3 #else print *, 4 #endif #ifdef Z print *, 5 #else print *, 6 #endif #ifndef Z print *, 15 #else print *, 16 #endif end program lfortran-0.64.0/tests/program2.f900000664000175000017500000000017615227365530017043 0ustar alastairalastairprogram program2 implicit none call b call b() contains subroutine b() print *, "b" end subroutine end program lfortran-0.64.0/tests/do_concurrent2.f900000664000175000017500000000044515227365530020237 0ustar alastairalastairsubroutine do_concurrent2(a, b) real, intent(inout) :: a(:), b(:) integer :: i real :: x x = 1.0 do concurrent (i=1:10) shared(i) local(x) default(none) if (a(i) > 0) then x = sqrt(a(i)) a(i) = a(i) - x**2 end if b(i) = b(i) - a(i) end do print *, x end subroutine lfortran-0.64.0/tests/subroutine8.f900000664000175000017500000000035615227365530017601 0ustar alastairalastairrecursive pure subroutine a() end subroutine pure elemental subroutine b() end subroutine elemental pure subroutine c() end subroutine pure recursive subroutine d() end subroutine impure elemental module subroutine e() end subroutine lfortran-0.64.0/tests/interface3.f900000664000175000017500000000420615227365530017333 0ustar alastairalastairmodule interface3 implicit none !checks the syntax public :: x, y, z, assignment(=), operator(+), operator(.and.), operator(.in.) public :: operator(*) public :: operator(/) public :: operator(/ ) public :: operator(// ) interface module procedure sample end interface interface A module procedure :: sample end interface A INTERFACE ASSIGNMENT ( = ) SUBROUTINE LOGICAL_TO_NUMERIC (N, B) INTEGER, INTENT (OUT) :: N LOGICAL, INTENT (IN) :: B END SUBROUTINE LOGICAL_TO_NUMERIC END INTERFACE ASSIGNMENT ( = ) interface operator (+) module procedure union end interface operator (+) interface operator (-) module procedure difference end interface operator (-) interface operator (*) module procedure intersection end interface operator (*) interface operator ( / ) end interface operator ( / ) interface operator (/) end interface operator (/) interface operator (**) end interface operator (**) interface operator (==) end interface operator (==) interface operator (/=) end interface operator (/=) interface operator (>) end interface operator (>) interface operator (>=) end interface operator (>=) interface operator (<) end interface operator (<) interface operator (<=) module procedure subset end interface operator (<=) interface operator (.not.) end interface operator (.not.) interface operator (.and.) end interface operator (.and.) interface operator (.or.) end interface operator (.or.) interface operator (.eqv.) end interface operator (.eqv.) interface operator (.neqv.) end interface operator (.neqv.) abstract interface end interface public :: operator(//) interface operator (//) end interface operator (//) interface write(formatted) module procedure :: write_formatted end interface interface write(unformatted) module procedure :: write_unformatted end interface interface read(formatted) module procedure :: read_formatted end interface interface read(unformatted) module procedure :: read_unformatted end interface contains function f(operator) ! Currently parsed as an operator, but AST -> ASR phase can fix that: real, intent(in) :: operator (*) end function f end module lfortran-0.64.0/tests/array_op_simplifier_test.f900000664000175000017500000000020315227365530022377 0ustar alastairalastairprogram main implicit none real :: a(5, 5), b(5, 5), c real, allocatable :: d(:, :) allocate(d(5, 5)) d = a + b + c end program lfortran-0.64.0/tests/fixedform_doloop2.f0000664000175000017500000000041415227365530020555 0ustar alastairalastair program main integer k do k=1,10 print *, k end do do 80 k=1,10 print *, k 80 continue do 800 k=1,10 print *, k 800 continue do 8000 k=1,10 print *, k 8000 continue end program lfortran-0.64.0/tests/reference/0000775000175000017500000000000015227365530016724 5ustar alastairalastairlfortran-0.64.0/tests/reference/asr_openmp-openmp_45-1c0e790.stdout0000664000175000017500000055457715227365530025154 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding), omp_lib: (Module (SymbolTable 8 { c_bool: (ExternalSymbol 8 c_bool 43 c_bool lfortran_intrinsic_iso_c_binding [] c_bool Public ), c_funptr: (ExternalSymbol 8 c_funptr 43 c_funptr lfortran_intrinsic_iso_c_binding [] c_funptr Public ), c_int: (ExternalSymbol 8 c_int 43 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_long: (ExternalSymbol 8 c_long 43 c_long lfortran_intrinsic_iso_c_binding [] c_long Public ), c_ptr: (ExternalSymbol 8 c_ptr 43 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), gomp_atomic_end: (Function (SymbolTable 9 { }) gomp_atomic_end (FunctionType [] () BindC Interface "GOMP_atomic_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_atomic_start: (Function (SymbolTable 10 { }) gomp_atomic_start (FunctionType [] () BindC Interface "GOMP_atomic_start" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_barrier: (Function (SymbolTable 11 { }) gomp_barrier (FunctionType [] () BindC Interface "GOMP_barrier" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_critical_end: (Function (SymbolTable 12 { }) gomp_critical_end (FunctionType [] () BindC Interface "GOMP_critical_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_critical_start: (Function (SymbolTable 13 { }) gomp_critical_start (FunctionType [] () BindC Interface "GOMP_critical_start" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_auto_next: (Function (SymbolTable 14 { gomp_loop_auto_next: (Variable 14 gomp_loop_auto_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 14 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 14 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_auto_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_auto_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 14 istart) (Var 14 iend)] [] (Var 14 gomp_loop_auto_next) Public .false. .false. () ), gomp_loop_auto_start: (Function (SymbolTable 15 { end: (Variable 15 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_auto_start: (Variable 15 gomp_loop_auto_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 15 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 15 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 15 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 15 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_auto_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_auto_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 15 start) (Var 15 end) (Var 15 incr) (Var 15 istart) (Var 15 iend)] [] (Var 15 gomp_loop_auto_start) Public .false. .false. () ), gomp_loop_dynamic_next: (Function (SymbolTable 16 { gomp_loop_dynamic_next: (Variable 16 gomp_loop_dynamic_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 16 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 16 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_dynamic_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_dynamic_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 16 istart) (Var 16 iend)] [] (Var 16 gomp_loop_dynamic_next) Public .false. .false. () ), gomp_loop_dynamic_start: (Function (SymbolTable 17 { chunk: (Variable 17 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 17 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_dynamic_start: (Variable 17 gomp_loop_dynamic_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 17 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 17 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 17 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 17 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_dynamic_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_dynamic_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 17 start) (Var 17 end) (Var 17 incr) (Var 17 chunk) (Var 17 istart) (Var 17 iend)] [] (Var 17 gomp_loop_dynamic_start) Public .false. .false. () ), gomp_loop_end: (Function (SymbolTable 18 { }) gomp_loop_end (FunctionType [] () BindC Interface "GOMP_loop_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_end_nowait: (Function (SymbolTable 19 { }) gomp_loop_end_nowait (FunctionType [] () BindC Interface "GOMP_loop_end_nowait" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_guided_next: (Function (SymbolTable 20 { gomp_loop_guided_next: (Variable 20 gomp_loop_guided_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 20 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 20 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_guided_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_guided_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 20 istart) (Var 20 iend)] [] (Var 20 gomp_loop_guided_next) Public .false. .false. () ), gomp_loop_guided_start: (Function (SymbolTable 21 { chunk: (Variable 21 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 21 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_guided_start: (Variable 21 gomp_loop_guided_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 21 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 21 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 21 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 21 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_guided_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_guided_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 21 start) (Var 21 end) (Var 21 incr) (Var 21 chunk) (Var 21 istart) (Var 21 iend)] [] (Var 21 gomp_loop_guided_start) Public .false. .false. () ), gomp_loop_runtime_next: (Function (SymbolTable 22 { gomp_loop_runtime_next: (Variable 22 gomp_loop_runtime_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 22 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 22 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_runtime_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_runtime_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 22 istart) (Var 22 iend)] [] (Var 22 gomp_loop_runtime_next) Public .false. .false. () ), gomp_loop_runtime_start: (Function (SymbolTable 23 { end: (Variable 23 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_runtime_start: (Variable 23 gomp_loop_runtime_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 23 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 23 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 23 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 23 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_runtime_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_runtime_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 23 start) (Var 23 end) (Var 23 incr) (Var 23 istart) (Var 23 iend)] [] (Var 23 gomp_loop_runtime_start) Public .false. .false. () ), gomp_loop_static_next: (Function (SymbolTable 24 { gomp_loop_static_next: (Variable 24 gomp_loop_static_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 24 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 24 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_static_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_static_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 24 istart) (Var 24 iend)] [] (Var 24 gomp_loop_static_next) Public .false. .false. () ), gomp_loop_static_start: (Function (SymbolTable 25 { chunk: (Variable 25 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 25 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_static_start: (Variable 25 gomp_loop_static_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 25 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 25 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 25 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 25 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_static_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_static_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 25 start) (Var 25 end) (Var 25 incr) (Var 25 chunk) (Var 25 istart) (Var 25 iend)] [] (Var 25 gomp_loop_static_start) Public .false. .false. () ), gomp_parallel: (Function (SymbolTable 26 { data: (Variable 26 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 26 flags [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 26 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), num_threads: (Variable 26 num_threads [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_parallel (FunctionType [(CPtr) (CPtr) (Integer 4) (Integer 4)] () BindC Interface "GOMP_parallel" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 26 fn) (Var 26 data) (Var 26 num_threads) (Var 26 flags)] [] () Public .false. .false. () ), gomp_sections_end: (Function (SymbolTable 27 { }) gomp_sections_end (FunctionType [] () BindC Interface "GOMP_sections_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_sections_next: (Function (SymbolTable 28 { gomp_sections_next: (Variable 28 gomp_sections_next [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_sections_next (FunctionType [] (Integer 4) BindC Interface "GOMP_sections_next" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 28 gomp_sections_next) Public .false. .false. () ), gomp_sections_start: (Function (SymbolTable 29 { count: (Variable 29 count [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_sections_start: (Variable 29 gomp_sections_start [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_sections_start (FunctionType [(Integer 4)] (Integer 4) BindC Interface "GOMP_sections_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 29 count)] [] (Var 29 gomp_sections_start) Public .false. .false. () ), gomp_task: (Function (SymbolTable 30 { arg_align: (Variable 30 arg_align [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), arg_size: (Variable 30 arg_size [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), cpyfn: (Variable 30 cpyfn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), data: (Variable 30 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), depend: (Variable 30 depend [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 30 flags [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 30 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), if_clause: (Variable 30 if_clause [] Unspecified () () Default (Logical 1) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_task (FunctionType [(CPtr) (CPtr) (CPtr) (Integer 8) (Integer 8) (Logical 1) (Integer 4) (CPtr)] () BindC Interface "GOMP_task" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 30 fn) (Var 30 data) (Var 30 cpyfn) (Var 30 arg_size) (Var 30 arg_align) (Var 30 if_clause) (Var 30 flags) (Var 30 depend)] [] () Public .false. .false. () ), gomp_taskwait: (Function (SymbolTable 31 { }) gomp_taskwait (FunctionType [] () BindC Interface "GOMP_taskwait" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_teams: (Function (SymbolTable 32 { data: (Variable 32 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 32 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), num_teams: (Variable 32 num_teams [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), thread_limit: (Variable 32 thread_limit [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_teams (FunctionType [(CPtr) (CPtr) (Integer 4) (Integer 4)] () BindC Interface "GOMP_teams_reg" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 32 fn) (Var 32 data) (Var 32 num_teams) (Var 32 thread_limit)] [] () Public .false. .false. () ), omp_get_max_threads: (Function (SymbolTable 33 { omp_get_max_threads: (Variable 33 omp_get_max_threads [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_max_threads (FunctionType [] (Integer 4) BindC Interface "omp_get_max_threads" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 33 omp_get_max_threads) Public .false. .false. () ), omp_get_num_procs: (Function (SymbolTable 34 { omp_get_num_procs: (Variable 34 omp_get_num_procs [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_procs (FunctionType [] (Integer 4) BindC Interface "omp_get_num_procs" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 34 omp_get_num_procs) Public .false. .false. () ), omp_get_num_teams: (Function (SymbolTable 35 { omp_get_num_teams: (Variable 35 omp_get_num_teams [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_teams (FunctionType [] (Integer 4) BindC Interface "omp_get_num_teams" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 35 omp_get_num_teams) Public .false. .false. () ), omp_get_num_threads: (Function (SymbolTable 36 { omp_get_num_threads: (Variable 36 omp_get_num_threads [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_threads (FunctionType [] (Integer 4) BindC Interface "omp_get_num_threads" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 36 omp_get_num_threads) Public .false. .false. () ), omp_get_team_num: (Function (SymbolTable 37 { omp_get_team_num: (Variable 37 omp_get_team_num [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_team_num (FunctionType [] (Integer 4) BindC Interface "omp_get_team_num" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 37 omp_get_team_num) Public .false. .false. () ), omp_get_team_size: (Function (SymbolTable 38 { level: (Variable 38 level [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), omp_get_team_size: (Variable 38 omp_get_team_size [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_team_size (FunctionType [(Integer 4)] (Integer 4) BindC Interface "omp_get_team_size" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 38 level)] [] (Var 38 omp_get_team_size) Public .false. .false. () ), omp_get_thread_num: (Function (SymbolTable 39 { omp_get_thread_num: (Variable 39 omp_get_thread_num [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_thread_num (FunctionType [] (Integer 4) BindC Interface "omp_get_thread_num" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 39 omp_get_thread_num) Public .false. .false. () ), omp_get_wtime: (Function (SymbolTable 40 { omp_get_wtime: (Variable 40 omp_get_wtime [] ReturnVar () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_wtime (FunctionType [] (Real 8) BindC Interface "omp_get_wtime" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 40 omp_get_wtime) Public .false. .false. () ), omp_set_num_threads: (Function (SymbolTable 41 { n: (Variable 41 n [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) omp_set_num_threads (FunctionType [(Integer 4)] () BindC Interface "omp_set_num_threads" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 41 n)] [] () Public .false. .false. () ) }) omp_lib () [iso_c_binding] .true. .false. .false. ), openmp_45: (Program (SymbolTable 6 { c_bool: (ExternalSymbol 6 c_bool 43 c_bool lfortran_intrinsic_iso_c_binding [] c_bool Public ), c_funptr: (ExternalSymbol 6 c_funptr 43 c_funptr lfortran_intrinsic_iso_c_binding [] c_funptr Public ), c_int: (ExternalSymbol 6 c_int 43 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_long: (ExternalSymbol 6 c_long 43 c_long lfortran_intrinsic_iso_c_binding [] c_long Public ), c_ptr: (ExternalSymbol 6 c_ptr 43 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), compute_a: (ExternalSymbol 6 compute_a 2 compute_a openmp_45_parallel_sections [] compute_a Public ), compute_b: (ExternalSymbol 6 compute_b 2 compute_b openmp_45_parallel_sections [] compute_b Public ), compute_c: (ExternalSymbol 6 compute_c 2 compute_c openmp_45_parallel_sections [] compute_c Public ), gomp_atomic_end: (ExternalSymbol 6 gomp_atomic_end 8 gomp_atomic_end omp_lib [] gomp_atomic_end Public ), gomp_atomic_start: (ExternalSymbol 6 gomp_atomic_start 8 gomp_atomic_start omp_lib [] gomp_atomic_start Public ), gomp_barrier: (ExternalSymbol 6 gomp_barrier 8 gomp_barrier omp_lib [] gomp_barrier Public ), gomp_critical_end: (ExternalSymbol 6 gomp_critical_end 8 gomp_critical_end omp_lib [] gomp_critical_end Public ), gomp_critical_start: (ExternalSymbol 6 gomp_critical_start 8 gomp_critical_start omp_lib [] gomp_critical_start Public ), gomp_loop_auto_next: (ExternalSymbol 6 gomp_loop_auto_next 8 gomp_loop_auto_next omp_lib [] gomp_loop_auto_next Public ), gomp_loop_auto_start: (ExternalSymbol 6 gomp_loop_auto_start 8 gomp_loop_auto_start omp_lib [] gomp_loop_auto_start Public ), gomp_loop_dynamic_next: (ExternalSymbol 6 gomp_loop_dynamic_next 8 gomp_loop_dynamic_next omp_lib [] gomp_loop_dynamic_next Public ), gomp_loop_dynamic_start: (ExternalSymbol 6 gomp_loop_dynamic_start 8 gomp_loop_dynamic_start omp_lib [] gomp_loop_dynamic_start Public ), gomp_loop_end: (ExternalSymbol 6 gomp_loop_end 8 gomp_loop_end omp_lib [] gomp_loop_end Public ), gomp_loop_end_nowait: (ExternalSymbol 6 gomp_loop_end_nowait 8 gomp_loop_end_nowait omp_lib [] gomp_loop_end_nowait Public ), gomp_loop_guided_next: (ExternalSymbol 6 gomp_loop_guided_next 8 gomp_loop_guided_next omp_lib [] gomp_loop_guided_next Public ), gomp_loop_guided_start: (ExternalSymbol 6 gomp_loop_guided_start 8 gomp_loop_guided_start omp_lib [] gomp_loop_guided_start Public ), gomp_loop_runtime_next: (ExternalSymbol 6 gomp_loop_runtime_next 8 gomp_loop_runtime_next omp_lib [] gomp_loop_runtime_next Public ), gomp_loop_runtime_start: (ExternalSymbol 6 gomp_loop_runtime_start 8 gomp_loop_runtime_start omp_lib [] gomp_loop_runtime_start Public ), gomp_loop_static_next: (ExternalSymbol 6 gomp_loop_static_next 8 gomp_loop_static_next omp_lib [] gomp_loop_static_next Public ), gomp_loop_static_start: (ExternalSymbol 6 gomp_loop_static_start 8 gomp_loop_static_start omp_lib [] gomp_loop_static_start Public ), gomp_parallel: (ExternalSymbol 6 gomp_parallel 8 gomp_parallel omp_lib [] gomp_parallel Public ), gomp_sections_end: (ExternalSymbol 6 gomp_sections_end 8 gomp_sections_end omp_lib [] gomp_sections_end Public ), gomp_sections_next: (ExternalSymbol 6 gomp_sections_next 8 gomp_sections_next omp_lib [] gomp_sections_next Public ), gomp_sections_start: (ExternalSymbol 6 gomp_sections_start 8 gomp_sections_start omp_lib [] gomp_sections_start Public ), gomp_task: (ExternalSymbol 6 gomp_task 8 gomp_task omp_lib [] gomp_task Public ), gomp_taskwait: (ExternalSymbol 6 gomp_taskwait 8 gomp_taskwait omp_lib [] gomp_taskwait Public ), gomp_teams: (ExternalSymbol 6 gomp_teams 8 gomp_teams omp_lib [] gomp_teams Public ), omp_get_max_threads: (ExternalSymbol 6 omp_get_max_threads 8 omp_get_max_threads omp_lib [] omp_get_max_threads Public ), omp_get_num_procs: (ExternalSymbol 6 omp_get_num_procs 8 omp_get_num_procs omp_lib [] omp_get_num_procs Public ), omp_get_num_teams: (ExternalSymbol 6 omp_get_num_teams 8 omp_get_num_teams omp_lib [] omp_get_num_teams Public ), omp_get_num_threads: (ExternalSymbol 6 omp_get_num_threads 8 omp_get_num_threads omp_lib [] omp_get_num_threads Public ), omp_get_team_num: (ExternalSymbol 6 omp_get_team_num 8 omp_get_team_num omp_lib [] omp_get_team_num Public ), omp_get_team_size: (ExternalSymbol 6 omp_get_team_size 8 omp_get_team_size omp_lib [] omp_get_team_size Public ), omp_get_thread_num: (ExternalSymbol 6 omp_get_thread_num 8 omp_get_thread_num omp_lib [] omp_get_thread_num Public ), omp_get_wtime: (ExternalSymbol 6 omp_get_wtime 8 omp_get_wtime omp_lib [] omp_get_wtime Public ), omp_set_num_threads: (ExternalSymbol 6 omp_set_num_threads 8 omp_set_num_threads omp_lib [] omp_set_num_threads Public ), tid: (Variable 6 tid [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) openmp_45 [omp_lib openmp_45_parallel_sections] [(OMPRegion ParallelSections [] [(OMPRegion Section [] [(SubroutineCall 6 compute_a () [] () .false. )] ) (OMPRegion Section [] [(SubroutineCall 6 compute_b () [] () .false. )] ) (OMPRegion Section [] [(SubroutineCall 6 compute_c () [] () .false. )] )] )] ), openmp_45_parallel_sections: (Module (SymbolTable 2 { compute_a: (Function (SymbolTable 3 { }) compute_a (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "Computing A" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), compute_b: (Function (SymbolTable 4 { }) compute_b (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "Computing B" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), compute_c: (Function (SymbolTable 5 { }) compute_c (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "Computing C" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ) }) openmp_45_parallel_sections () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-int_dp_param-19bf015.stdout0000664000175000017500000001240315227365530024375 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { int_dp_param: (Program (SymbolTable 2 { prec1: (Variable 2 prec1 [] Local (IntegerConstant 4 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prec2: (Variable 2 prec2 [] Local (IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local (IntegerConstant 2147483647 (Integer 4) Decimal) (IntegerConstant 2147483647 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 2 v [] Local (Cast (IntegerConstant 2147483647 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 2147483647 (Integer 8) Decimal) () ) (IntegerConstant 2147483647 (Integer 8) Decimal) Save (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_dp_param [] [(Print (StringFormat () [(Var 2 u) (Var 2 v)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-global_scope1-dd9aaaa.stdout0000664000175000017500000000040615227365530024751 0ustar alastairalastair(TranslationUnit [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] ) lfortran-0.64.0/tests/reference/ast_f90-goto_02-48f3a02.json0000664000175000017500000000107415227365530023322 0ustar alastairalastair{ "basename": "ast_f90-goto_02-48f3a02", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/goto_02.f90", "infile_hash": "2bd2e5ad2c2506c3da506b82aa7d12c7877206410c2d7637f556d10b", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-goto_02-48f3a02.stdout", "stdout_hash": "8fb675472ef67d02eecf5f4995edbecbfcd987589eef60972fa4cc78", "stderr": "ast_f90-goto_02-48f3a02.stderr", "stderr_hash": "317795e3eb8121d18463c9531b060be0c248a0b34d70a2961d6d2047", "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-subroutines_01-e2ed4a5.stdout0000664000175000017500000003743315227365530025163 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @16 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @17 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @18 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @19 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @21 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @22 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @23 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @24 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @25 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc28 = alloca %string_descriptor, align 8 %stringFormat_desc19 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %call_arg_value = alloca i32, align 4 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %j = alloca i32, align 4 store i32 1, i32* %i, align 4 store i32 1, i32* %j, align 4 %3 = load i32, i32* %j, align 4 %4 = icmp ne i32 %3, 1 br i1 %4, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then call void @f(i32* %i, i32* %j) %5 = alloca i64, align 8 %6 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %5, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i, i32* %j) %7 = load i64, i64* %5, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %6, i8** %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %7, i64* %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %11 = load i8*, i8** %10, align 8 %12 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %13 = load i64, i64* %12, align 8 %14 = trunc i64 %13 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %11, i32 %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %15 = icmp eq i8* %6, null br i1 %15, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %2, i8* %6) br label %free_done free_done: ; preds = %free_nonnull, %ifcont %16 = load i32, i32* %i, align 4 %17 = icmp ne i32 %16, 1 br i1 %17, label %then1, label %else2 then1: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %free_done br label %ifcont3 ifcont3: ; preds = %else2, %then1 %18 = load i32, i32* %j, align 4 %19 = icmp ne i32 %18, 2 br i1 %19, label %then4, label %else5 then4: ; preds = %ifcont3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %ifcont3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 store i32 1, i32* %j, align 4 %20 = load i32, i32* %j, align 4 %21 = icmp ne i32 %20, 1 br i1 %21, label %then7, label %else8 then7: ; preds = %ifcont6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont9 else8: ; preds = %ifcont6 br label %ifcont9 ifcont9: ; preds = %else8, %then7 store i32 3, i32* %call_arg_value, align 4 call void @f(i32* %call_arg_value, i32* %j) %22 = alloca i64, align 8 %23 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %22, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %24 = load i64, i64* %22, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %23, i8** %25, align 8 %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %24, i64* %26, align 8 %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %28 = load i8*, i8** %27, align 8 %29 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %30 = load i64, i64* %29, align 8 %31 = trunc i64 %30 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %28, i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %32 = icmp eq i8* %23, null br i1 %32, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %ifcont9 call void @_lfortran_free_alloc(i8* %2, i8* %23) br label %free_done12 free_done12: ; preds = %free_nonnull11, %ifcont9 %33 = load i32, i32* %j, align 4 %34 = icmp ne i32 %33, 4 br i1 %34, label %then13, label %else14 then13: ; preds = %free_done12 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %free_done12 br label %ifcont15 ifcont15: ; preds = %else14, %then13 store i32 1, i32* %j, align 4 %35 = load i32, i32* %j, align 4 %36 = icmp ne i32 %35, 1 br i1 %36, label %then16, label %else17 then16: ; preds = %ifcont15 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont18 else17: ; preds = %ifcont15 br label %ifcont18 ifcont18: ; preds = %else17, %then16 store i32 3, i32* %call_arg_value, align 4 call void @f(i32* %call_arg_value, i32* %j) %37 = alloca i64, align 8 %38 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %37, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %39 = load i64, i64* %37, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 store i8* %38, i8** %40, align 8 %41 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 store i64 %39, i64* %41, align 8 %42 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 %43 = load i8*, i8** %42, align 8 %44 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 %45 = load i64, i64* %44, align 8 %46 = trunc i64 %45 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @17, i32 0, i32 0), i8* %43, i32 %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @16, i32 0, i32 0), i32 1) %47 = icmp eq i8* %38, null br i1 %47, label %free_done21, label %free_nonnull20 free_nonnull20: ; preds = %ifcont18 call void @_lfortran_free_alloc(i8* %2, i8* %38) br label %free_done21 free_done21: ; preds = %free_nonnull20, %ifcont18 %48 = load i32, i32* %j, align 4 %49 = icmp ne i32 %48, 4 br i1 %49, label %then22, label %else23 then22: ; preds = %free_done21 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @18, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont24 else23: ; preds = %free_done21 br label %ifcont24 ifcont24: ; preds = %else23, %then22 store i32 1, i32* %j, align 4 %50 = load i32, i32* %j, align 4 %51 = icmp ne i32 %50, 1 br i1 %51, label %then25, label %else26 then25: ; preds = %ifcont24 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont27 else26: ; preds = %ifcont24 br label %ifcont27 ifcont27: ; preds = %else26, %then25 %52 = load i32, i32* %i, align 4 %53 = add i32 %52, 2 store i32 %53, i32* %call_arg_value, align 4 call void @f(i32* %call_arg_value, i32* %j) %54 = alloca i64, align 8 %55 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.3, i32 0, i32 0), i64* %54, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %56 = load i64, i64* %54, align 8 %57 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc28, i32 0, i32 0 store i8* %55, i8** %57, align 8 %58 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc28, i32 0, i32 1 store i64 %56, i64* %58, align 8 %59 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc28, i32 0, i32 0 %60 = load i8*, i8** %59, align 8 %61 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc28, i32 0, i32 1 %62 = load i64, i64* %61, align 8 %63 = trunc i64 %62 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @23, i32 0, i32 0), i8* %60, i32 %63, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0), i32 1) %64 = icmp eq i8* %55, null br i1 %64, label %free_done30, label %free_nonnull29 free_nonnull29: ; preds = %ifcont27 call void @_lfortran_free_alloc(i8* %2, i8* %55) br label %free_done30 free_done30: ; preds = %free_nonnull29, %ifcont27 %65 = load i32, i32* %j, align 4 %66 = icmp ne i32 %65, 4 br i1 %66, label %then31, label %else32 then31: ; preds = %free_done30 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @24, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont33 else32: ; preds = %free_done30 br label %ifcont33 ifcont33: ; preds = %else32, %then31 br label %return return: ; preds = %ifcont33 br label %FINALIZE_SYMTABLE_subroutines_01 FINALIZE_SYMTABLE_subroutines_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } define void @f(i32* %a, i32* %b) { .entry: %0 = load i32, i32* %a, align 4 %1 = add i32 %0, 1 store i32 %1, i32* %b, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return ret void } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/llvm-bits_02-925bde2.stdout0000664000175000017500000001421415227365530023456 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I8\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I8\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %all_ones = alloca i64, align 8 store i64 -1, i64* %all_ones, align 8 %all_zeros = alloca i64, align 8 store i64 0, i64* %all_zeros, align 8 %block_size = alloca i32, align 4 store i32 64, i32* %block_size, align 4 %3 = alloca i64, align 8 %4 = alloca i32, align 4 store i32 64, i32* %4, align 4 %5 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %4) %6 = load i64, i64* %3, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %5, i8** %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %6, i64* %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %10 = load i8*, i8** %9, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %12 = load i64, i64* %11, align 8 %13 = trunc i64 %12 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %14 = icmp eq i8* %5, null br i1 %14, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %5) br label %free_done free_done: ; preds = %free_nonnull, %.entry %15 = alloca i64, align 8 %16 = alloca i64, align 8 store i64 0, i64* %16, align 8 %17 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %15, i32 0, i32 0, i32 0, i32 0, i32 0, i64* %16) %18 = load i64, i64* %15, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %17, i8** %19, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %18, i64* %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %22 = load i8*, i8** %21, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %24 = load i64, i64* %23, align 8 %25 = trunc i64 %24 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %22, i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %26 = icmp eq i8* %17, null br i1 %26, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %17) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %27 = alloca i64, align 8 %28 = alloca i64, align 8 store i64 -1, i64* %28, align 8 %29 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %27, i32 0, i32 0, i32 0, i32 0, i32 0, i64* %28) %30 = load i64, i64* %27, align 8 %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %29, i8** %31, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %30, i64* %32, align 8 %33 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %34 = load i8*, i8** %33, align 8 %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %36 = load i64, i64* %35, align 8 %37 = trunc i64 %36 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %34, i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %38 = icmp eq i8* %29, null br i1 %38, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %29) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 br label %return return: ; preds = %free_done6 br label %FINALIZE_SYMTABLE_bits_02 FINALIZE_SYMTABLE_bits_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr_openmp-openmp_38-2731560.json0000664000175000017500000000077415227365530024425 0ustar alastairalastair{ "basename": "asr_openmp-openmp_38-2731560", "cmd": "lfortran --show-asr --no-color --openmp {infile} -o {outfile}", "infile": "tests/../integration_tests/openmp_38.f90", "infile_hash": "8e3b8810b1c59c6bcfb2111da045536db52041003a5491a5a87f3f73", "outfile": null, "outfile_hash": null, "stdout": "asr_openmp-openmp_38-2731560.stdout", "stdout_hash": "b4eaa9f6fd69b2893c03501c7765975b42dbb39cabbb6585f68f4f3c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bin_op_real_dp-21bb7e8.stdout0000664000175000017500000002223515227365530024763 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bin_op_real_dp: (Program (SymbolTable 2 { u: (Variable 2 u [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 2 v [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zero: (Variable 2 zero [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bin_op_real_dp [] [(Assignment (Var 2 zero) (RealBinOp (RealConstant 1.000000 (Real 4) ) Div (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 7.000000 (Real 4) ) () ) (Real 4) (RealConstant 0.142857 (Real 4) ) ) () .false. .false. ) (Assignment (Var 2 u) (Cast (RealBinOp (RealConstant 1.000000 (Real 4) ) Div (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 7.000000 (Real 4) ) () ) (Real 4) (RealConstant 0.142857 (Real 4) ) ) RealToReal (Real 8) (RealConstant 0.142857 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 v) (RealBinOp (RealConstant 1.000000 (Real 8) ) Div (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 7.000000 (Real 8) ) () ) (Real 8) (RealConstant 0.142857 (Real 8) ) ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (RealConstant 1.000000 (Real 4) ) Div (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 7.000000 (Real 4) ) () ) (Real 4) (RealConstant 0.142857 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 zero) (Var 2 v) (Var 2 x) (Var 2 u)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit3-ffc1655.stdout0000664000175000017500000002714515227365530023736 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a: (Function (SymbolTable 2 { a: (Variable 2 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Unspecified () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Unspecified () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [(Real 4) (Real 4) (Complex 4) (Real 8)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 n) (Var 2 m) (Var 2 z) (Var 2 k)] [(Assignment (Var 2 n) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 m) (Cast (IntegerConstant 8 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 8.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 k) (Cast (RealConstant 9.230000 (Real 4) ) RealToReal (Real 8) (RealConstant 9.230000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 x) (ArrayConstant 20 [1, 2, 3, 4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 2 z) (ComplexConstructor (RealConstant 1.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) (Complex 4) (ComplexConstant 1.000000 2.000000 (Complex 4) ) ) () .false. .false. )] (Var 2 a) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-dim_assgn_test-2643606.stdout0000664000175000017500000000625715227365530024620 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { dim_assgn_test: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dim_assgn_test [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-subroutine3-8086030.stdout0000664000175000017500000000410715227365530024065 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f: (Variable 2 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f) (IntegerConstant 42 (Integer 4) Decimal) () .false. .false. )] (Var 2 f) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-matrix_matmul_02-4e306e0.stderr0000664000175000017500000000035415227365530025106 0ustar alastairalastairsemantic error: The argument `matrix_b` in `matmul` must be of type Integer, Real or Complex if first matrix is of numeric type --> tests/errors/matrix_matmul_02.f90:5:24 | 5 | print *, matmul(b, a) | ^ lfortran-0.64.0/tests/reference/asr-functions_15-ce4c4bb.json0000664000175000017500000000075615227365530024133 0ustar alastairalastair{ "basename": "asr-functions_15-ce4c4bb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_15.f90", "infile_hash": "a12bb6ea6046f7462606bd7d550d6bc8a46655d6593d5a5e4425d051", "outfile": null, "outfile_hash": null, "stdout": "asr-functions_15-ce4c4bb.stdout", "stdout_hash": "0a2bef903eeb53cadd95e87adac2400a28d1feb872f65252d4bd4d29", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/c_target_cuda-openmp_72-c617edf.stdout0000664000175000017500000001463215227365530025723 0ustar alastairalastair#include #include #include #include #include #include #ifdef USE_GPU #include #else #include"cuda_cpu_runtime.h" #endif struct dimension_descriptor { int32_t lower_bound, length, stride; }; struct r32 { float *data; struct dimension_descriptor dims[32]; int32_t n_dims; int32_t offset; bool is_allocated; }; // Implementations #ifdef USE_GPU __global__ #endif void compute_kernel_0(struct r32 *a, struct r32 *b, int i_n) { int i = blockIdx.x * blockDim.x + threadIdx.x + 1; if (i <= i_n) { a->data[((0 + (a->dims[0].stride * (i - a->dims[0].lower_bound))) + a->offset)] = (float)(i) + b->data[((0 + (b->dims[0].stride * (i - b->dims[0].lower_bound))) + b->offset)]*(float)(340); } } #ifndef USE_GPU void compute_kernel_0_wrapper(void **args) { struct r32 *a = *(struct r32**)args[0]; struct r32 *b = *(struct r32**)args[1]; int i_n = *(int*)args[2]; compute_kernel_0(a, b, i_n); } #endif #ifndef USE_GPU void compute_kernel_wrapper(void **args, void *func) { if (func == (void*)compute_kernel_0) { compute_kernel_0_wrapper(args); return; } fprintf(stderr, "Unknown kernel function\n"); exit(1); } #endif int main(int argc, char* argv[]) { _lpython_set_argv(argc, argv); int32_t __libasr_index_0_; struct r32 a_value; struct r32* a = &a_value; float *a_data; a->data = a_data; a->n_dims = 1; a->offset = 0; a->dims[0].lower_bound = 1; a->dims[0].length = 0; a->dims[0].stride = 1; struct r32 b_value; struct r32* b = &b_value; float *b_data; b->data = b_data; b->n_dims = 1; b->offset = 0; b->dims[0].lower_bound = 1; b->dims[0].length = 0; b->dims[0].stride = 1; int32_t i; a->n_dims = 1; a->dims[0].lower_bound = 1; a->dims[0].length = 10000000; a->dims[0].stride = 1; a->data = (float*) _lfortran_malloc_alloc(_lfortran_get_default_allocator(), 1*a->dims[0].length*sizeof(float)); a->is_allocated = true; b->n_dims = 1; b->dims[0].lower_bound = 1; b->dims[0].length = 10000000; b->dims[0].stride = 1; b->data = (float*) _lfortran_malloc_alloc(_lfortran_get_default_allocator(), 1*b->dims[0].length*sizeof(float)); b->is_allocated = true; for (__libasr_index_0_=((int32_t)b->dims[1-1].lower_bound); __libasr_index_0_<=((int32_t) b->dims[1-1].length + b->dims[1-1].lower_bound - 1); __libasr_index_0_++) { b->data[((0 + (b->dims[0].stride * (__libasr_index_0_ - b->dims[0].lower_bound))) + b->offset)] = (float)(5); } float *d_a_data = NULL; float *d_b_data = NULL; cudaError_t err; size_t a_data_size = a->dims[0].length * sizeof(float); err = cudaMalloc((void**)&d_a_data, a_data_size); if (err != cudaSuccess) { fprintf(stderr, "cudaMalloc failed for a_data: %s\n", cudaGetErrorString(err)); exit(1); } size_t b_data_size = b->dims[0].length * sizeof(float); err = cudaMalloc((void**)&d_b_data, b_data_size); if (err != cudaSuccess) { fprintf(stderr, "cudaMalloc failed for b_data: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(d_a_data, a->data, a_data_size, cudaMemcpyHostToDevice); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy H2D failed for a_data: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(d_b_data, b->data, b_data_size, cudaMemcpyHostToDevice); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy H2D failed for b_data: %s\n", cudaGetErrorString(err)); exit(1); } struct r32 h_a_copy = *a; h_a_copy.data = d_a_data; struct r32 h_b_copy = *b; h_b_copy.data = d_b_data; struct r32 *d_a_struct = NULL; err = cudaMalloc((void**)&d_a_struct, sizeof(struct r32)); if (err != cudaSuccess) { fprintf(stderr, "cudaMalloc failed for d_a_struct: %s\n", cudaGetErrorString(err)); exit(1); } struct r32 *d_b_struct = NULL; err = cudaMalloc((void**)&d_b_struct, sizeof(struct r32)); if (err != cudaSuccess) { fprintf(stderr, "cudaMalloc failed for d_b_struct: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(d_a_struct, &h_a_copy, sizeof(struct r32), cudaMemcpyHostToDevice); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy H2D failed for d_a_struct: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(d_b_struct, &h_b_copy, sizeof(struct r32), cudaMemcpyHostToDevice); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy H2D failed for d_b_struct: %s\n", cudaGetErrorString(err)); exit(1); } int i_n = 10000000; int threads_per_block = 256; int blocks = (i_n + threads_per_block - 1) / threads_per_block; dim3 grid_dim = {blocks, 1, 1}; dim3 block_dim = {threads_per_block, 1, 1}; void *kernel_args[] = {&d_a_struct, &d_b_struct, &i_n}; err = cudaLaunchKernel((void*)compute_kernel_0, grid_dim, block_dim, kernel_args, 0, NULL); if (err != cudaSuccess) { fprintf(stderr, "cudaLaunchKernel failed: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaDeviceSynchronize(); if (err != cudaSuccess) { fprintf(stderr, "cudaDeviceSynchronize failed: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(a->data, d_a_data, a_data_size, cudaMemcpyDeviceToHost); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy D2H failed for a_data: %s\n", cudaGetErrorString(err)); exit(1); } err = cudaMemcpy(b->data, d_b_data, b_data_size, cudaMemcpyDeviceToHost); if (err != cudaSuccess) { fprintf(stderr, "cudaMemcpy D2H failed for b_data: %s\n", cudaGetErrorString(err)); exit(1); } cudaFree(d_a_data); cudaFree(d_a_struct); cudaFree(d_b_data); cudaFree(d_b_struct); printf("%f%s%f\n", a->data[((0 + (a->dims[0].stride * (5 - a->dims[0].lower_bound))) + a->offset)], " ", b->data[((0 + (b->dims[0].stride * (5 - b->dims[0].lower_bound))) + b->offset)]); if (a->data[((0 + (a->dims[0].stride * (5 - a->dims[0].lower_bound))) + a->offset)] != (float)(1705)) { fprintf(stderr, "ERROR STOP"); exit(1); } if (b->data[((0 + (b->dims[0].stride * (5 - b->dims[0].lower_bound))) + b->offset)] != (float)(5)) { fprintf(stderr, "ERROR STOP"); exit(1); } return 0; } lfortran-0.64.0/tests/reference/ast-template_nested-35ad81a.json0000664000175000017500000000076715227365530024637 0ustar alastairalastair{ "basename": "ast-template_nested-35ad81a", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_nested.f90", "infile_hash": "b575d8ddebeed199be34078f7dfa99b5995ec81d1e730014775e9f5c", "outfile": null, "outfile_hash": null, "stdout": "ast-template_nested-35ad81a.stdout", "stdout_hash": "80cf1bfc31fc1fdfae013bd34548ba3b770184386527080c098d2817", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-parameter1-e3995e7.stdout0000664000175000017500000000526215227365530024033 0ustar alastairalastair(TranslationUnit [(Subroutine dcstep [] [] () () [] [] [] [(Declaration (AttrType TypeDoublePrecision [] () () None ) [] [(zero [] [] () () None ()) (p66 [] [] () () None ()) (two [] [] () () None ()) (three [] [] () () None ()) (s [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrParameter )] [(zero [] [] () (Real "0.0d0") Equal ()) (p66 [] [] () (Real "0.66d0") Equal ()) (two [] [] () (Real "2.0d0") Equal ()) (three [] [] () (Real "3.0d0") Equal ())] () )] [(Assignment 0 s (FuncCallOrArray max [] [(() (FuncCallOrArray abs [] [(() three () 0)] [] [] [] ) () 0) (() (FuncCallOrArray abs [] [(() two () 0)] [] [] [] ) () 0) (() (FuncCallOrArray abs [] [(() p66 () 0)] [] [] [] ) () 0)] [] [] [] ) () )] [] [] )] ) lfortran-0.64.0/tests/reference/run-print_intrinsics-9b076f7.stdout0000664000175000017500000000011415227365530025371 0ustar alastairalastairpi=acos(-1.0_sp) =" 3.14159274 " pi=acos(-1.0_dp) =" 3.1415926535897931 " lfortran-0.64.0/tests/reference/asr-arrays_107-d961168.stderr0000664000175000017500000000067615227365530023555 0ustar alastairalastairsemantic error: Passing a scalar argument to an array dummy argument is not allowed. Use --legacy-array-sections to enable sequence association --> tests/../integration_tests/arrays_107.f90:4:18 | 4 | call testsub(x(1, 1)) | ^^^^^^^ scalar argument | 9 | subroutine testsub(x) | ^^^^^^^^^^^^^^^^^^^^^... ... | 12 | end subroutine testsub | ...^^^^^^^^^^^^^^^^^^^^^^^^^^ array dummy argument lfortran-0.64.0/tests/reference/obj-valid_array_assignment_same_length_different_start-9ec7ffc.json0000664000175000017500000000073615227365530034157 0ustar alastairalastair{ "basename": "obj-valid_array_assignment_same_length_different_start-9ec7ffc", "cmd": "lfortran --no-color -c {infile} -o output.o", "infile": "tests/../integration_tests/valid_array_assignment_same_length_different_start.f90", "infile_hash": "21b0a7101b9336ee2eded7884da2046247ffa00ddacad8003ce71fef", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-format_02-3deee60.json0000664000175000017500000000076015227365530024007 0ustar alastairalastair{ "basename": "ast_f90-format_02-3deee60", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/format_02.f90", "infile_hash": "dcd9a1c68ffaff4df93d7299219c47741479f92da85570eb771f05b3", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-format_02-3deee60.stdout", "stdout_hash": "2ac160dca83be0ef10e8016e9b55c05325da2d2065f62eeaf21d6059", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-continue_compilation_1-04b6d40.stderr0000664000175000017500000021043615227365530026365 0ustar alastairalastairsemantic error: `function` attribute of 'frexp' conflicts with `subroutine` attribute --> tests/errors/continue_compilation_1.f90:53:5 - 57:24 | 53 | subroutine frexp(x,n) | ^^^^^^^^^^^^^^^^^^^^^... ... | 57 | end subroutine frexp | ...^^^^^^^^^^^^^^^^^^^^^^^^ declared as subroutine here | 45 | function frexp(x,n) result(r) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... ... | 49 | end function frexp | ...~~~~~~~~~~~~~~~~~~~~~~ previously declared as function here semantic error: Derived type `another_undefined_type` is not defined --> tests/errors/continue_compilation_1.f90:79:9 | 79 | type(another_undefined_type) :: s3_in_subroutine | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type used here is not defined in any scope semantic error: c_char should have a length of 1 --> tests/errors/continue_compilation_1.f90:103:9 | 103 | character(len=2, kind=c_char), intent(in) :: c | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Dummy argument 'c' not defined --> tests/errors/continue_compilation_1.f90:101:5 - 104:20 | 101 | subroutine s(c) bind(c) | ^^^^^^^^^^^^^^^^^^^^^^^... ... | 104 | end subroutine s | ...^^^^^^^^^^^^^^^^^^^^ semantic error: Assumed-size '*' is only permitted in the last dimension --> tests/errors/continue_compilation_1.f90:117:31 | 117 | real, intent(in) :: a(*, 10) | ^ semantic error: Dummy argument 'a' not defined --> tests/errors/continue_compilation_1.f90:116:5 - 118:18 | 116 | subroutine assumed_size_star_pos_1(a) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 118 | end subroutine | ...^^^^^^^^^^^^^^^^^^ semantic error: Assumed-size '*' is only permitted in the last dimension --> tests/errors/continue_compilation_1.f90:121:19 | 121 | real :: a(*, 10) | ^ semantic error: Dummy argument 'a' not defined --> tests/errors/continue_compilation_1.f90:120:5 - 122:18 | 120 | subroutine assumed_size_star_pos_2(a) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 122 | end subroutine | ...^^^^^^^^^^^^^^^^^^ warning: non-standard Fortran 77-style initialization (extension) --> tests/errors/continue_compilation_1.f90:162:27 | 162 | enumerator :: red/1/ | ^^^^^^ Use modern syntax instead: integer :: red = 1 warning: non-standard Fortran 77-style initialization (extension) --> tests/errors/continue_compilation_1.f90:164:32 | 164 | type(MyClass), save :: slash_x/MyClass(1)/ | ^^^^^^^^^^^^^^^^^^^ Use modern syntax instead: integer :: slash_x = MyClass(1) warning: non-standard Fortran 77-style initialization (extension) --> tests/errors/continue_compilation_1.f90:165:26 | 165 | integer, save :: slash_y/2/ | ^^^^^^^^^^ Use modern syntax instead: integer :: slash_y = 2 semantic error: Procedure declarations without an explicit interface (procedure()) are not yet supported. Please use procedure(interface_name) or declare an interface block. --> tests/errors/continue_compilation_1.f90:179:9 | 179 | procedure(), pointer :: pf1 | ^^^^^^^^^^^ semantic error: Procedure 'op_clash_f' is already defined as an interface body --> tests/errors/continue_compilation_1.f90:186:5 - 190:27 | 186 | function op_clash_f(x) result(y) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 190 | end function op_clash_f | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 35 | function op_clash_f(x) result(y) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... ... | 38 | end function | ...~~~~~~~~~~~~~~~~~~~~ is already defined here semantic error: Defined assignment procedure must not return a value --> tests/errors/continue_compilation_1.f90:141:5 - 145:32 | 141 | integer function assign_func_bad(lhs, rhs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 145 | end function assign_func_bad | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Defined assignment procedure must have exactly two arguments --> tests/errors/continue_compilation_1.f90:147:5 - 149:37 | 147 | subroutine assign_wrong_nargs(lhs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 149 | end subroutine assign_wrong_nargs | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: First argument of defined assignment must have INTENT(OUT) or INTENT(INOUT) --> tests/errors/continue_compilation_1.f90:151:5 - 154:33 | 151 | subroutine assign_bad_lhs(lhs, rhs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 154 | end subroutine assign_bad_lhs | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Second argument of defined assignment must have INTENT(IN) --> tests/errors/continue_compilation_1.f90:156:5 - 159:33 | 156 | subroutine assign_bad_rhs(lhs, rhs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 159 | end subroutine assign_bad_rhs | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Interface 'f_missing' is referenced but not defined --> tests/errors/continue_compilation_1.f90:22:9 | 22 | procedure(f_missing), pointer, nopass :: fn => null() | ^^^^^^^^^^^^^^^^^^^^ Referenced here semantic error: Interface 'missing_global_interface' is referenced but not defined --> tests/errors/continue_compilation_1.f90:25:5 | 25 | procedure(missing_global_interface), pointer :: p => null() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Referenced here semantic error: Interface 'sub_test' is referenced but not defined --> tests/errors/continue_compilation_1.f90:182:9 | 182 | procedure(sub_test), pointer :: pf2 | ^^^^^^^^^^^^^^^^^^^ Referenced here semantic error: Implicit typing is not allowed, enable it by using --implicit-typing --> tests/errors/continue_compilation_1.f90:210:5 - 212:49 | 210 | implicit integer(a-f), real(e-z) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 212 | ! Put declarations below without empty lines | ...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: arguments of `repeat` intrinsic must be scalar --> tests/errors/continue_compilation_1.f90:233:38 | 233 | character(3), parameter :: ar1 = repeat(["abc", "#^1", "123"], [1, 2, 3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Cannot convert LOGICAL to REAL --> tests/errors/continue_compilation_1.f90:236:20 | 236 | real :: adwf = .true. | ^^^^^^ semantic error: Symbol is already declared in the same scope --> tests/errors/continue_compilation_1.f90:240:31 | 240 | integer , dimension(3) :: array | ^^^^^ redeclaration | 239 | double precision array | ~~~~~ original declaration semantic error: Array members must me of the same type as the struct --> tests/errors/continue_compilation_1.f90:244:53 | 244 | type(MyClass), parameter :: myclass_array(2) = [1, MyClass(10)] | ^ semantic error: Initialization of `myclass_array2` must reduce to a compile time constant. --> tests/errors/continue_compilation_1.f90:245:66 | 245 | type(MyClass), parameter :: myclass_array2(2) = [MyClass(1), MyClass(q1)] | ^^^^^^^^^^^ semantic error: Syntax error in CHARACTER declaration: only 'len' and 'kind' are allowed as type parameters --> tests/errors/continue_compilation_1.f90:246:5 | 246 | character(width=10) :: str_c_1 | ^^^^^^^^^^^^^^^^^^^ semantic error: Syntax error in CHARACTER declaration: can't use a keyword argument more than once --> tests/errors/continue_compilation_1.f90:247:5 | 247 | character(len=10, len=20) :: str_c_2 | ^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Syntax error in CHARACTER declaration: positional type parameters cannot follow a keyword argument --> tests/errors/continue_compilation_1.f90:248:5 | 248 | character(len=10, 1) :: str_c_3 | ^^^^^^^^^^^^^^^^^^^^ semantic error: Syntax error in CHARACTER declaration: using only 'len' keyword argument after a positional type is invalid --> tests/errors/continue_compilation_1.f90:249:5 | 249 | character(1, len=20) :: str_c_4 | ^^^^^^^^^^^^^^^^^^^^ semantic error: Allocatable array 'z_01' must have a deferred shape or assumed rank --> tests/errors/continue_compilation_1.f90:250:5 | 250 | character(:), allocatable :: z_01(2) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Expecting a scalar integer or parameter annotated integer variable --> tests/errors/continue_compilation_1.f90:252:26 | 252 | logical :: mask_size(size(arr_size)) | ^^^^^^^^^^^^^^ semantic error: `protected` attribute is only allowed in specification part of a module --> tests/errors/continue_compilation_1.f90:253:5 | 253 | integer, protected :: protected_attr_var | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `protected` attribute is only allowed in specification part of a module --> tests/errors/continue_compilation_1.f90:254:5 | 254 | integer, parameter, protected :: protected_parameter_var | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Variable `n` cannot appear in the expression as it is not a constant --> tests/errors/continue_compilation_1.f90:259:27 | 259 | integer :: elements(n) | ^ semantic error: Derived type `bspline_3d` is not defined --> tests/errors/continue_compilation_1.f90:261:5 | 261 | type(bspline_3d) :: s3_in_program | ^^^^^^^^^^^^^^^^ Type used here is not defined in any scope semantic error: BOZ literal constant cannot be used in binary operations --> tests/errors/continue_compilation_1.f90:263:19 | 263 | integer::tt = b'01' * 3 | ^^^^^^^^^ semantic error: An 'allocatable' variable cannot have an initialization expression --> tests/errors/continue_compilation_1.f90:265:29 | 265 | integer, allocatable :: allocate_int = 1 | ^^^^^^^^^^^^^^^^ semantic error: An 'allocatable' variable cannot have an initialization expression --> tests/errors/continue_compilation_1.f90:266:34 | 266 | character(:), allocatable :: allocate_char = "H" | ^^^^^^^^^^^^^^^^^^^ semantic error: Transformational intrinsic is not permitted in an initialization expression --> tests/errors/continue_compilation_1.f90:270:42 | 270 | integer, parameter :: param_minloc = minloc(param_arr, 1, [.false., .false., .false.]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Variable `uninitialized_param_local` with parameter attribute is not initialised --> tests/errors/continue_compilation_1.f90:278:5 | 278 | type(MyClass), parameter :: uninitialized_param_local | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Symbol not found: `non_existent_symbol` --> tests/errors/continue_compilation_1.f90:279:5 | 279 | type(MyClass) :: err_obj1 = non_existent_symbol | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Named initialization not supported with: my_func --> tests/errors/continue_compilation_1.f90:280:5 | 280 | type(MyClass) :: err_obj2 = my_func | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Initialization with non-constant variable `non_parameter_var` is not allowed --> tests/errors/continue_compilation_1.f90:282:5 | 282 | type(MyClass) :: err_obj3 = non_parameter_var | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 281 | integer :: non_parameter_var = 5 | ~~~~~~~~~~~~~~~~~~~~~ declared here semantic error: Parameter `myclass_array` has no initialization value --> tests/errors/continue_compilation_1.f90:283:5 | 283 | type(MyClass) :: err_obj4 = myclass_array | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Symbol not found: `uninitialized_param_local` --> tests/errors/continue_compilation_1.f90:284:5 | 284 | type(MyClass) :: err_obj5 = uninitialized_param_local | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: CLASS variable 'inst_tt' must be dummy, allocatable or pointer --> tests/errors/continue_compilation_1.f90:295:5 | 295 | class(type_t) :: inst_tt | ^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Result of `erfc` underflows its kind --> tests/errors/continue_compilation_1.f90:296:40 | 296 | real(8), parameter :: erfc_param = erfc(40.12_8) | ^^^^^^^^^^^^^ semantic error: Contiguous attribute can only be applied to declared variables --> tests/errors/continue_compilation_1.f90:298:19 | 298 | contiguous :: contig_not_declared | ^^^^^^^^^^^^^^^^^^^ semantic error: Contiguous attribute can only be applied to variables --> tests/errors/continue_compilation_1.f90:299:19 | 299 | contiguous :: MyClass | ^^^^^^^ semantic error: ‘shape’ argument of ‘reshape’ intrinsic has negative element (-2) --> tests/errors/continue_compilation_1.f90:302:53 | 302 | integer, parameter :: qval(2) = reshape([7, 8], -[z]) | ^^^^ semantic error: LEN parameters in parameterized derived types are not supported yet --> tests/errors/continue_compilation_1.f90:305:9 | 305 | integer, len :: n | ^^^^^^^^^^^^^^^^^ semantic error: Intent attribute can only be applied to procedure arguments --> tests/errors/continue_compilation_1.f90:614:14 | 614 | integer, intent(out) :: out_intent | ^^^^^^^^^^^ semantic error: Intent attribute can only be applied to procedure arguments --> tests/errors/continue_compilation_1.f90:615:14 | 615 | integer, intent(in) :: in_intent | ^^^^^^^^^^ semantic error: Parameterized derived type 'container' parameter 'ik' has no default value and must be specified --> tests/errors/continue_compilation_1.f90:626:5 | 626 | type(container(4)) :: obj1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Parameterized derived type 'container' parameter 'rk' has no default value and must be specified --> tests/errors/continue_compilation_1.f90:627:5 | 627 | type(container) :: obj2 | ^^^^^^^^^^^^^^^^^^^^^^^ semantic error: The shapes of the `array` and `mask` arguments of the `MinLoc` intrinsic must be the same --> tests/errors/continue_compilation_1.f90:630:47 | 630 | integer :: minloc_shape_mismatch = minloc([2, 1, 3], 1, [.true., .false.]) | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ `array` has shape [3], but `mask` has shape [2] semantic error: The shapes of the `array` and `mask` arguments of the `MaxLoc` intrinsic must be the same --> tests/errors/continue_compilation_1.f90:631:47 | 631 | integer :: maxloc_shape_mismatch = maxloc([2, 1, 3], 1, [.true., .false.]) | ^^^^^^^^^ ^^^^^^^^^^^^^^^^^ `array` has shape [3], but `mask` has shape [2] semantic error: variable cannot appear in character length expression --> tests/errors/continue_compilation_1.f90:638:21 | 638 | character(len = char_len_var) :: char_nonconst | ^^^^^^^^^^^^ semantic error: type mismatch in initialization: `string` cannot be assigned to `integer` --> tests/errors/continue_compilation_1.f90:643:32 | 643 | integer, parameter :: n2 = "abc" | ^^^^^ semantic error: Pointer initialization target `ptr_src_no_target` must have the `target` attribute --> tests/errors/continue_compilation_1.f90:645:5 | 645 | type(MyClass), pointer :: ptr_requires_target => ptr_src_no_target | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 644 | type(MyClass) :: ptr_src_no_target | ~~~~~~~~~~~~~~~~~ declared here semantic error: Type mismatch in pointer initialization of `ptr_type_mismatch` --> tests/errors/continue_compilation_1.f90:647:5 | 647 | type(MyClass), pointer :: ptr_type_mismatch => ptr_tgt_base | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | 646 | type(Base), target :: ptr_tgt_base | ~~~~~~~~~~~~ target declared here semantic error: Dimensions specified for 'm' after its initialization --> tests/errors/continue_compilation_1.f90:654:18 | 654 | dimension :: m(3) | ^^^^ semantic error: Cannot convert LOGICAL to REAL --> tests/errors/continue_compilation_1.f90:687:24 | 687 | real :: adwf = .true. | ^^^^^^ warning: Assuming implicit save attribute for variable declaration --> tests/errors/continue_compilation_1.f90:691:23 | 691 | integer(4) :: arr1(3) = [2471095, 820012001, 39024800] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement semantic error: Allocatable array 'x' must have a deferred shape or assumed rank --> tests/errors/continue_compilation_1.f90:717:9 | 717 | integer,allocatable :: x(3) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Pointer array 'y' must have a deferred shape or assumed rank --> tests/errors/continue_compilation_1.f90:718:9 | 718 | integer,pointer :: y(3) | ^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: COMMON block array bounds must be constant expressions --> tests/errors/continue_compilation_1.f90:729:20 | 729 | integer :: arr(n:10) | ^^^^^^^^^ semantic error: COMMON block array bounds must be constant expressions --> tests/errors/continue_compilation_1.f90:736:20 | 736 | integer :: arr(1:n) | ^^^^^^^^ semantic error: Variable `a` cannot have both the OPTIONAL and VALUE attribute because procedure `bindc_optional_value` is BIND(C) --> tests/errors/continue_compilation_1.f90:748:5 - 751:18 | 748 | subroutine bindc_optional_value(a) bind(c) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 751 | end subroutine | ...^^^^^^^^^^^^^^^^^^ semantic error: Function `c_loc` is not permitted in an initialization expression --> tests/errors/continue_compilation_1.f90:810:13 | 810 | type(c_ptr) :: ptr = c_loc(target_value) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: length specifier is only valid for character type --> tests/errors/continue_compilation_1.f90:869:20 | 869 | integer :: i*2 | ^^^ semantic error: Symbol 'undeclared_proc' not declared --> tests/errors/continue_compilation_1.f90:640:9 | 640 | module procedure undeclared_proc ! {Error} Symbol 'undeclared_proc' not declared | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Statement function 'statement_function_name_conflict' conflicts with function name --> tests/errors/continue_compilation_1.f90:72:9 | 72 | statement_function_name_conflict(argument) = 0 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: The upper bound of an assumed-size array's last dimension is not defined --> tests/errors/continue_compilation_1.f90:111:18 | 111 | print *, ubound(a, 1) | ^^^^^^^^^^^^ semantic error: The DIM argument must be present when calling UBOUND on an assumed-size array --> tests/errors/continue_compilation_1.f90:112:18 | 112 | print *, ubound(b) | ^^^^^^^^^ semantic error: The upper bound of an assumed-size array's last dimension is not defined --> tests/errors/continue_compilation_1.f90:113:18 | 113 | print *, ubound(c, 2) | ^^^^^^^^^^^^ semantic error: Character intrinsic 'trim' with class(*) argument must be inside 'type is (character(len=*))' guard --> tests/errors/continue_compilation_1.f90:135:18 | 135 | print *, trim(generic) | ^^^^^^^^^^^^^ invalid use of character intrinsic with polymorphic argument semantic error: Character intrinsic 'adjustl' with class(*) argument must be inside 'type is (character(len=*))' guard --> tests/errors/continue_compilation_1.f90:136:18 | 136 | print *, adjustl(generic) | ^^^^^^^^^^^^^^^^ invalid use of character intrinsic with polymorphic argument semantic error: Character intrinsic 'adjustr' with class(*) argument must be inside 'type is (character(len=*))' guard --> tests/errors/continue_compilation_1.f90:137:18 | 137 | print *, adjustr(generic) | ^^^^^^^^^^^^^^^^ invalid use of character intrinsic with polymorphic argument semantic error: Character intrinsic 'len_trim' with class(*) argument must be inside 'type is (character(len=*))' guard --> tests/errors/continue_compilation_1.f90:138:18 | 138 | print *, len_trim(generic) | ^^^^^^^^^^^^^^^^^ invalid use of character intrinsic with polymorphic argument semantic error: Variable 'pf1' is not declared --> tests/errors/continue_compilation_1.f90:180:9 | 180 | pf1 => dummy_sub | ^^^ 'pf1' is undeclared semantic error: Interface mismatch in procedure pointer assignment at (1): 'dummy_func' is not a subroutine --> tests/errors/continue_compilation_1.f90:183:9 | 183 | pf2 => dummy_func | ^^^^^^^^^^^^^^^^^ (1) semantic error: Intrinsic 'not_real' is not recognized --> tests/errors/continue_compilation_1.f90:268:14 | 268 | call sub(not_real) | ^^^^^^^^ 'not_real' is not a known intrinsic function semantic error: Format specifier in print statement must be of type default character --> tests/errors/continue_compilation_1.f90:326:11 | 326 | print 1+2 | ^^^ semantic error: Array index 10 is out of bounds (1 to 3) in dimension 1 --> tests/errors/continue_compilation_1.f90:328:14 | 328 | print *, a(10) | ^^^^^ semantic error: Assignment to loop variable `i` is not allowed --> tests/errors/continue_compilation_1.f90:335:8 | 335 | i = i + 1 | ^ semantic error: first argument of `maskl` must be less than or equal to the BIT_SIZE of INTEGER(KIND=4) --> tests/errors/continue_compilation_1.f90:339:13 | 339 | print*, maskl(63) | ^^^^^^^^^ semantic error: first argument of `maskr` must be less than or equal to the BIT_SIZE of INTEGER(KIND=4) --> tests/errors/continue_compilation_1.f90:341:13 | 341 | print*, maskr(63) | ^^^^^^^^^ semantic error: first argument of `maskl` must be nonnegative --> tests/errors/continue_compilation_1.f90:343:13 | 343 | print*, maskl(-24) | ^^^^^^^^^^ semantic error: first argument of `maskr` must be nonnegative --> tests/errors/continue_compilation_1.f90:345:13 | 345 | print*, maskr(-24) | ^^^^^^^^^^ semantic error: The argument `matrix_a` in `matmul` must be of type Integer, Real, Complex or Logical --> tests/errors/continue_compilation_1.f90:347:21 | 347 | print *, matmul(a1, b1) | ^^ semantic error: The argument `matrix_b` in `matmul` must be of type Integer, Real or Complex if first matrix is of numeric type --> tests/errors/continue_compilation_1.f90:349:25 | 349 | print *, matmul(b1, a1) | ^^ semantic error: The argument `matrix_b` in `matmul` must be of type Logical if first matrix is of Logical type --> tests/errors/continue_compilation_1.f90:351:25 | 351 | print *, matmul(a2, b1) | ^^ semantic error: `matmul` accepts arrays of rank 1 or 2 only, provided an array with rank, 3 --> tests/errors/continue_compilation_1.f90:353:21 | 353 | print *, matmul(a3, b1) | ^^ semantic error: `matmul` accepts arrays of rank 1 or 2 only, provided an array with rank, 4 --> tests/errors/continue_compilation_1.f90:355:25 | 355 | print *, matmul(b1, b4) | ^^ semantic error: The argument `matrix_b` in `matmul` must be of rank 2, provided an array with rank, 1 --> tests/errors/continue_compilation_1.f90:357:24 | 357 | print *, matmul(a, b) | ^ semantic error: `transpose` accepts arrays of rank 2 only, provided an array with rank, 1 --> tests/errors/continue_compilation_1.f90:359:24 | 359 | print *, transpose(a) | ^ semantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/continue_compilation_1.f90:361:14 | 361 | print *, merge_bits(8, 12_8, 2) | ^^^^^^^^^^^^^^^^^^^^^^ semantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/continue_compilation_1.f90:363:14 | 363 | print *, merge_bits(a5, b5, c5) | ^^^^^^^^^^^^^^^^^^^^^^ semantic error: Second argument of modulo cannot be 0 --> tests/errors/continue_compilation_1.f90:379:14 | 379 | print *, modulo(1, 0) | ^^^^^^^^^^^^ semantic error: Procedure 'my_func' accepts 2 arguments, but 3 were provided --> tests/errors/continue_compilation_1.f90:381:5 | 381 | call my_func(y=1, x=2, z=1) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of arguments to 'my_func' semantic error: Result of `nint` overflows its kind(4) --> tests/errors/continue_compilation_1.f90:384:13 | 384 | print*, nint(1e12_8) | ^^^^^^^^^^^^ semantic error: Result of `nint` overflows its kind(4) --> tests/errors/continue_compilation_1.f90:385:13 | 385 | print*, nint(1000000000000.0000000000000000d0) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Invalid argument `hello` supplied --> tests/errors/continue_compilation_1.f90:387:5 | 387 | OPEN(file="numbers", hello="world") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Cannot assign to a constant variable --> tests/errors/continue_compilation_1.f90:389:5 | 389 | i1 = 3 | ^^^^^^ assignment here | 219 | integer, parameter :: i1 = 2 | ~~~~~~ declared as constant semantic error: Expected 0 or 1 arguments, got 2 arguments instead. --> tests/errors/continue_compilation_1.f90:391:5 | 391 | call FLUSH(1, 2) | ^^^^^^^^^^^^^^^^ semantic error: `kind` argument of `verify` intrinsic must be a scalar --> tests/errors/continue_compilation_1.f90:393:39 | 393 | print*, verify(string, set, kind= [4, 4] ) | ^^^^^^ semantic error: arguments of `and` intrinsic must be scalar --> tests/errors/continue_compilation_1.f90:394:14 | 394 | print *, and([1, 2, 3], [1, 2, 3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: The shift argument of 'dshiftl' intrinsic must be less than or equal to the bit size of the integer --> tests/errors/continue_compilation_1.f90:396:28 | 396 | print *, dshiftl(1, 2, 34) | ^^ semantic error: The shift argument of 'dshiftl' intrinsic must be non-negative integer --> tests/errors/continue_compilation_1.f90:397:28 | 397 | print *, dshiftl(1, 2, -2) | ^^ semantic error: The shift argument of 'dshiftr' intrinsic must be less than or equal to the bit size of the integer --> tests/errors/continue_compilation_1.f90:399:28 | 399 | print *, dshiftr(1, 2, 34) | ^^ semantic error: The shift argument of 'dshiftr' intrinsic must be non-negative integer --> tests/errors/continue_compilation_1.f90:400:28 | 400 | print *, dshiftr(1, 2, -2) | ^^ semantic error: arguments of `selected_int_kind` intrinsic must be scalar --> tests/errors/continue_compilation_1.f90:402:14 | 402 | print *, selected_int_kind([1,2,3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: arguments of `selected_real_kind` intrinsic must be scalar --> tests/errors/continue_compilation_1.f90:403:14 | 403 | print *, selected_real_kind([1,2,3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: arguments of `selected_char_kind` intrinsic must be scalar --> tests/errors/continue_compilation_1.f90:404:14 | 404 | print *, selected_char_kind(['c', 'a', 'b']) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `dim` argument of the `Sum` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:413:30 | 413 | print *, sum(arr1, dim = 2) | ^ Must have 0 < dim <= 1 for array of rank 1 semantic error: `dim` argument of the `Sum` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:414:30 | 414 | print *, sum(arr1, dim = -1) | ^^ Must have 0 < dim <= 1 for array of rank 1 semantic error: `dim` argument of the `Sum` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:415:44 | 415 | print *, sum(arr1, mask = mask1, dim = 2) | ^ Must have 0 < dim <= 1 for array of rank 1 semantic error: `dim` argument of the `Sum` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:416:44 | 416 | print *, sum(arr1, mask = mask1, dim = -1) | ^^ Must have 0 < dim <= 1 for array of rank 1 semantic error: `dim` argument of the `Product` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:418:34 | 418 | print *, product(arr2, dim = 3) | ^ Must have 0 < dim <= 2 for array of rank 2 semantic error: `dim` argument of the `Product` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:419:34 | 419 | print *, product(arr2, dim = -1) | ^^ Must have 0 < dim <= 2 for array of rank 2 semantic error: `dim` argument of the `Product` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:420:48 | 420 | print *, product(arr2, mask = mask2, dim = 3) | ^ Must have 0 < dim <= 2 for array of rank 2 semantic error: `dim` argument of the `Product` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:421:48 | 421 | print *, product(arr2, mask = mask2, dim = -1) | ^^ Must have 0 < dim <= 2 for array of rank 2 semantic error: `dim` argument of the `Iparity` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:423:34 | 423 | print *, iparity(arr3, dim = 4) | ^ Must have 0 < dim <= 3 for array of rank 3 semantic error: `dim` argument of the `Iparity` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:424:34 | 424 | print *, iparity(arr3, dim = -1) | ^^ Must have 0 < dim <= 3 for array of rank 3 semantic error: `dim` argument of the `Iparity` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:425:48 | 425 | print *, iparity(arr3, mask = mask3, dim = 4) | ^ Must have 0 < dim <= 3 for array of rank 3 semantic error: `dim` argument of the `Iparity` intrinsic is out of bounds --> tests/errors/continue_compilation_1.f90:426:48 | 426 | print *, iparity(arr3, mask = mask3, dim = -1) | ^^ Must have 0 < dim <= 3 for array of rank 3 semantic error: Expected logical expression in if statement, but recieved integer(4) instead --> tests/errors/continue_compilation_1.f90:428:9 | 428 | if (q1) q1 = 1 | ^^ integer(4) expression, expected logical semantic error: Expected logical expression in if statement, but recieved real(4) instead --> tests/errors/continue_compilation_1.f90:429:9 | 429 | if (r1) r1 = 1.0 | ^^ real(4) expression, expected logical semantic error: Expected logical expression in if statement, but recieved string instead --> tests/errors/continue_compilation_1.f90:430:9 | 430 | if (c1) c1 = 'a' | ^^ string expression, expected logical semantic error: The ranks of the `array` and `mask` arguments of the `Sum` intrinsic must be the same --> tests/errors/continue_compilation_1.f90:435:18 | 435 | print *, sum(arr1, mask2) | ^^^^ ^^^^^ `array` is rank 1, but `mask` is rank 2 semantic error: `dim` argument of `Sum` intrinsic must be INTEGER --> tests/errors/continue_compilation_1.f90:436:24 | 436 | print *, sum(arr2, mask3, 2) | ^^^^^ semantic error: The shapes of the `array` and `mask` arguments of the `Iparity` intrinsic must be the same --> tests/errors/continue_compilation_1.f90:437:22 | 437 | print *, iparity(arr2, mask4) | ^^^^ ^^^^^ `array` has shape [2,3], but `mask` has shape [3,2] semantic error: `dim` argument of `Iparity` intrinsic must be INTEGER --> tests/errors/continue_compilation_1.f90:438:28 | 438 | print *, iparity(arr3, mask5, 3) | ^^^^^ semantic error: Argument to 'present' must be a variable, but got an expression --> tests/errors/continue_compilation_1.f90:441:22 | 441 | print *, present(a + 1) | ^^^^^ Expected a variable here semantic error: Argument to 'present' must be an optional dummy argument --> tests/errors/continue_compilation_1.f90:444:22 | 444 | print *, present(a) | ^ This variable is not 'optional' semantic error: Different shape for arguments `array` and `mask` for pack intrinsic (3 and 4) --> tests/errors/continue_compilation_1.f90:446:30 | 446 | print *, pack([1, 2, 3], [.true., .true., .true., .true.]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: reshape accepts arrays for `source` argument, found string instead. --> tests/errors/continue_compilation_1.f90:448:22 | 448 | print *, reshape("hello", [2, 3]) | ^^^^^^^ semantic error: reshape accepts arrays for `source` argument, found logical instead. --> tests/errors/continue_compilation_1.f90:449:22 | 449 | print *, reshape(.true., [2, 3]) | ^^^^^^ semantic error: reshape accepts arrays for `shape` argument, found string instead. --> tests/errors/continue_compilation_1.f90:450:36 | 450 | print *, reshape([1, 2, 3, 4], "hello") | ^^^^^^^ semantic error: reshape accepts arrays for `shape` argument, found logical instead. --> tests/errors/continue_compilation_1.f90:451:36 | 451 | print *, reshape([1, 2, 3, 4], .false.) | ^^^^^^^ semantic error: reshape accepts `source` array with size greater than or equal to size specified by `shape` array --> tests/errors/continue_compilation_1.f90:453:14 | 453 | print *, reshape([1, 2, 3, 4], [2, 3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `shape` specifies size of 6 which exceeds the `source` array size of 4 semantic error: Division by zero --> tests/errors/continue_compilation_1.f90:456:14 | 456 | print *, 1/0 | ^^^ semantic error: Division by zero --> tests/errors/continue_compilation_1.f90:457:14 | 457 | print *, x/zero | ^^^^^^ semantic error: Type mismatch in binary operator, the types must be compatible --> tests/errors/continue_compilation_1.f90:458:14 | 458 | print *, v**str | ^ ^^^ type mismatch (real and string) semantic error: Type mismatch in binary operator, the types must be compatible --> tests/errors/continue_compilation_1.f90:459:14 | 459 | print *, str**v | ^^^ ^ type mismatch (string and real) semantic error: The shift argument of 'shiftl' intrinsic must be less than or equal to the bit size of the integer --> tests/errors/continue_compilation_1.f90:461:24 | 461 | print *, shiftl(2, 34) | ^^ Shift value is 34, but bit size of integer is 32 semantic error: The shift argument of 'shiftl' intrinsic must be non-negative integer --> tests/errors/continue_compilation_1.f90:462:24 | 462 | print *, shiftl(2, -3) | ^^ semantic error: The shift argument of 'shiftr' intrinsic must be less than or equal to the bit size of the integer --> tests/errors/continue_compilation_1.f90:463:24 | 463 | print *, shiftr(2, 34) | ^^ Shift value is 34, but bit size of integer is 32 semantic error: The shift argument of 'shiftr' intrinsic must be non-negative integer --> tests/errors/continue_compilation_1.f90:464:24 | 464 | print *, shiftr(2, -3) | ^^ semantic error: The shift argument of 'rshift' intrinsic must be less than or equal to the bit size of the integer --> tests/errors/continue_compilation_1.f90:465:24 | 465 | print *, rshift(2, 34) | ^^ Shift value is 34, but bit size of integer is 32 semantic error: The shift argument of 'rshift' intrinsic must be non-negative integer --> tests/errors/continue_compilation_1.f90:466:24 | 466 | print *, rshift(2, -3) | ^^ semantic error: Input to `Sum` is expected to be numeric, but got string[:] --> tests/errors/continue_compilation_1.f90:468:18 | 468 | print *, sum([c1]) | ^^^^ must be integer, real or complex type semantic error: Input to `Product` is expected to be numeric, but got string[:] --> tests/errors/continue_compilation_1.f90:469:22 | 469 | print *, product([c1]) | ^^^^ must be integer, real or complex type semantic error: Input to `MinVal` is expected to be of integer, real or character type, but got complex[:] --> tests/errors/continue_compilation_1.f90:470:21 | 470 | print *, minval([c]) | ^^^ must be integer, real or character type semantic error: Input to `MaxVal` is expected to be of integer, real or character type, but got complex[:] --> tests/errors/continue_compilation_1.f90:471:21 | 471 | print *, maxval([c]) | ^^^ must be integer, real or character type semantic error: Argument to intrinsic `Sum` is expected to be an array, found: integer --> tests/errors/continue_compilation_1.f90:473:14 | 473 | print *, sum(q1) | ^^^^^^^ semantic error: Argument to intrinsic `Product` is expected to be an array, found: real --> tests/errors/continue_compilation_1.f90:474:14 | 474 | print *, product(r1) | ^^^^^^^^^^^ semantic error: Argument to intrinsic `MinVal` is expected to be an array, found: integer --> tests/errors/continue_compilation_1.f90:475:14 | 475 | print *, minval(q1) | ^^^^^^^^^^ semantic error: Argument to intrinsic `MaxVal` is expected to be an array, found: real --> tests/errors/continue_compilation_1.f90:476:14 | 476 | print *, maxval(r1) | ^^^^^^^^^^ semantic error: 'mask' argument of 'sum' intrinsic must be logical --> tests/errors/continue_compilation_1.f90:478:14 | 478 | print *, sum([1, 2, 3], mask = [1, 2, 3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:479:5 | 479 | z1 = y | ^^ ^ type mismatch (real and logical) semantic error: reshape accepts arrays for `pad` argument, found integer instead. --> tests/errors/continue_compilation_1.f90:481:50 | 481 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], 0) | ^ semantic error: reshape accepts arrays for `order` argument, found integer instead. --> tests/errors/continue_compilation_1.f90:482:55 | 482 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], [0], 0) | ^ semantic error: `pad` argument of reshape intrinsic must have same type and kind as `source` argument, found pad type real(4) source type integer(4) instead. --> tests/errors/continue_compilation_1.f90:483:50 | 483 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], [1.2]) | ^^^^^ semantic error: `pad` argument of reshape intrinsic must have same type and kind as `source` argument, found pad type integer(8) source type integer(4) instead. --> tests/errors/continue_compilation_1.f90:484:50 | 484 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], [0_8]) | ^^^^^ semantic error: reshape accepts `order` array with integer elements --> tests/errors/continue_compilation_1.f90:486:58 | 486 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], order = [1.0, 2.0]) | ^^^^^^^^^^ semantic error: reshape accepts `order` array as a permutation of elements from 1 to 2 --> tests/errors/continue_compilation_1.f90:487:58 | 487 | print *, reshape([1, 2, 3, 4, 5, 6], [2, 3], order = [2, 3]) | ^^^^^^ semantic error: Substring start index must be of type integer --> tests/errors/continue_compilation_1.f90:488:16 | 488 | print *, a(b'01':2) | ^^^^^ semantic error: `mask` argument to `count` intrinsic must be a logical array --> tests/errors/continue_compilation_1.f90:489:20 | 489 | print *, count(1) | ^ semantic error: `mask` argument to `count` intrinsic must be a logical array --> tests/errors/continue_compilation_1.f90:490:20 | 490 | print *, count([2]) | ^^^ semantic error: Substring stride must be of type integer --> tests/errors/continue_compilation_1.f90:491:20 | 491 | print *, a(1:2:b'10') | ^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:492:5 | 492 | a_real = [logical::] | ^^^^^^ ^^^^^^^^^^^ type mismatch (real[:] and logical[:]) semantic error: Subroutine `dummy_sub` called as a function --> tests/errors/continue_compilation_1.f90:494:14 | 494 | print *, dummy_sub() | ^^^^^^^^^^^ semantic error: Input to `Iparity` is expected to be an integer, but got string[:] --> tests/errors/continue_compilation_1.f90:495:22 | 495 | print *, iparity(["a", "b"]) | ^^^^^^^^^^ must be of integer type semantic error: The `mask` argument to `parity` must be logical, but got string[:] --> tests/errors/continue_compilation_1.f90:496:21 | 496 | print *, parity(["a", "b"]) | ^^^^^^^^^^ must be logical type semantic error: Substring end index exceeds the string length --> tests/errors/continue_compilation_1.f90:497:14 | 497 | print *, string(1:6) | ^^^^^^^^^^^ semantic error: `shape` array in reshape intrinsic should be of constant size --> tests/errors/continue_compilation_1.f90:499:30 | 499 | matrix = reshape(source, shape_, pad=[0]) | ^^^^^^ not a constant size array semantic error: Incompatible ranks 2 and 1 in assignment --> tests/errors/continue_compilation_1.f90:499:5 | 499 | matrix = reshape(source, shape_, pad=[0]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Complex variable 'c' only has %re, %im, and %kind members, not 'mymember' --> tests/errors/continue_compilation_1.f90:504:14 | 504 | print *, c%mymember | ^^^^^^^^^^ semantic error: Character variable 'c1' only has %len and %kind members, not 'mymember' --> tests/errors/continue_compilation_1.f90:506:14 | 506 | print *, c1%mymember | ^^^^^^^^^^^ semantic error: Substring end index must be of type integer --> tests/errors/continue_compilation_1.f90:507:23 | 507 | print *, string(1:Z'100000003') | ^^^^^^^^^^^^ semantic error: Incorrect number of arguments passed to the 'present' intrinsic. It accepts exactly 1 arguments. --> tests/errors/continue_compilation_1.f90:508:14 | 508 | print *, present(x,x) | ^^^^^^^^^^^^ semantic error: Incorrect number of arguments passed to the 'present' intrinsic. It accepts exactly 1 arguments. --> tests/errors/continue_compilation_1.f90:509:14 | 509 | print *, present() | ^^^^^^^^^ semantic error: Incorrect number of arguments passed to the 'ieor' intrinsic. It accepts exactly 2 arguments. --> tests/errors/continue_compilation_1.f90:510:14 | 510 | print *, ieor(x) | ^^^^^^^ semantic error: Incorrect number of arguments passed to the 'ieor' intrinsic. It accepts exactly 2 arguments. --> tests/errors/continue_compilation_1.f90:511:14 | 511 | print *, ieor() | ^^^^^^ semantic error: Arguments to min0 must be of real, integer or character type --> tests/errors/continue_compilation_1.f90:512:14 | 512 | print *, min(c, c) | ^^^^^^^^^ semantic error: `exit` statements cannot be outside of loops or blocks --> tests/errors/continue_compilation_1.f90:513:5 | 513 | exit | ^^^^ semantic error: `cycle` statements cannot be outside of loops --> tests/errors/continue_compilation_1.f90:514:5 | 514 | cycle | ^^^^^ semantic error: Required argument `y` at position 2 is missing in procedure call --> tests/errors/continue_compilation_1.f90:516:18 | 516 | call my_func(10) | ^^ semantic error: Required argument `x` is missing in procedure call --> tests/errors/continue_compilation_1.f90:517:5 | 517 | call my_func() | ^^^^^^^^^^^^^^ semantic error: Required argument `extra_arg` is missing in procedure call --> tests/errors/continue_compilation_1.f90:521:5 | 521 | call obj%display() | ^^^^^^^^^^^^^^^^^^ semantic error: Shape mismatch in `allocate` statement. --> tests/errors/continue_compilation_1.f90:523:14 | 523 | allocate(arr4(5), source=[1, 2, 3]) | ^^^^^^^ ^^^^^^^^^ shape mismatch in dimension 1 semantic error: Type mismatch: The `source` argument in `allocate` must have the same type as the allocated variable. Expected type: integer[:] allocatable, but got: real. --> tests/errors/continue_compilation_1.f90:524:14 | 524 | allocate(arr4(5), source=v) | ^^^^^^^ ^ incompatible types in `allocate` statement semantic error: Dimension mismatch in `allocate` statement. --> tests/errors/continue_compilation_1.f90:525:14 | 525 | allocate(arr4(3), source=reshape([1, 2, 3, 4, 5, 6], [2, 3])) | ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mismatch in dimensions between allocated variable and `source` semantic error: Cannot allocate an array from a scalar source. --> tests/errors/continue_compilation_1.f90:526:14 | 526 | allocate(arr4, source=7) | ^^^^ allocated variable is an array, but `source` is a scalar semantic error: Argument was not specified --> tests/errors/continue_compilation_1.f90:528:5 | 528 | call logger % add_log_file(filename=filename) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1-th argument not specified for add_log_file semantic error: Required argument `unit` is missing in procedure call --> tests/errors/continue_compilation_1.f90:529:5 | 529 | call logger % add_log_file() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `allocate` statement only accepts four keyword arguments: `stat`, `errmsg`, `source` and `mold` --> tests/errors/continue_compilation_1.f90:531:5 | 531 | allocate(arr5, status=q1) | ^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Different `character` lengths 2 and 3 in array constructor --> tests/errors/continue_compilation_1.f90:534:21 | 534 | print *, ["aa", "aaa"] | ^^^^^ semantic error: Different shape for array assignment on dimension 1(2 and 1) --> tests/errors/continue_compilation_1.f90:535:5 | 535 | cc_a3 = cc_temp3(cc_i0:cc_i0) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: The argument `mask` must be of rank 2, an array with rank 1 was provided. --> tests/errors/continue_compilation_1.f90:536:25 | 536 | print *, pack(arr2, mask1) | ^^^^^ semantic error: Variable protected_module_my_class_obj is PROTECTED and cannot appear in LHS of assignment --> tests/errors/continue_compilation_1.f90:539:5 | 539 | protected_module_my_class_obj%value = 42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Different shape for array assignment on dimension 1(2 and 1) --> tests/errors/continue_compilation_1.f90:540:5 | 540 | cc_a4 = cc_temp4(cc_i1+1:cc_i1+1) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Invalid syntax of derived type for array constructor --> tests/errors/continue_compilation_1.f90:541:12 | 541 | arr = [type(MyClass) :: v1, v2, v3] | ^^^^^^^^^^^^^ help: use just the derived type name 'myclass', without the keyword 'type' semantic error: Class type `NonExistingType` is not defined --> tests/errors/continue_compilation_1.f90:543:11 | 543 | arr = [NonExistingType :: v1, v2, v3] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: DATA statement element count mismatch: 8 elements on left-hand side, 10 values on right-hand side --> tests/errors/continue_compilation_1.f90:546:5 | 546 | data j2, x2, (y2(i2), i2=1,3), k2 / 1,2,3,4,5,6,7,3*8 / | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: DO loop label 'q1' already defined --> tests/errors/continue_compilation_1.f90:548:9 - 550:10 | 548 | q1: do q1 = 1, 3 | ^^^^^^^^^^^^... ... | 550 | end do q1 | ...^^^^^^^^^^ semantic error: Assigned format (using integer variable as format specifier) is not supported. Use character variables instead. --> tests/errors/continue_compilation_1.f90:555:5 | 555 | WRITE (6, fmt_i1) | ^^^^^^^^^^^^^^^^^ semantic error: Assigned format (using integer variable as format specifier) is not supported. Use character variables instead. --> tests/errors/continue_compilation_1.f90:560:5 | 560 | print fmt_i2, "test" | ^^^^^^^^^^^^^^^^^^^^ semantic error: Assigned format (using integer variable as format specifier) is not supported. Use character variables instead. --> tests/errors/continue_compilation_1.f90:565:5 | 565 | read (5, fmt_i3) | ^^^^^^^^^^^^^^^^ semantic error: Type mismatch in argument `p`: expected a procedure but got `integer` --> tests/errors/continue_compilation_1.f90:568:21 | 568 | call proc_param(42) | ^^ semantic error: `end` must be a literal integer label --> tests/errors/continue_compilation_1.f90:571:18 | 571 | read (*, end=x) x | ^ semantic error: `end` must be a literal integer label --> tests/errors/continue_compilation_1.f90:572:18 | 572 | read (*, end=9011.0) x | ^^^^^^ semantic error: `err` must be a literal integer label --> tests/errors/continue_compilation_1.f90:574:18 | 574 | read (*, err=x) x | ^ semantic error: `err` must be a literal integer label --> tests/errors/continue_compilation_1.f90:575:18 | 575 | read (*, err=9013.0) x | ^^^^^^ semantic error: `end` is only supported for READ statements --> tests/errors/continue_compilation_1.f90:576:5 | 576 | write (*, end=9014) x | ^^^^^^^^^^^^^^^^^^^^^ semantic error: end= label 999 is not defined --> tests/errors/continue_compilation_1.f90:581:20 | 581 | read(*, *, end=999) x | ^^^ semantic error: err= label 500 is not defined --> tests/errors/continue_compilation_1.f90:582:20 | 582 | read(*, *, err=500) x | ^^^ semantic error: Duplicate value of `recl` found, it has already been specified via arguments or keyword arguments --> tests/errors/continue_compilation_1.f90:584:5 | 584 | OPEN(unit=10, recl=10, recl=20) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `recl` must be of type, Integer --> tests/errors/continue_compilation_1.f90:585:5 | 585 | OPEN(unit=10, recl=10.5) | ^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Invalid substring syntax: use lower:upper instead of lower,upper --> tests/errors/continue_compilation_1.f90:588:14 | 588 | print *, string(i,i) | ^^^^^^^^^^^ semantic error: Allocate should only be called with Allocatable or Pointer type inputs, found str --> tests/errors/continue_compilation_1.f90:590:14 | 590 | allocate(strx) | ^^^^ 'strx' is not allocatable or pointer semantic error: Type mismatch: allocatable character dummy argument 's' has length 5 but actual argument has length 10. --> tests/errors/continue_compilation_1.f90:592:32 | 592 | call modify_and_deallocate(strx) | ^^^^ dummy argument 's' declared here semantic error: Intrinsic `allocated` can be called only on allocatable argument --> tests/errors/continue_compilation_1.f90:593:14 | 593 | print *, allocated(strx) | ^^^^^^^^^^^^^^^ semantic error: Duplicate value of `encoding` found --> tests/errors/continue_compilation_1.f90:597:5 | 597 | OPEN(unit=10, encoding="UTF-8", encoding="UTF-8") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `encoding` must be of type, String or StringPointer --> tests/errors/continue_compilation_1.f90:598:5 | 598 | OPEN(unit=10, encoding=10) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `rec` specifier is not allowed for internal file I/O --> tests/errors/continue_compilation_1.f90:601:5 | 601 | read(str_var, rec=1) x | ^^^^^^^^^^^^^^^^^^^^^^ semantic error: `rec` specifier is not allowed for internal file I/O --> tests/errors/continue_compilation_1.f90:602:5 | 602 | write(str_var, rec=1) x | ^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Duplicate value of `rec` found, it has already been specified via arguments or keyword arguments --> tests/errors/continue_compilation_1.f90:603:5 | 603 | read(unit=10, rec=1, rec=2) y | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Duplicate value of `rec` found, it has already been specified via arguments or keyword arguments --> tests/errors/continue_compilation_1.f90:604:5 | 604 | write(unit=10, rec=1, rec=2) y | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `rec` must be of type, Integer --> tests/errors/continue_compilation_1.f90:605:5 | 605 | read(10, rec=1.5) y | ^^^^^^^^^^^^^^^^^^^ semantic error: `rec` must be of type, Integer --> tests/errors/continue_compilation_1.f90:606:5 | 606 | write(10, rec=2.5) y | ^^^^^^^^^^^^^^^^^^^^ semantic error: `bad` is not defined or imported --> tests/errors/continue_compilation_1.f90:609:13 | 609 | bad_x = .bad. 10 | ^^^^^^^^ semantic error: `op` is not defined or imported --> tests/errors/continue_compilation_1.f90:610:13 | 610 | bad_x = 5 .op. 3 | ^^^^^^^^ semantic error: Operands of comparison operator '==' are not comparable: ieee_class_type == ieee_class_type --> tests/errors/continue_compilation_1.f90:612:10 | 612 | b = (ieee_cls == ieee_quiet_nan) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:612:5 | 612 | b = (ieee_cls == ieee_quiet_nan) | ^ ^^^^^^^^^^^^^^ type mismatch (integer[:] and ieee_class_type) semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:617:5 | 617 | base_var = derived_var | ^^^^^^^^ ^^^^^^^^^^^ type mismatch (base and derived) semantic error: Implied DO loop must be enclosed within array constructor brackets [...]; expected '[( ... )]' in assignment --> tests/errors/continue_compilation_1.f90:629:15 | 629 | arr_idl = (i, i = 1, 4) | ^^^^^^^^^^^^^ semantic error: ADVANCE= specifier must have value = YES or NO --> tests/errors/continue_compilation_1.f90:632:30 | 632 | write (*, "(a)", advance="hello") "Dothraki culture" | ^^^^^^^ semantic error: 'dim' argument of 'sum' intrinsic must be INTEGER --> tests/errors/continue_compilation_1.f90:633:30 | 633 | print *, sum(arr1, dim = mask1) | ^^^^^ semantic error: 'ieee_is_nan' is not accessible in the current scope; add 'use, intrinsic :: ieee_arithmetic' to use it --> tests/errors/continue_compilation_1.f90:634:13 | 634 | print*, ieee_is_nan(1.0) | ^^^^^^^^^^^^^^^^ not in scope semantic error: `decimal` must be of type, String or StringPointer --> tests/errors/continue_compilation_1.f90:635:5 | 635 | open(unit=7, decimal=1, decimal="comma") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Duplicate value of `decimal` found --> tests/errors/continue_compilation_1.f90:636:5 | 636 | open(unit=7, decimal="POINT", decimal="comma") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Missing 'boundary' argument to 'eoshift' intrinsic --> tests/errors/continue_compilation_1.f90:642:38 | 642 | eoshift_derived_result = eoshift(eoshift_derived_array, 1) | ^^^^^^^^^^^^^^^^^^^^^ semantic error: Implicit casting from LOGICAL to INTEGER is not allowed by default. Use `--logical-casting` flag to enable it. --> tests/errors/continue_compilation_1.f90:648:5 | 648 | a(1) = .true. | ^^^^^^^^^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:649:5 | 649 | derived_cls = base_var | ^^^^^^^^^^^ ^^^^^^^^ type mismatch (derived and base) warning: Real constant overflows its kind (4) --> tests/errors/continue_compilation_1.f90:651:15 | 651 | print *, 9.99e+99 | ^^^^^^^^ semantic error: Missing actual argument for argument 'stat' --> tests/errors/continue_compilation_1.f90:652:10 | 652 | a5 = missing_required_arg_func() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: `asynchronous` must be of type String --> tests/errors/continue_compilation_1.f90:655:69 | 655 | open(newunit=u, file="test.dat", status="replace", asynchronous=1) | ^ semantic error: Duplicate value of `asynchronous` found --> tests/errors/continue_compilation_1.f90:656:89 | 656 | open(newunit=u, file="test.dat", status="replace", asynchronous="yes", asynchronous="no") | ^^^^ semantic error: The argument `shift` in `eoshift` must be scalar or have rank one less than `array` --> tests/errors/continue_compilation_1.f90:659:22 | 659 | b1 = eoshift(b1, eoshift_bad_shift) | ^^^^^^^^^^^^^^^^^ semantic error: No matching `operator(-)` found for this operand type --> tests/errors/continue_compilation_1.f90:665:18 | 665 | print *, -tt | ^^^ semantic error: Variable 'k' is not declared --> tests/errors/continue_compilation_1.f90:681:12 | 681 | do k = 1, 3 | ^ 'k' is undeclared semantic error: Expected logical expression in if statement, but recieved logical[:] instead --> tests/errors/continue_compilation_1.f90:692:13 | 692 | if (abs(arr1)(1) /= 2471095) error stop | ^^^^^^^^^^^^^^^^^^^^^^^ logical[:] expression, expected logical semantic error: Character intrinsic 'len' with class(*) argument must be inside 'type is (character(len=*))' guard --> tests/errors/continue_compilation_1.f90:700:22 | 700 | print *, len(generic) | ^^^^^^^ invalid use of character intrinsic with polymorphic argument semantic error: Argument of 'len' intrinsic must be CHARACTER, found integer instead. --> tests/errors/continue_compilation_1.f90:701:22 | 701 | print *, len(a) | ^ semantic error: `unit` must be of type Integer or Character --> tests/errors/continue_compilation_1.f90:707:9 | 707 | write(unit=r, fmt=*) "hello" ! {Error} `unit` must be of type Integer or Character | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_1.f90:713:9 | 713 | x = [character(len=3) :: "aa", "bb", "aa"] | ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch (integer[:] and string[:]) semantic error: case value must be scalar --> tests/errors/continue_compilation_1.f90:745:16 | 745 | case (:[2]) | ^^^ semantic error: Alternate return arguments are not permitted in calls to the 'cpu_time' intrinsic. --> tests/errors/continue_compilation_1.f90:753:9 | 753 | call cpu_time(*1) | ^^^^^^^^^^^^^^^^^ semantic error: `stat` argument of `sync all` must be of type integer, found string --> tests/errors/continue_compilation_1.f90:759:9 | 759 | sync all (stat=cstat) ! {Error} `stat` argument of `sync all` must be of type integer | ^^^^^^^^^^^^^^^^^^^^^ semantic error: `errmsg` argument of `sync all` must be of type character, found integer --> tests/errors/continue_compilation_1.f90:764:9 | 764 | sync all (errmsg=imsg) ! {Error} `errmsg` argument of `sync all` must be of type character | ^^^^^^^^^^^^^^^^^^^^^^ semantic error: `stat` argument of `sync all` must be scalar --> tests/errors/continue_compilation_1.f90:769:9 | 769 | sync all (stat=astat) ! {Error} `stat` argument of `sync all` must be scalar | ^^^^^^^^^^^^^^^^^^^^^ semantic error: Variable 'nosuch' is not declared --> tests/errors/continue_compilation_1.f90:773:9 | 773 | sync all (stat=nosuch) ! {Error} Variable 'nosuch' is not declared | ^^^^^^^^^^^^^^^^^^^^^^ 'nosuch' is undeclared semantic error: actual argument for 'x' cannot be an assumed-size array --> tests/errors/continue_compilation_1.f90:777:23 | 777 | call ptr_sink(x) ! {Error} actual argument for 'x' cannot be an assumed-size array | ^ semantic error: select case expression must be of type integer, character, or logical --> tests/errors/continue_compilation_1.f90:785:22 | 785 | select case (nn) | ^^ semantic error: select case expression must be of type integer, character, or logical --> tests/errors/continue_compilation_1.f90:792:22 | 792 | select case (x) | ^ semantic error: second argument of `lge` must have kind equal to 1 --> tests/errors/continue_compilation_1.f90:800:18 | 800 | print *, lge("a", glyph) | ^^^^^^^^^^^^^^^ semantic error: second argument of `lgt` must have kind equal to 1 --> tests/errors/continue_compilation_1.f90:801:18 | 801 | print *, lgt("a", glyph) | ^^^^^^^^^^^^^^^ semantic error: first argument of `lle` must have kind equal to 1 --> tests/errors/continue_compilation_1.f90:802:18 | 802 | print *, lle(glyph, "z") | ^^^^^^^^^^^^^^^ semantic error: first argument of `llt` must have kind equal to 1 --> tests/errors/continue_compilation_1.f90:803:18 | 803 | print *, llt(glyph, "z") | ^^^^^^^^^^^^^^^ semantic error: Dimension index 5 is out of range for `spread`; expected 1 <= dim <= 2 --> tests/errors/continue_compilation_1.f90:818:28 | 818 | print *, spread(a, 5, 2) | ^ semantic error: Type and kind of the relevant arguments of Merge must be the same --> tests/errors/continue_compilation_1.f90:827:18 | 827 | print *, merge(a, b, .true.) | ^^^^^^^^^^^^^^^^^^^ semantic error: `a` argument of `co_max` must be of integer, real or character type, but got complex --> tests/errors/continue_compilation_1.f90:833:21 | 833 | call co_max(z) | ^ must be integer, real or character type semantic error: `a` argument of `co_sum` must be of integer, real or complex type, but got logical --> tests/errors/continue_compilation_1.f90:839:21 | 839 | call co_sum(mask) | ^^^^ must be integer, real or complex type semantic error: duplicate statement label 1000 --> tests/errors/continue_compilation_1.f90:844:9 | 844 | 1000 continue | ^^^^^^^^ semantic error: Selector shall be polymorphic in SELECT TYPE statement --> tests/errors/continue_compilation_1.f90:850:22 | 850 | select type (a) | ^ semantic error: The `MIN` intrinsic requires all CHARACTER arguments to have the same kind; found kind 1 and 4 --> tests/errors/continue_compilation_1.f90:859:18 | 859 | print *, min(c1, c4) | ^^^^^^^^^^^ semantic error: Label 20 is not defined --> tests/errors/continue_compilation_1.f90:864:9 | 864 | goto 20 ! {Error} Label 20 is not defined | ^^^^^^^ semantic error: actual argument for 'items' cannot be an assumed-size array --> tests/errors/continue_compilation_1.f90:875:36 | 875 | call consume_assumed_shape(items) ! {Error} actual argument for 'items' cannot be an assumed-size array | ^^^^^ semantic error: actual argument for 'items' cannot be an assumed-size array --> tests/errors/continue_compilation_1.f90:884:49 | 884 | print *, consume_assumed_shape_function(items) ! {Error} actual argument for 'items' cannot be an assumed-size array | ^^^^^ semantic error: Association target cannot be a BOZ literal constant --> tests/errors/continue_compilation_1.f90:892:25 | 892 | associate (y => z'1') | ^^^^ semantic error: Cannot initialize integer(4) variable with character(len=3) value in DATA statement --> tests/errors/continue_compilation_1.f90:899:9 | 899 | data x / "abc" / | ^^^^^^^^^^^^^^^^ semantic error: `array` argument of `norm2` intrinsic must be an array --> tests/errors/continue_compilation_1.f90:903:19 | 903 | x = norm2(1.0) | ^^^ semantic error: `array` argument of `norm2` intrinsic must be real --> tests/errors/continue_compilation_1.f90:904:19 | 904 | x = norm2([1, 2]) | ^^^^^^ semantic error: `dim` argument of `norm2` intrinsic is not a valid dimension index --> tests/errors/continue_compilation_1.f90:905:35 | 905 | x = norm2([1.0, 2.0], dim=2) | ^ lfortran-0.64.0/tests/reference/asr-incorrect_type_where_04-f7dffdb.stderr0000664000175000017500000000023715227365530026764 0ustar alastairalastairsemantic error: the argument to `where` must be an array --> tests/errors/incorrect_type_where_04.f90:11:10 | 11 | where(c) b = 12121 | ^ lfortran-0.64.0/tests/reference/asr-subroutine3b-4883d18.stdout0000664000175000017500000001410315227365530024317 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f: (Variable 2 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f) (IntegerConstant 42 (Integer 4) Decimal) () .false. .false. )] (Var 2 f) Public .true. .true. () ), g: (Function (SymbolTable 3 { g: (Variable 3 g [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 g) (IntegerConstant 42 (Integer 4) Decimal) () .false. .false. )] (Var 3 g) Public .true. .true. () ), h: (Function (SymbolTable 4 { h: (Variable 4 h [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) h (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 4 h) (IntegerConstant 42 (Integer 4) Decimal) () .false. .false. )] (Var 4 h) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/llvm-string_11-e6c763f.json0000664000175000017500000000075015227365530023461 0ustar alastairalastair{ "basename": "llvm-string_11-e6c763f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/string_11.f90", "infile_hash": "eb36fd203a74190c7d98eeff5e136b53c72959fe49b4fed6558763d3", "outfile": null, "outfile_hash": null, "stdout": "llvm-string_11-e6c763f.stdout", "stdout_hash": "2ef42d973a53bdb53be49e9d010bd271b8a78d3703992d11b5573ba4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_04_func-9f59ad6.json0000664000175000017500000000076415227365530024315 0ustar alastairalastair{ "basename": "asr-arrays_04_func-9f59ad6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_04_func.f90", "infile_hash": "50eb699e803e7dace8da286ee49cdb7381ebe3141bff17ca374f1f02", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_04_func-9f59ad6.stdout", "stdout_hash": "f85c2b27ac274300db65836a140d6b4e9565a205942058160240b702", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit7-9099c07.stderr0000664000175000017500000000023315227365530023555 0ustar alastairalastairstyle suggestion: Use real(8) instead of real*8 --> tests/implicit7.f90:4:14 | 4 | implicit real*8 (k) | ^ help: write this as 'real(8)' lfortran-0.64.0/tests/reference/ast-forall1-50096b8.stdout0000664000175000017500000003662515227365530023244 0ustar alastairalastair(TranslationUnit [(Program forall1 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (Comment "! Only for Syntax check" ) (EndOfLine) (Comment "!>>>>>>>>>>>>> Single line statments <<<<<<<<<<<<<<" )] ) )] [] [(ForAllSingle 0 () [(ConcurrentControl () i 1 n () )] () (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() i () 0)] [] [] [] ) (FuncCallOrArray B [] [(() i () 0)] [] [] [] ) () ) () ) (ForAllSingle 0 () [(ConcurrentControl () i 1 n 3 ) (ConcurrentControl () j 1 n 5 )] () (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray SIN [] [(() (FuncCallOrArray A [] [(() j () 0) (() i () 0)] [] [] [] ) () 0)] [] [] [] ) () ) () ) (ForAllSingle 0 () [(ConcurrentControl () i 1 n () ) (ConcurrentControl () j 1 n () )] (/= i j) (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray REAL [] [(() (+ i j) () 0)] [] [] [] ) () ) () ) (ForAllSingle 0 () [(ConcurrentControl () i 1 n () ) (ConcurrentControl () j 1 m () )] (/= (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) 0) (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (/ 1 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] )) () ) () ) (ForAllSingle 0 () [(ConcurrentControl () i 1 1000 () ) (ConcurrentControl () j 1 1000 () )] (/= i j) (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray A [] [(() j () 0) (() i () 0)] [] [] [] ) () ) (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "!>>>>>>>>>>>>> Multipe line statements <<<<<<<<<<<<<<" )] ) ) (ForAll 0 () [(ConcurrentControl () j 1 n () )] () [(ConcurrentShared [i] ) (ConcurrentLocal [x] ) (ConcurrentDefault)] [(ForAllSingle 0 () [(ConcurrentControl () i 1 j () )] () (Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray B [] [(() i () 0)] [] [] [] ) () ) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (ForAll 0 () [(ConcurrentControl () i 1 N () )] () [(ConcurrentReduce ReduceMul [s] )] [(Assignment 0 s (+ s (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (ForAll 0 () [(ConcurrentControl () i 3 (+ N 1) () ) (ConcurrentControl () j 3 (+ N 1) () )] () [] [(Assignment 0 (FuncCallOrArray C [] [(() i () 0) (() j () 0)] [] [] [] ) (+ (FuncCallOrArray C [] [(() i () 0) (() (+ j 2) () 0)] [] [] [] ) (FuncCallOrArray C [] [(() i () 0) (() (- j 2) () 0)] [] [] [] )) () ) (Assignment 0 (FuncCallOrArray D [] [(() i () 0) (() j () 0)] [] [] [] ) (+ (+ (FuncCallOrArray C [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray C [] [(() (+ i 2) () 0) (() j () 0)] [] [] [] )) (FuncCallOrArray C [] [(() (- i 2) () 0) (() j () 0)] [] [] [] )) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (ForAll 0 () [(ConcurrentControl () x 1 100 () )] (> (FuncCallOrArray J [] [(() x () 0)] [] [] [] ) 0) [] [(Where 0 () (< (FuncCallOrArray I [] [(() x () 0) (() () 1 0)] [] [] [] ) 0) [(Assignment 0 (FuncCallOrArray I [] [(() x () 0) (() () 1 0)] [] [] [] ) 0 () )] [(Assignment 0 (FuncCallOrArray I [] [(() x () 0) (() () 1 0)] [] [] [] ) 1 () )] () () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (ForAll 0 outer [(ConcurrentControl () i 1 100 () )] () [] [(ForAll 0 inner [(ConcurrentControl () j 1 100 () )] (/= i j) [] [(Assignment 0 (FuncCallOrArray A [] [(() i () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray A [] [(() j () 0) (() i () 0)] [] [] [] ) () )] () () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/pass_do_loops-doloop_01-f2f0442.json0000664000175000017500000000101115227365530025233 0ustar alastairalastair{ "basename": "pass_do_loops-doloop_01-f2f0442", "cmd": "lfortran --pass=do_loops --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_01.f90", "infile_hash": "14818f8f39c32bf890cf7906fe8a9692b270ad81a49bcdf0486f8e84", "outfile": null, "outfile_hash": null, "stdout": "pass_do_loops-doloop_01-f2f0442.stdout", "stdout_hash": "62efb0fa35545af23699b325ac750deb7aed643bf2cd571101da3773", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-implicit_interface_04-9b6786e.json0000664000175000017500000000105015227365530025730 0ustar alastairalastair{ "basename": "llvm-implicit_interface_04-9b6786e", "cmd": "lfortran --show-llvm --implicit-typing --implicit-interface {infile} -o {outfile}", "infile": "tests/../integration_tests/implicit_interface_04.f90", "infile_hash": "1e053fba9f0cad92b7ae15056010bc8e173cf2b0f3ad9aad515de419", "outfile": null, "outfile_hash": null, "stdout": "llvm-implicit_interface_04-9b6786e.stdout", "stdout_hash": "2e0da382defc08fba824d8149312d767ab8d77533a5e67906f4d4910", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err1-3303e2d.stderr0000664000175000017500000000025715227365530025701 0ustar alastairalastairC preprocessor error: factor(): The expression is not complete, expecting integer, name, +, - or ( --> tests/errors/cpp_err1.f90:4:13 | 4 | #if 2 < 1+2+ | ^ lfortran-0.64.0/tests/reference/asr-dreal_arg_error-91381bb.stderr0000664000175000017500000000025415227365530025055 0ustar alastairalastairsemantic error: Unexpected args, Dreal expects (complex64) as arguments --> tests/errors/dreal_arg_error.f90:4:14 | 4 | print *, dreal(a) | ^^^^^^^^ lfortran-0.64.0/tests/reference/llvm-callback_03-0f44942.json0000664000175000017500000000075615227365530023547 0ustar alastairalastair{ "basename": "llvm-callback_03-0f44942", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/callback_03.f90", "infile_hash": "ed8de8dc63a13125cc459d17776eb179835cd6860aa332449493c9e8", "outfile": null, "outfile_hash": null, "stdout": "llvm-callback_03-0f44942.stdout", "stdout_hash": "7d301935924f6c0036ca38da126606bdcfeb8bfee9e7fc9154d2071d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutine6-f8dae3a.stdout0000664000175000017500000000056115227365530024772 0ustar alastairalastairfunction triad(a::Array{Float32, 1}, b::Array{Float32, 1}, scalar::Float32, c::Array{Float32, 1}) local i::Int32 local j::Int32 local n::Int32 local n2::Int32 n = length(a) n2 = length(b) Threads.@threads for i ∈ 1:n c[i] = a[i] + scalar * b[i] end Threads.@threads for j ∈ 1:n2 c[j] = b[j] + scalar end end lfortran-0.64.0/tests/reference/asr-derived_type_05-3836aa5.stderr0000664000175000017500000000074415227365530024720 0ustar alastairalastairsemantic error: Pass and NoPass attributes cannot be provided together --> tests/errors/derived_type_05.f90:7:49 | 7 | procedure(testing_interface), deferred, pass(my_object), nopass :: testing | ^^^^^^^^^^^^^^^ pass specified here | 7 | procedure(testing_interface), deferred, pass(my_object), nopass :: testing | ^^^^^^ nopass specified here lfortran-0.64.0/tests/reference/c-pragma2-a14de52.stdout0000664000175000017500000000255615227365530023014 0ustar alastairalastair #include #include #include #include #include struct dimension_descriptor { int32_t lower_bound, length, stride; }; struct i32 { int32_t *data; struct dimension_descriptor dims[32]; int32_t n_dims; int32_t offset; bool is_allocated; }; struct r32 { float *data; struct dimension_descriptor dims[32]; int32_t n_dims; int32_t offset; bool is_allocated; }; // Implementations int main(int argc, char* argv[]) { _lpython_set_argv(argc, argv); const struct i32 __libasr_created__array_constant__value; struct i32* __libasr_created__array_constant_ = &__libasr_created__array_constant__value; int32_t __libasr_created__array_constant__data[1]; __libasr_created__array_constant_->data = __libasr_created__array_constant__data; __libasr_created__array_constant_->n_dims = 1; __libasr_created__array_constant_->offset = 0; __libasr_created__array_constant_->dims[0].lower_bound = 1; __libasr_created__array_constant_->dims[0].length = 1; __libasr_created__array_constant_->dims[0].stride = 1; float a __attribute__ (( vector_size(sizeof(float) * 8) )); a = (float __attribute__ (( vector_size(sizeof(float) * 8) ))) {(float)(1), (float)(1), (float)(1), (float)(1), (float)(1), (float)(1), (float)(1), (float)(1)}; return 0; } lfortran-0.64.0/tests/reference/asr-operator_overloading_12-b71f657.json0000664000175000017500000000101715227365530026126 0ustar alastairalastair{ "basename": "asr-operator_overloading_12-b71f657", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/operator_overloading_12.f90", "infile_hash": "b9247e0fddab7797b86957ed5aa99372f5a365d96b082feafccac339", "outfile": null, "outfile_hash": null, "stdout": "asr-operator_overloading_12-b71f657.stdout", "stdout_hash": "7294b9177700ff3930f347141db8bf4823e169d274c3ee4a25520f23", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-continue_body_if_loop-670a23a.stdout0000664000175000017500000001421515227365530026307 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { implicit_program_lfortran: (Program (SymbolTable 2 { j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 2 s [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) implicit_program_lfortran [] [(Assignment (Var 2 s) (RealConstant 0.000000 (Real 4) ) () .false. .false. ) (DoLoop () ((Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) ()) [(Assignment (Var 2 s) (RealBinOp (Var 2 s) Add (ArrayItem (Var 2 u) [(() (Var 2 j) ())] (Real 4) ColMajor () ) (Real 4) () ) () .false. .false. ) (If () (RealCompare (Var 2 s) GtE (Cast (IntegerConstant 1000000 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1000000.000000 (Real 4) ) () ) (Logical 4) () ) [(GoTo 2 2 )] [] ) (GoToTarget 1 1 )] [] ) (Stop () ) (GoToTarget 2 2 )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-select_type_02-6e04a0b.json0000664000175000017500000000076415227365530024271 0ustar alastairalastair{ "basename": "asr-select_type_02-6e04a0b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/select_type_02.f90", "infile_hash": "67a97c746280c55753fa1c0adfc9813a240d797752915300d102f79e", "outfile": null, "outfile_hash": null, "stdout": "asr-select_type_02-6e04a0b.stdout", "stdout_hash": "1a88459bf534df35fc3210d73d205711412ef302c61fe89a9f83da6e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-associate_04-8bcb3df.stdout0000664000175000017500000004461415227365530024453 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { associate_04: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), associate_block: (AssociateBlock (SymbolTable 3 { v: (Variable 3 v [] Local () () Default (Pointer (Real 4) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 3 z [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) associate_block [(Assignment (Var 3 z) (RealBinOp (RealUnaryMinus (RealBinOp (RealBinOp (Var 2 x) Mul (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) (Real 4) () ) Add (RealBinOp (Var 2 y) Mul (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) (Real 4) () ) (Real 4) () ) (Real 4) () ) Mul (IntrinsicElementalFunction Cos [(Var 2 theta)] 0 (Real 4) () ) (Real 4) () ) () .false. .false. ) (Associate (Var 3 v) (Var 2 myreal) ) (Print (StringFormat () [(RealBinOp (Var 2 a) Add (Var 3 z) (Real 4) () ) (RealBinOp (Var 2 a) Sub (Var 3 z) (Real 4) () ) (Var 3 v)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 3 v) (RealBinOp (Var 3 v) Mul (RealConstant 4.600000 (Real 4) ) (Pointer (Real 4) ) () ) () .false. .false. )] ), myreal: (Variable 2 myreal [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), theta: (Variable 2 theta [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) associate_04 [] [(Assignment (Var 2 x) (RealConstant 0.420000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 y) (RealConstant 0.350000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 myreal) (RealConstant 9.100000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 theta) (RealConstant 1.500000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 a) (RealConstant 0.400000 (Real 4) ) () .false. .false. ) (AssociateBlockCall 2 associate_block ) (Print (StringFormat () [(Var 2 myreal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (LogicalBinOp (RealCompare (RealBinOp (Var 2 myreal) Sub (RealConstant 41.860001 (Real 4) ) (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) Or (RealCompare (RealBinOp (Var 2 myreal) Sub (RealConstant 41.860001 (Real 4) ) (Real 4) () ) Lt (RealUnaryMinus (RealConstant 0.000010 (Real 4) ) (Real 4) (RealConstant -0.000010 (Real 4) ) ) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-implicit1-418fb10.json0000664000175000017500000000105715227365530023743 0ustar alastairalastair{ "basename": "ast_f90-implicit1-418fb10", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/implicit1.f90", "infile_hash": "8f316b7b5813cd7d2f663bd9aac929c0d2fdb42eccdc2ac798b0c3d5", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-implicit1-418fb10.stdout", "stdout_hash": "a74dec58fd0cb5acc6ae97e5a60469284b76a4453f4214a4916107fb", "stderr": "ast_f90-implicit1-418fb10.stderr", "stderr_hash": "7040f573fd98c40ed1387403ecf33f749ead9159a50668621b3fb8ca", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-assign_to1-a6b7599.stdout0000664000175000017500000000727315227365530024037 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { k: (Variable 2 k [] Local () () Default (Integer 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(GoToTarget 1000 1000 ) (If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) [(Assignment (Var 2 k) (IntegerConstant 15 (Integer 4) Decimal) () .false. .false. )] [] ) (GoToTarget 100 100 ) (Select () (Var 2 k) [(CaseStmt [(IntegerConstant 100 (Integer 4) Decimal)] [(GoTo 100 100 )] .false. ) (CaseStmt [(IntegerConstant 1000 (Integer 4) Decimal)] [(GoTo 1000 1000 )] .false. ) (CaseStmt [(IntegerConstant 15 (Integer 4) Decimal)] [(GoTo 15 15 )] .false. )] [] .false. ) (GoToTarget 15 15 ) (Print (StringConstant "run" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_enable_style_suggestion-style1-a2fdd22.json0000664000175000017500000000114215227365530027740 0ustar alastairalastair{ "basename": "asr_enable_style_suggestion-style1-a2fdd22", "cmd": "lfortran --std=f23 --style-suggestions --no-color {infile}", "infile": "tests/style1.f90", "infile_hash": "b37bbb3e24a2bceae58e25b574ccb9dea7fbe05441c08c9e4fa5add6", "outfile": null, "outfile_hash": null, "stdout": "asr_enable_style_suggestion-style1-a2fdd22.stdout", "stdout_hash": "b9b26c3fdb75ebc34cfc47d12c11351182a0284088440bead4ae1daf", "stderr": "asr_enable_style_suggestion-style1-a2fdd22.stderr", "stderr_hash": "0a91582db826ba18d127e9a1beca1da3483df9469fed545f6c902f35", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-external4-4e8bc7b.stdout0000664000175000017500000003036515227365530024024 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { dqc25s: (Function (SymbolTable 2 { centr: (Variable 2 centr [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dlog: (Variable 2 dlog [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dqk15w: (Function (SymbolTable 4 { }) dqk15w (FunctionType [(FunctionType [] (Real 8) BindC Interface () .false. .false. .false. .false. .false. [] .false. )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 f)] [] () Public .false. .false. () ), f: (Function (SymbolTable 6 { f_arg_0: (Variable 6 f_arg_0 [] Unspecified () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f_return_var_name: (Variable 6 f_return_var_name [] ReturnVar () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Real 4)] (Real 8) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 f_arg_0)] [] (Var 6 f_return_var_name) Public .false. .false. () ), hlgth: (Variable 2 hlgth [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dqc25s (FunctionType [(FunctionType [(Real 4)] (Real 8) BindC Interface () .false. .false. .false. .false. .false. [] .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 f)] [(SubroutineCall 2 dqk15w () [((Var 2 f))] () .false. ) (Print (StringFormat () [(FunctionCall 2 f () [((RealBinOp (Var 2 hlgth) Add (Var 2 centr) (Real 4) () ))] (Real 8) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction Log [(RealConstant 2.000000 (Real 8) )] 0 (Real 8) (RealConstant 0.693147 (Real 8) ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/pass_inline_function_calls-functions_07-bb03cfd.json0000664000175000017500000000110015227365530030713 0ustar alastairalastair{ "basename": "pass_inline_function_calls-functions_07-bb03cfd", "cmd": "lfortran --pass=inline_function_calls --show-asr --no-color --fast {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_07.f90", "infile_hash": "4688c49c3c531f9e7dafd3b6a4ef2560b6e62ef554ea9df95ed61a8a", "outfile": null, "outfile_hash": null, "stdout": "pass_inline_function_calls-functions_07-bb03cfd.stdout", "stdout_hash": "b53f894330b09281e4bbb9f176383c1dc65122f80c9ae46f731fa256", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-write_12-63d1bdf.stdout0000664000175000017500000000001415227365530023550 0ustar alastairalastairx = 42 PASS lfortran-0.64.0/tests/reference/cpp-string_01-e28a827.json0000664000175000017500000000073015227365530023203 0ustar alastairalastair{ "basename": "cpp-string_01-e28a827", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/string_01.f90", "infile_hash": "e7d4974d8a9b9704bf0c02d7943d916b40c591de3c9e89d30de28d7d", "outfile": null, "outfile_hash": null, "stdout": "cpp-string_01-e28a827.stdout", "stdout_hash": "35a0e3a03b47f026b9e1d8219a96b2deeb8ee332bbae88c1f418746a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_27-4f64cb2.json0000664000175000017500000000075015227365530023434 0ustar alastairalastair{ "basename": "asr-modules_27-4f64cb2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_27.f90", "infile_hash": "30331196ee4a840d6aaf78770ddd668bf8779203aee238721cc32795", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_27-4f64cb2.stdout", "stdout_hash": "fca04be66ddc45b198767af4896b691d04c466ea30a40c2dc52444f1", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-integerStringInput-16e7ff7.stderr0000664000175000017500000000005615227365530025703 0ustar alastairalastairError: Invalid int32_t input from file (EOF). lfortran-0.64.0/tests/reference/llvm-volatile_02-2beae13.json0000664000175000017500000000075615227365530024037 0ustar alastairalastair{ "basename": "llvm-volatile_02-2beae13", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/volatile_02.f90", "infile_hash": "8e1e2efa590937906428b5c80f2025a351c33f23a5a821a26341ba02", "outfile": null, "outfile_hash": null, "stdout": "llvm-volatile_02-2beae13.stdout", "stdout_hash": "9669ddb260e729da2bb6259f4290f084759ab8e587b8ab2e17405ead", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-common_05-f767179.stdout0000664000175000017500000010627515227365530023512 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { file_common_block_block_1: (Module (SymbolTable 3 { block_1: (Struct (SymbolTable 4 { a: (Variable 4 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_1 (StructType [] [] .true. .false. ) [] [a b c] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_1: (Variable 3 struct_instance_block_1 [] Local () () Default (StructType [] [] .true. .false. ) 3 block_1 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_1 () [] .false. .false. .false. ), main: (Program (SymbolTable 2 { 1_block_1_a: (ExternalSymbol 2 1_block_1_a 4 a block_1 [] a Public ), 1_block_1_b: (ExternalSymbol 2 1_block_1_b 4 b block_1 [] b Public ), 1_block_1_c: (ExternalSymbol 2 1_block_1_c 4 c block_1 [] c Public ), block_1: (ExternalSymbol 2 block_1 3 block_1 file_common_block_block_1 [] block_1 Public ), d: (Variable 2 d [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), struct_instance_block_1: (ExternalSymbol 2 struct_instance_block_1 3 struct_instance_block_1 file_common_block_block_1 [] struct_instance_block_1 Public ) }) main [] [(Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) (ArrayBroadcast (IntegerConstant 3 (Integer 4) Decimal) (ArrayConstant 4 [5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 20 [3, 3, 3, 3, 3] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Assignment (Var 2 d) (IntegerConstant 4 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. ) (Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Add (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Mul (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Gt (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Logical 4) () ) [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Add (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) Div (Var 2 d) (Integer 4) () ) (Integer 4) () ) () .false. .false. )] [(If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) Gt (Var 2 d) (Logical 4) () ) [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Sub (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. )] [] )] ) (Select () (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) [(CaseStmt [(IntegerConstant 1 (Integer 4) Decimal)] [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Add (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. )] .false. ) (CaseStmt [(IntegerConstant 2 (Integer 4) Decimal)] [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Sub (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. )] .false. )] [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Mul (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. )] .false. ) (WhileLoop () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Gt (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Logical 4) () ) [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Add (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] [] ) (DoLoop () ((StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal)) [(Assignment (Var 2 d) (IntegerBinOp (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) Add (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (Integer 4) () ) () .false. .false. )] [] ) (Print (StringFormat () [(StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) (Var 2 d)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) ()) [(If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (If () (IntegerCompare (Var 2 d) NotEq (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-parameter_03-d4df941.json0000664000175000017500000000075615227365530023751 0ustar alastairalastair{ "basename": "asr-parameter_03-d4df941", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/parameter_03.f90", "infile_hash": "5f60b01824232c9c934cf71ae5b7f4f54e51457361dc9fefb28092a5", "outfile": null, "outfile_hash": null, "stdout": "asr-parameter_03-d4df941.stdout", "stdout_hash": "951c7272784a00b37b6f19a6fae1a0662b19dfeff2850a610d3b36e0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_09-2af35ec.stdout0000664000175000017500000000547315227365530024607 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_09: (Program (SymbolTable 2 { z: (Variable 2 z [] Local (RealConstant 0.000000 (Real 4) ) (RealConstant 0.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_09 [] [(If () (RealCompare (Var 2 z) Lt (TypeInquiry Tiny (Real 4) (RealConstant 1.000000 (Real 4) ) (Real 4) (RealConstant 0.000000 (Real 4) ) ) (Logical 4) () ) [(Print (StringFormat () [(Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-doloop_19-c625895.json0000664000175000017500000000076015227365530023615 0ustar alastairalastair{ "basename": "ast_f90-doloop_19-c625895", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/doloop_19.f90", "infile_hash": "780ed4dd8cdb1d585c739619b6e0d88136ec21fc7c9ac78574421b23", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-doloop_19-c625895.stdout", "stdout_hash": "9d59fdb2c294c696e9a8ff689830e209f509461c1a958f4315bcc834", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-team1-f0af498.stdout0000664000175000017500000001201715227365530023044 0ustar alastairalastair(TranslationUnit [(Program team1 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (Comment "! Syntax check only(AST)" ) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(n [] [] () 4 Equal ())] () ) (Declaration (AttrType TypeType [] () team_type None ) [] [(column [] [] () () None ()) (odd_even [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrCodimension [(1 n CodimensionExpr) (() () CodimensionStar)] )] [(co_array [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(1 2 DimensionExpr)] )] [(my_cosubscripts [] [] () () None ())] () )] [(Assignment 0 (FuncCallOrArray my_cosubscripts [] [(() () 1 0)] [] [] [] ) (FuncCallOrArray this_image [] [(() co_array () 0)] [] [] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (FormTeam 0 (FuncCallOrArray my_cosubscripts [] [(() 2 () 0)] [] [] [] ) column [(AttrNewIndex (FuncCallOrArray my_cosubscripts [] [(() 1 () 0)] [] [] [] ) )] () ) (SyncTeam 0 column [] () ) (ChangeTeam 0 () column [(CoarrayAssociation (CoarrayRef ca [] [] [] [(() () 1 CodimensionStar)] [] ) co_array )] [] [] (TriviaNode [] [(EndOfLine) (Comment "! segment 1" )] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] ) (FormTeam 0 (- 2 (FuncCallOrArray mod [] [(() (FuncCallOrArray this_image [] [] [] [] [] ) () 0) (() 2 () 0)] [] [] [] )) odd_even [] () ) (ChangeTeam 0 () odd_even [] [] [] (TriviaNode [] [(EndOfLine) (Comment "! segment 2" )] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] )] [] )] ) lfortran-0.64.0/tests/reference/llvm-nested_05-0252368.stdout0000664000175000017500000003036615227365530023565 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__b__x = global i32 0 @__module___lcompilers_created__nested_context__b__y = global float 0.000000e+00 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.5 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_nested_05_a_b() { .entry: %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %x = alloca i32, align 4 %y = alloca float, align 4 store i32 6, i32* %x, align 4 store float 5.500000e+00, float* %y, align 4 %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %x) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry %12 = alloca i64, align 8 %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.3, i32 0, i32 0), i64* %12, i32 0, i32 0, i32 0, i32 0, i32 0, float* %y) %14 = load i64, i64* %12, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %13, i8** %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %14, i64* %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %18 = load i8*, i8** %17, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %20 = load i64, i64* %19, align 8 %21 = trunc i64 %20 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %22 = icmp eq i8* %13, null br i1 %22, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %13) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %23 = load i32, i32* %x, align 4 store i32 %23, i32* @__module___lcompilers_created__nested_context__b__x, align 4 %24 = load float, float* %y, align 4 store float %24, float* @__module___lcompilers_created__nested_context__b__y, align 4 call void @b.__module_nested_05_a_c() %25 = load i32, i32* @__module___lcompilers_created__nested_context__b__x, align 4 store i32 %25, i32* %x, align 4 %26 = load float, float* @__module___lcompilers_created__nested_context__b__y, align 4 store float %26, float* %y, align 4 %27 = alloca i64, align 8 %28 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.4, i32 0, i32 0), i64* %27, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %x) %29 = load i64, i64* %27, align 8 %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %28, i8** %30, align 8 %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %29, i64* %31, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %33 = load i8*, i8** %32, align 8 %34 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %35 = load i64, i64* %34, align 8 %36 = trunc i64 %35 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %33, i32 %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %37 = icmp eq i8* %28, null br i1 %37, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %0, i8* %28) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %38 = alloca i64, align 8 %39 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.5, i32 0, i32 0), i64* %38, i32 0, i32 0, i32 0, i32 0, i32 0, float* %y) %40 = load i64, i64* %38, align 8 %41 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %39, i8** %41, align 8 %42 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %40, i64* %42, align 8 %43 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %44 = load i8*, i8** %43, align 8 %45 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %46 = load i64, i64* %45, align 8 %47 = trunc i64 %46 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %44, i32 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %48 = icmp eq i8* %39, null br i1 %48, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %free_done6 call void @_lfortran_free_alloc(i8* %0, i8* %39) br label %free_done9 free_done9: ; preds = %free_nonnull8, %free_done6 br label %return return: ; preds = %free_done9 br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return ret void } define void @b.__module_nested_05_a_c() { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @__module___lcompilers_created__nested_context__b__x) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry %12 = alloca i64, align 8 %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %12, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__y) %14 = load i64, i64* %12, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %13, i8** %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %14, i64* %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %18 = load i8*, i8** %17, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %20 = load i64, i64* %19, align 8 %21 = trunc i64 %20 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %22 = icmp eq i8* %13, null br i1 %22, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %13) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done store i32 4, i32* @__module___lcompilers_created__nested_context__b__x, align 4 store float 3.500000e+00, float* @__module___lcompilers_created__nested_context__b__y, align 4 br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_c FINALIZE_SYMTABLE_c: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) call void @__module_nested_05_a_b() br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nested_05 FINALIZE_SYMTABLE_nested_05: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast-types_08-c70036f.json0000664000175000017500000000074215227365530023050 0ustar alastairalastair{ "basename": "ast-types_08-c70036f", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_08.f90", "infile_hash": "022002fe0deb83e3961dc20b35dd2623d7f85f3a299f77323042cb29", "outfile": null, "outfile_hash": null, "stdout": "ast-types_08-c70036f.stdout", "stdout_hash": "5d4f7d4841a1ea61dee8586124196f13805169958f41449e3ecddf05", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutines_04-a817e0c.stdout0000664000175000017500000001000015227365530024675 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { print_it: (Program (SymbolTable 2 { print_int: (Function (SymbolTable 3 { a: (Variable 3 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) print_int (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 a) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(Var 3 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) print_it [] [(SubroutineCall 2 print_int () [] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-where_01-cc363a1.stdout0000664000175000017500000001442715227365530023440 0ustar alastairalastair(TranslationUnit [(Program where_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [(1 10 DimensionExpr)] [] () () None ()) (b [(1 10 DimensionExpr)] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 a (u- 2) () ) (Assignment 0 (FuncCallOrArray a [] [(() 1 () 0)] [] [] [] ) 1 () ) (Assignment 0 (FuncCallOrArray a [] [(() 5 () 0)] [] [] [] ) 8 () ) (Assignment 0 b (u- 3) () ) (Where 0 () (>= a 0) [(Assignment 0 b 1 () )] [(Assignment 0 b 0 () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Where 0 () (>= a 0) [(Assignment 0 b 1 () )] [(Assignment 0 b 0 () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Where 0 () (>= a 0) [(Assignment 0 b 1 () )] [(Assignment 0 b 0 () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray b [] [(() 1 () 0)] [] [] [] ) 1) () 0)] [] [] [] ) (Real "1e-6")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray b [] [(() 5 () 0)] [] [] [] ) 1) () 0)] [] [] [] ) (Real "1e-6")) [(ErrorStop 0 () () () )] [] () () () ) (DoLoop 0 () 0 i 2 4 () [(If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray b [] [(() i () 0)] [] [] [] ) 0) () 0)] [] [] [] ) (Real "1e-6")) [(ErrorStop 0 () () () )] [] () () () )] () () ) (DoLoop 0 () 0 i 6 10 () [(If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray b [] [(() i () 0)] [] [] [] ) 0) () 0)] [] [] [] ) (Real "1e-6")) [(ErrorStop 0 () () () )] [] () () () )] () () ) (Print 0 () [b] () ) (Print 0 () [a] () )] [] )] ) lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope5-fb3716b.json0000664000175000017500000000101415227365530027117 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope5-fb3716b", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope5.f90", "infile_hash": "63e512d3fe5d83aa6195002b9c31ddc77e1a93ac37df38989f782ed7", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope5-fb3716b.stdout", "stdout_hash": "403c420127d415bb7359ccb220d5ff8973040b17f1f34de51cf0b97e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp2-a8d63da.json0000664000175000017500000000074415227365530024650 0ustar alastairalastair{ "basename": "asr_preprocess-cpp2-a8d63da", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp2.f90", "infile_hash": "e4f9f303812209a53776ca76314834165cd4c21ccb47e1443169ce53", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp2-a8d63da.stderr", "stderr_hash": "da316951a0c26667c46ff6d3551f43dbee0947389a62c1a8774be659", "returncode": 2 }lfortran-0.64.0/tests/reference/run-format_21-af89e92.json0000664000175000017500000000071515227365530023303 0ustar alastairalastair{ "basename": "run-format_21-af89e92", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_21.f90", "infile_hash": "2904f4fcdadb6f1a06d09e4134a55f9af19894ead3ce04beadb21afb", "outfile": null, "outfile_hash": null, "stdout": "run-format_21-af89e92.stdout", "stdout_hash": "ad2e37f369ec7b73dfd1f6dde8e11a82488123cced26b1699815d60f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-attributes1-25126f0.stdout0000664000175000017500000000135115227365530024605 0ustar alastairalastairprogram attributes1 ! test for AST(to fmt) only character(len=4) :: a, b character, intent(in) :: str*(*) character(len=1, kind=c_char), target, bind(C, name="_binary_fclKernels_cl_start") :: fclKernelStart character(len=3) :: c(2) integer, volatile :: d, e real, external :: g equivalence (a, c(1)), (b, c(2)) type :: details sequence integer :: age character(len=50) :: name contains procedure, pass :: name => sample end type details intrinsic :: sin, cos double precision, intent(in) :: x(..) type(real(4)), allocatable :: x(:) type(integer(4)), allocatable :: x(:) type(character(len=4)), allocatable :: x(:) type(logical(4)), allocatable :: x(:) type(complex(4)), allocatable :: x(:) save :: /zzrayc/ end program attributes1 lfortran-0.64.0/tests/reference/asr-external3-2aafcb3.json0000664000175000017500000000076715227365530023520 0ustar alastairalastair{ "basename": "asr-external3-2aafcb3", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/external3.f90", "infile_hash": "54099789ee8d301435db8814db171bc443101af05d6cb268f45fd815", "outfile": null, "outfile_hash": null, "stdout": "asr-external3-2aafcb3.stdout", "stdout_hash": "d0780fd7b066bd12f2f2a6e756d7a6c3b18f113071a0ab472bcac695", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fn_call1-7e6ba0b.json0000664000175000017500000000071515227365530023212 0ustar alastairalastair{ "basename": "ast-fn_call1-7e6ba0b", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fn_call1.f90", "infile_hash": "fd319232dcd65e8f2c7722a5f8da034557658cb0a081224347fd1de6", "outfile": null, "outfile_hash": null, "stdout": "ast-fn_call1-7e6ba0b.stdout", "stdout_hash": "2d97a6c127586c6ebbd91090700dbcbc9a8371fa558c763b88fa7c8d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-string_10-eb8bca7.json0000664000175000017500000000074515227365530023427 0ustar alastairalastair{ "basename": "asr-string_10-eb8bca7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_10.f90", "infile_hash": "bc81968bc899cbe447092923c9b089e1942c9ecf0bad33ee7145f2a9", "outfile": null, "outfile_hash": null, "stdout": "asr-string_10-eb8bca7.stdout", "stdout_hash": "e0b1bb8183830fb782e09f3ef4a21ffed3f92ae4bf7ff388b0b5aea0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-nested_03-2eacab7.stdout0000664000175000017500000001346215227365530024134 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__b__x = global float 0.000000e+00 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [3 x i8] c"b()" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data, i32 0, i32 0), i64 3 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_nested_03_a_b() { .entry: %x = alloca float, align 4 store float 6.000000e+00, float* %x, align 4 %0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %0, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %1 = load float, float* %x, align 4 store float %1, float* @__module___lcompilers_created__nested_context__b__x, align 4 call void @b.__module_nested_03_a_c() %2 = load float, float* @__module___lcompilers_created__nested_context__b__x, align 4 store float %2, float* %x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return ret void } define void @b.__module_nested_03_a_c() { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = alloca i32, align 4 store i32 5, i32* %2, align 4 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %2) %4 = load i64, i64* %1, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry %13 = alloca i64, align 8 %14 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %13, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__x) %15 = load i64, i64* %13, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %14, i8** %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %15, i64* %17, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %19 = load i8*, i8** %18, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %21 = load i64, i64* %20, align 8 %22 = trunc i64 %21 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %19, i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %23 = icmp eq i8* %14, null br i1 %23, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %14) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_c FINALIZE_SYMTABLE_c: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) call void @__module_nested_03_a_b() br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nested_03 FINALIZE_SYMTABLE_nested_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/fortran-int_to_int_cast_fortran_codegen-913a36c.json0000664000175000017500000000103415227365530030654 0ustar alastairalastair{ "basename": "fortran-int_to_int_cast_fortran_codegen-913a36c", "cmd": "lfortran --show-fortran --no-color {infile} -o {outfile}", "infile": "tests/int_to_int_cast_fortran_codegen.f90", "infile_hash": "4993e4b5ba22668cdfb76bf75a291c41d074af44ea3bd1bd143dbcd0", "outfile": null, "outfile_hash": null, "stdout": "fortran-int_to_int_cast_fortran_codegen-913a36c.f90", "stdout_hash": "1b62de2ca1ecadb88968755fa090fb1bd3bd1233abe3cce6070f669e", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/asr-template_vector-140858c.json0000664000175000017500000000076715227365530024523 0ustar alastairalastair{ "basename": "asr-template_vector-140858c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_vector.f90", "infile_hash": "3b7ffe3ced86a0dcf1875f22da3a7910133d0e11b7a2866865dca1fe", "outfile": null, "outfile_hash": null, "stdout": "asr-template_vector-140858c.stdout", "stdout_hash": "e5ae47a24ba0db720f54e00124904659531f8f7076f5979df2f1ec29", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-data_02-fe19614.stdout0000664000175000017500000003633015227365530023171 0ustar alastairalastair(TranslationUnit [(Program data2 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(j [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(x [(1 6 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (iarx [(1 3 DimensionExpr) (1 1 DimensionExpr)] [] () () None ()) (iary [(1 3 DimensionExpr) (1 1 DimensionExpr)] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [x] [1 2 3 4 6 6] )] () ) (DataStmt 0 [(DataStmtSet [j] [5] )] () ) (Print 0 () [(String "1" ()) j] () ) (If 0 () (Logical .true. ()) [(Print 0 () [(String "2" ())] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray iarx [] [(() i () 0) (() 1 () 0)] [] [] [] ) (FuncCallOrArray iary [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 3 () )] [1 9 1950 1350 4350 4] )] () ) (Print 0 () [(FuncCallOrArray iarx [] [(() 1 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iarx [] [(() 1 () 0) (() 1 () 0)] [] [] [] ) 1) [(ErrorStop 0 () () () )] [] () () () ) (Print 0 () [(FuncCallOrArray iary [] [(() 1 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iary [] [(() 1 () 0) (() 1 () 0)] [] [] [] ) 9) [(ErrorStop 0 () () () )] [] () () () ) (Print 0 () [(FuncCallOrArray iarx [] [(() 2 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iarx [] [(() 2 () 0) (() 1 () 0)] [] [] [] ) 1950) [(ErrorStop 0 () () () )] [] () () () ) (Print 0 () [(FuncCallOrArray iary [] [(() 2 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iary [] [(() 2 () 0) (() 1 () 0)] [] [] [] ) 1350) [(ErrorStop 0 () () () )] [] () () () ) (Print 0 () [(FuncCallOrArray iarx [] [(() 3 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iarx [] [(() 3 () 0) (() 1 () 0)] [] [] [] ) 4350) [(ErrorStop 0 () () () )] [] () () () ) (Print 0 () [(FuncCallOrArray iary [] [(() 3 () 0) (() 1 () 0)] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray iary [] [(() 3 () 0) (() 1 () 0)] [] [] [] ) 4) [(ErrorStop 0 () () () )] [] () () () )] [(DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray iarx [] [(() i () 0) (() 1 () 0)] [] [] [] ) (FuncCallOrArray iary [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 3 () )] [1 9 1950 1350 4350 4] )] () ) (Print 0 () [(String "3" ())] () )] () () () ) (Print 0 () [(String "4" ())] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray iary [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 3 () )] [1 9 1950] )] () ) (Print 0 () [(String "5" ())] () ) (If 0 () (BoolOp (BoolOp (BoolOp (BoolOp (BoolOp (/= (FuncCallOrArray x [] [(() 1 () 0)] [] [] [] ) (Real "1.0")) Or (/= (FuncCallOrArray x [] [(() 2 () 0)] [] [] [] ) (Real "2.0")) ) Or (/= (FuncCallOrArray x [] [(() 3 () 0)] [] [] [] ) (Real "3.0")) ) Or (/= (FuncCallOrArray x [] [(() 4 () 0)] [] [] [] ) (Real "4.0")) ) Or (/= (FuncCallOrArray x [] [(() 5 () 0)] [] [] [] ) (Real "6.0")) ) Or (/= (FuncCallOrArray x [] [(() 6 () 0)] [] [] [] ) (Real "6.0")) ) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/wat-logical1-ef567ea.json0000664000175000017500000000072515227365530023247 0ustar alastairalastair{ "basename": "wat-logical1-ef567ea", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/logical1.f90", "infile_hash": "3768bda3700377afdf458a45ed70e2be9481e14ae76fda62adbe38e8", "outfile": null, "outfile_hash": null, "stdout": "wat-logical1-ef567ea.stdout", "stdout_hash": "cd583abecbaf0765bb5bcdafc4ed73f3b5a5b12eff48b3ff164bd75a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-case_05-a43ab42.stdout0000664000175000017500000000714015227365530023234 0ustar alastairalastair(TranslationUnit [(Program case_05 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! local variable declaration" )] ) )] [(Declaration (AttrType TypeCharacter [] () () None ) [] [(grade [] [] () (String "B" ()) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Select 0 () grade [(CaseStmt [(CaseCondExpr (String "A" ()) )] () [(Print 0 () [(String "Excellent!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondExpr (String "B" ()) )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] ) (CaseStmt [(CaseCondExpr (String "C" ()) )] () [(Print 0 () [(String "Well done" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondExpr (String "D" ()) )] () [(Print 0 () [(String "You passed" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondExpr (String "F" ()) )] () [(Print 0 () [(String "Better try again" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt_Default () [(Print 0 () [(String "Invalid grade" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 0 () [(String "Your grade is " ()) grade] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-close_invalid_kwarg1-b38b499.stderr0000664000175000017500000000022215227365530026021 0ustar alastairalastairsemantic error: Invalid argument `end` supplied --> tests/errors/close_invalid_kwarg1.f90:4:5 | 4 | CLOSE(end=200) | ^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-allocate_02-3c0d7c8.stdout0000664000175000017500000015712615227365530024125 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { allocate_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ierr: (Variable 2 ierr [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), isource: (Variable 2 isource [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), whole_square: (Function (SymbolTable 3 { a: (Variable 3 a [] Unspecified () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a_2: (Variable 3 a_2 [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ab: (Variable 3 ab [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), abc: (Variable 3 abc [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] Unspecified () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b_2: (Variable 3 b_2 [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), bc: (Variable 3 bc [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Unspecified () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c_2: (Variable 3 c_2 [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ca: (Variable 3 ca [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), status: (Variable 3 status [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) whole_square (FunctionType [(Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c)] [(Assignment (Var 3 n) (ArraySize (Var 3 a) () (Integer 4) () ) () .false. .false. ) (Allocate [((Var 3 a_2) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ()) ((Var 3 b_2) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ()) ((Var 3 c_2) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ())] () () () ) (Allocate [((Var 3 ab) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ()) ((Var 3 bc) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ()) ((Var 3 ca) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ()) ((Var 3 abc) [((IntegerConstant 1 (Integer 4) Decimal) (Var 3 n))] () () ())] () () () ) (Assignment (Var 3 status) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 a_2) (IntegerBinOp (Var 3 a) Mul (Var 3 a) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 b_2) (IntegerBinOp (Var 3 b) Mul (Var 3 b) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 c_2) (IntegerBinOp (Var 3 c) Mul (Var 3 c) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 ab) (IntegerBinOp (IntegerBinOp (ArrayBroadcast (IntegerConstant 2 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 3 a)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) Mul (Var 3 a) (Array (Integer 4) [(() ())] DescriptorArray ) () ) Mul (Var 3 b) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 bc) (IntegerBinOp (IntegerBinOp (ArrayBroadcast (IntegerConstant 2 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 3 b)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) Mul (Var 3 b) (Array (Integer 4) [(() ())] DescriptorArray ) () ) Mul (Var 3 c) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 ca) (IntegerBinOp (IntegerBinOp (ArrayBroadcast (IntegerConstant 2 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 3 c)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) Mul (Var 3 c) (Array (Integer 4) [(() ())] DescriptorArray ) () ) Mul (Var 3 a) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 abc) (IntegerBinOp (IntegerBinOp (IntegerBinOp (ArrayBroadcast (IntegerConstant 2 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 3 a)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) Mul (Var 3 a) (Array (Integer 4) [(() ())] DescriptorArray ) () ) Mul (Var 3 b) (Array (Integer 4) [(() ())] DescriptorArray ) () ) Mul (Var 3 c) (Array (Integer 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 3 status) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. )] (Var 3 status) Public .true. .true. () ) }) allocate_01 [] [(Assignment (Var 2 n) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (Allocate [((Var 2 a) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] () () ()) ((Var 2 b) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] () () ()) ((Var 2 c) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] () () ())] (Var 2 ierr) () (Var 2 isource) ) (Assignment (Var 2 a) (Var 2 isource) () .false. .false. ) (Assignment (Var 2 b) (Var 2 isource) () .false. .false. ) (Assignment (Var 2 c) (Var 2 isource) () .false. .false. ) (Assignment (Var 2 a) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 2 a)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 2 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 2 b)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Assignment (Var 2 c) (ArrayBroadcast (IntegerConstant 3 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 2 c)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Print (StringFormat () [(FunctionCall 2 whole_square () [((Var 2 a)) ((Var 2 b)) ((Var 2 c))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_08-581c944.stdout0000664000175000017500000000007515227365530023512 0ustar alastairalastair 1 1 1 1 1 1 1 1 1 1 lfortran-0.64.0/tests/reference/fortran-expr_05-1df98eb.json0000664000175000017500000000075115227365530023715 0ustar alastairalastair{ "basename": "fortran-expr_05-1df98eb", "cmd": "lfortran --show-fortran --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_05.f90", "infile_hash": "ab6fcfdb7d7b127b347b822368c1a3d22c7241a82453de78dd535c05", "outfile": null, "outfile_hash": null, "stdout": "fortran-expr_05-1df98eb.f90", "stdout_hash": "60e8f2848df482856cbe4de15d6d4c8f5af074491104be94623adf02", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/asr-where_04-a7fce45.json0000664000175000017500000000074215227365530023156 0ustar alastairalastair{ "basename": "asr-where_04-a7fce45", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_04.f90", "infile_hash": "48449a9af8d215a5a118d0776d25e23b7b310df89b1775164ddfde5e", "outfile": null, "outfile_hash": null, "stdout": "asr-where_04-a7fce45.stdout", "stdout_hash": "01eef902e8f39334b44fe9bf010e29f82f781f23eb309ad9a7c92d3c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-logical1-ef567ea.stdout0000664000175000017500000001271315227365530023620 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 i32) i32.const 1 local.set 0 i32.const 0 local.set 1 local.get 0 i64.extend_i32_s call 3 i32.const 1 i32.const 4 i32.const 1 i32.const 0 call 1 drop local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/asr-expr4-6c75096.stdout0000664000175000017500000000375315227365530022746 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { }) [(RealConstant 5.000000 (Real 4) ) (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 8.000000 (Real 4) ) ) (RealBinOp (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 8.000000 (Real 4) ) ) Mul (RealConstant 2.000000 (Real 4) ) (Real 4) (RealConstant 16.000000 (Real 4) ) ) (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealBinOp (RealConstant 3.000000 (Real 4) ) Mul (RealConstant 2.000000 (Real 4) ) (Real 4) (RealConstant 6.000000 (Real 4) ) ) (Real 4) (RealConstant 11.000000 (Real 4) ) ) (RealBinOp (RealConstant 5.000000 (Real 4) ) Sub (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 2.000000 (Real 4) ) ) (RealBinOp (RealConstant 4.000000 (Real 4) ) Pow (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 64.000000 (Real 4) ) )] ) lfortran-0.64.0/tests/reference/run-no_main_program_2-7846a7c.stderr0000664000175000017500000000017315227365530025345 0ustar alastairalastairsemantic error: no main program found; cannot build an executable. To compile this file as a library, use the `-c` option. lfortran-0.64.0/tests/reference/asr-string_02-bc2a3b9.json0000664000175000017500000000074515227365530023342 0ustar alastairalastair{ "basename": "asr-string_02-bc2a3b9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_02.f90", "infile_hash": "249fc849c605e3aad0bd2c8a33e00523fdc2270b95caa69737801caa", "outfile": null, "outfile_hash": null, "stdout": "asr-string_02-bc2a3b9.stdout", "stdout_hash": "3009840b29f6ec88c4486d603cc77d843207c1560727998fe1c87b98", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-case_01-cbdd0aa.stdout0000664000175000017500000000115015227365530023756 0ustar alastairalastairfunction main() local i::Int64 local out::Int64 i = 4 if i == 1 out = 10 println("1") elseif i == 2 out = 20 println("2") elseif i == 3 out = 30 println("3") elseif i == 4 out = 40 println("4") end if out ≠ 40 println(Base.stderr, "ERROR STOP") exit(1) end if i == 1 out = 11 println("1") elseif i == 2 || i == 3 || i == 4 out = 22 println("2,3,4") end if out ≠ 22 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/asr-nullify_04-a75db8a.stdout0000664000175000017500000002234415227365530024076 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { module_nullify_04: (Module (SymbolTable 2 { scaled_data_structure: (Struct (SymbolTable 3 { one_d_real_pointer: (Variable 3 one_d_real_pointer [] Local () () Default (Pointer (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) scaled_data_structure (StructType [(Pointer (Array (Real 4) [(() ())] DescriptorArray ) )] [] .true. .false. ) [] [one_d_real_pointer] [] Source Public .false. .false. .false. [] () () [] ) }) module_nullify_04 () [] .false. .false. .false. ), nullify_04: (Program (SymbolTable 4 { 1_scaled_data_structure_one_d_real_pointer: (ExternalSymbol 4 1_scaled_data_structure_one_d_real_pointer 3 one_d_real_pointer module_nullify_04 [scaled_data_structure] one_d_real_pointer Public ), s: (Variable 4 s [] Local () () Default (StructType [(Pointer (Array (Real 4) [(() ())] DescriptorArray ) )] [] .true. .false. ) 4 scaled_data_structure Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 4 s2 [] Local () () Default (StructType [(Pointer (Array (Real 4) [(() ())] DescriptorArray ) )] [] .true. .false. ) 4 scaled_data_structure Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), scaled_data_structure: (ExternalSymbol 4 scaled_data_structure 2 scaled_data_structure module_nullify_04 [] scaled_data_structure Public ) }) nullify_04 [module_nullify_04] [(Nullify [(StructInstanceMember (Var 4 s) 4 1_scaled_data_structure_one_d_real_pointer (Pointer (Array (Real 4) [(() ())] DescriptorArray ) ) () )] ) (Nullify [(StructInstanceMember (Var 4 s2) 4 1_scaled_data_structure_one_d_real_pointer (Pointer (Array (Real 4) [(() ())] DescriptorArray ) ) () )] )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_26-f627ed6.stdout0000664000175000017500000000002015227365530023642 0ustar alastairalastair 42 666 42 666 lfortran-0.64.0/tests/reference/asr-array_constructor_with_integer_real_array_types-c665202.json0000664000175000017500000000111115227365530033261 0ustar alastairalastair{ "basename": "asr-array_constructor_with_integer_real_array_types-c665202", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_constructor_with_integer_real_array_types.f90", "infile_hash": "17fbb7758226f84e587218354c221dad9ae645d719e685881fd7eea3", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_constructor_with_integer_real_array_types-c665202.stderr", "stderr_hash": "27ae450141135b7ff688eaef0b41422c1d2ace6ac28e8f3664a7f41e", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-global_scope3-57006df.json0000664000175000017500000000073415227365530024113 0ustar alastairalastair{ "basename": "asr-global_scope3-57006df", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope3.f90", "infile_hash": "60cea65abfbb2228d16f175ea192462ae2379d7a9da1601cb3de9f3a", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope3-57006df.stdout", "stdout_hash": "cb87db38e5096a41884e7788e15ebcdc34d8e9491b3cb42b5fa7024e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit4-704272e.json0000664000175000017500000000106215227365530023207 0ustar alastairalastair{ "basename": "asr-implicit4-704272e", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit4.f90", "infile_hash": "e6c1d3c3a3a1035d1b04865b063a479380fdb2a911cb4e4c19c67ff8", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit4-704272e.stdout", "stdout_hash": "9cc8a9e40e73fc87b24d29206853e95ed801ece2db0ea1e9feaa8191", "stderr": "asr-implicit4-704272e.stderr", "stderr_hash": "60e6b5b71dd6e647e2f6504b3951ff2c5958e4517113087b2a3a448e", "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-fmt1-c767956.stdout0000664000175000017500000000100115227365530023222 0ustar alastairalastairreal(c_float) :: r real(c_float) :: r character(kind=c_char) :: c character(len=*) :: c character(len=*) :: c character(len=*, kind=c_char) :: c character(len=*, kind=c_char) :: c character(len=*, kind=c_char) :: c character(len=:) :: c character(len=:) :: c character(len=:, kind=c_char) :: c character(len=:, kind=c_char) :: c character(len=:, kind=c_char) :: c character(len=n) :: c character(len=n) :: c character(len=n, kind=c_char) :: c character(len=n, kind=c_char) :: c character(len=n, kind=c_char) :: c lfortran-0.64.0/tests/reference/ast-forall1-50096b8.stderr0000664000175000017500000000057615227365530023221 0ustar alastairalastairstyle suggestion: Use '/=' instead of '.ne.' --> tests/forall1.f90:9:33 | 9 | forall (i=1:n, j=1:m, A(i,j).NE.0) & | ^^^^ help: write this as '/=' style suggestion: Use '/=' instead of '.ne.' --> tests/forall1.f90:36:34 | 36 | inner: forall (j=1:100, i.NE.j) | ^^^^ help: write this as '/=' lfortran-0.64.0/tests/reference/ast-double_complex1-2f3d83c.stdout0000664000175000017500000000105415227365530025111 0ustar alastairalastair(TranslationUnit [(Program test_double_complex () [] [] [(Declaration (AttrType TypeDoubleComplex [] () () None ) [] [(y [] [] () () None ()) (zwork [] [] () () None ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope6-278bd63.json0000664000175000017500000000101415227365530027045 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope6-278bd63", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope6.f90", "infile_hash": "3f2dfa122b78175565b7baa8f4d0417cfb0ed5bbe26bbb5f0f1f6f2e", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope6-278bd63.stdout", "stdout_hash": "2e81724c477597264f64e5c78236d606e92d70ebf494fa18bf4a7029", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-write7-6ba53a1.json0000664000175000017500000000070715227365530022667 0ustar alastairalastair{ "basename": "asr-write7-6ba53a1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/write7.f90", "infile_hash": "72e9fcaf8f4630dca63e67f6803d98543e8fdedc2ba0e20224168db8", "outfile": null, "outfile_hash": null, "stdout": "asr-write7-6ba53a1.stdout", "stdout_hash": "4ccab1c6f56bfbe9a9358919619cf3920b766e01916c92aacdffbb7f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-return_05-b1ab26b.stdout0000664000175000017500000000315515227365530024104 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [11 x i8] c"Hello world" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([11 x i8], [11 x i8]* @string_const_data, i32 0, i32 0), i64 11 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @f() { .entry: br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return ret void } define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) br label %return unreachable_after_return: ; No predecessors! %2 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %2, i32 11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %return return: ; preds = %unreachable_after_return, %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-types_06-58f9b18.stdout0000664000175000017500000005251115227365530023434 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { types_06: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) types_06 [] [(Assignment (Var 2 r) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Lt (Var 2 i) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Lt (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Lt (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Lt (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 i) Gt (Var 2 i) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Gt (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Gt (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Gt (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 i) NotEq (Var 2 i) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) NotEq (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) NotEq (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (Var 2 i) IntegerToReal (Real 4) () () ) NotEq (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (Var 2 i) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) LtE (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) LtE (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 4) () () ) LtE (Var 2 r) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 i) GtE (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) GtE (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) GtE (Cast (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (Var 2 i) IntegerToReal (Real 4) () () ) GtE (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 i) Eq (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Eq (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 2 r) Eq (Cast (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Eq (RealBinOp (Var 2 r) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-string_02-604c7cc.json0000664000175000017500000000074515227365530023270 0ustar alastairalastair{ "basename": "ast-string_02-604c7cc", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_02.f90", "infile_hash": "249fc849c605e3aad0bd2c8a33e00523fdc2270b95caa69737801caa", "outfile": null, "outfile_hash": null, "stdout": "ast-string_02-604c7cc.stdout", "stdout_hash": "4469a9a38b538092272266e660fde089c2aa73a8bf5c3d3ff6db64a6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-entry1-5f14c6d.stdout0000664000175000017500000000043115227365530023725 0ustar alastairalastairprogram entry1 real :: dummy dummy = 10 call x(dummy) call y(dummy) end program entry1 subroutine x(dummy) real :: dummy print *, "Printed using subroutine call: ", dummy dummy = 5.0 return entry y(dummy) print *, "Printed using entry statement: ", dummy return end subroutine x lfortran-0.64.0/tests/reference/asr-fixed_number_of_args-051b0f1.json0000664000175000017500000000077015227365530025531 0ustar alastairalastair{ "basename": "asr-fixed_number_of_args-051b0f1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/fixed_number_of_args.f90", "infile_hash": "1b3aa87f3b596e48a59fbdde7a0d087382fe86f59b16d140a9080f67", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-fixed_number_of_args-051b0f1.stderr", "stderr_hash": "0b27b7f5c19c3839e3d0a9d6780e620fc12356cfaf3e1f64acd9b7ba", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-sqrt_neg-5a20839.stderr0000664000175000017500000000023415227365530023466 0ustar alastairalastairsemantic error: Argument of `sqrt` has a negative argument --> tests/errors/sqrt_neg.f90:2:14 | 2 | print *, sqrt(-1.0) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-program_without_line_03-02055a5.json0000664000175000017500000000100115227365530026036 0ustar alastairalastair{ "basename": "ast-program_without_line_03-02055a5", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/program_without_line_03.f90", "infile_hash": "c13c381753891f9763d89fca907d09d8b91fbeb4a75cea48bb067bd2", "outfile": null, "outfile_hash": null, "stdout": "ast-program_without_line_03-02055a5.stdout", "stdout_hash": "07d77481a3e5fd16c38342d0b79d66659db3518386c72f91bfb82432", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_14-75884fe.json0000664000175000017500000000077215227365530024572 0ustar alastairalastair{ "basename": "asr-derived_types_14-75884fe", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_14.f90", "infile_hash": "e48139c0e3c8b0587ad6aa57eb7d1790439bcf6b7b8318bdf1274c50", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_14-75884fe.stdout", "stdout_hash": "eb893dff5a62a3c7ac930e16e84fe54a239ef717f706a6f070831a60", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_51-f69fffa.stdout0000664000175000017500000000022415227365530024012 0ustar alastairalastairbinary 2: 00000000000000000000000000000010 binary 255: 11111111 binary -1: **************** binary 42: 101010 binary 7: 111 01111 100 PASSED lfortran-0.64.0/tests/reference/ast-loop_test5-d27e6d6.json0000664000175000017500000000073615227365530023566 0ustar alastairalastair{ "basename": "ast-loop_test5-d27e6d6", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop_test5.f", "infile_hash": "b0b55d75eb00726ea0683cc0829370dd7bb145ae4db703c5448b5e58", "outfile": null, "outfile_hash": null, "stdout": "ast-loop_test5-d27e6d6.stdout", "stdout_hash": "cbcb8bb5ecae3a5ac50e77db001d6a2c9bbb1e860d6e6cf78a94df9b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incorrect_type_where_01-8974c02.stderr0000664000175000017500000000024415227365530026375 0ustar alastairalastairsemantic error: the argument to `where` must be an array --> tests/errors/incorrect_type_where_01.f90:5:10 | 5 | where(.true.) b = 12121 | ^^^^^^ lfortran-0.64.0/tests/reference/ast_f90-entry1-5f14c6d.json0000664000175000017500000000072215227365530023357 0ustar alastairalastair{ "basename": "ast_f90-entry1-5f14c6d", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/entry1.f90", "infile_hash": "ca0b3d63526c84c42bb3f45badc8a6393867586040e33d02c7a8561c", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-entry1-5f14c6d.stdout", "stdout_hash": "e121152a4ada136406c6f0cc3ea206189fc7fbea0cd3d5cb1a401bcf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-logical4-b4e6b33.stdout0000664000175000017500000000526715227365530023716 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [12 x i8] c"L32,L32,L32\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 store i32 1, i32* %a, align 4 store i32 1, i32* %b, align 4 store i32 0, i32* %c, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %a, i32* %b, i32* %c) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_logical4 FINALIZE_SYMTABLE_logical4: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/cpp-program4-1796cb6.json0000664000175000017500000000101715227365530023130 0ustar alastairalastair{ "basename": "cpp-program4-1796cb6", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/program4.f90", "infile_hash": "16adb5a498028ea668b9d513bb2ef0fa0b12e15bef4e2b5e30aa2740", "outfile": null, "outfile_hash": null, "stdout": "cpp-program4-1796cb6.stdout", "stdout_hash": "c3ba4a8ff33090c0ec2d1b3cea398b2206468ae7ac724191ce735d81", "stderr": "cpp-program4-1796cb6.stderr", "stderr_hash": "3e15ec8a328c3f581817cf479d93e1f7166d89865efb6fb03f1909b8", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do_concurrent_reduce-58dd849.json0000664000175000017500000000076115227365530025612 0ustar alastairalastair{ "basename": "ast-do_concurrent_reduce-58dd849", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do_concurrent_reduce.f90", "infile_hash": "44ebdebb05b853f4680c203c3b2b0e98e9285d1f3923ecbc255bc105", "outfile": null, "outfile_hash": null, "stdout": "ast-do_concurrent_reduce-58dd849.stdout", "stdout_hash": "cb19c1f24c151b66be730690c674b132ff7866e19476102df9a6cbd8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-associate_02-ca5c9ec.json0000664000175000017500000000075615227365530024100 0ustar alastairalastair{ "basename": "asr-associate_02-ca5c9ec", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/associate_02.f90", "infile_hash": "d3505eea2e17cbf463e707ee2faf24aedf12a13ebb06fee4a5a1adfb", "outfile": null, "outfile_hash": null, "stdout": "asr-associate_02-ca5c9ec.stdout", "stdout_hash": "ba93c1b756dce3b8f830c81ef6647b2455f0d02d0af9b6edf5a9b10c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor11-dc5b2d5.stdout0000664000175000017500000001475015227365530027245 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor11: (Program (SymbolTable 2 { }) preprocessor11 [] [(Print (StringFormat () [(IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Add (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Mul (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 15 (Integer 4) Decimal) ) (Integer 4) (IntegerConstant 16 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "X is 1" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X is not 2" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Not X is not 1" (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X is 1 and Y is 5" (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Not (X is 2 and Y is 5)" (String 1 (IntegerConstant 23 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X<3 and Y>3" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Not (X>3 and Y<3)" (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X is 3-2" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X is not 3-1" (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is (6*5-5)/5" (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is not (6*5-6)/5" (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is (-5+6*5)/5" (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is not (-6+6*5)/5" (String 1 (IntegerConstant 19 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is (+5+6*5)/7" (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is not (+4+6*5)/7" (String 1 (IntegerConstant 19 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is (+5+6*Y)/7" (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Z is 16" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y defined and 1 <= Y" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "A not defined or not 1 <= A" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_enable_style_suggestion-style1-a2fdd22.stdout0000664000175000017500000000001015227365530030302 0ustar alastairalastair y is 1 lfortran-0.64.0/tests/reference/asr_preprocess-cpp3-1719443.stderr0000664000175000017500000000021615227365530024677 0ustar alastairalastairsemantic error: Variable 'xx' is not declared --> tests/errors/cpp3.f90:7:10 | 7 | print *, xx, X123, y | ^^ 'xx' is undeclared lfortran-0.64.0/tests/reference/ast-program_04-114a023.json0000664000175000017500000000075015227365530023251 0ustar alastairalastair{ "basename": "ast-program_04-114a023", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/program_04.f90", "infile_hash": "6d4faa951231e470e99cbc3ff617437048ceb99e3d92ba6e7810ef43", "outfile": null, "outfile_hash": null, "stdout": "ast-program_04-114a023.stdout", "stdout_hash": "7fc2eca3a57ac776159f26e1191c79ae6df28fa5ec3d0e53f2a49f5f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutine2-2e9b84b.json0000664000175000017500000000073515227365530023745 0ustar alastairalastair{ "basename": "asr-subroutine2-2e9b84b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/subroutine2.f90", "infile_hash": "8d668071a906445fe0fbdca2d363b4a71347144c0a1c6c63893bd3b6", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-subroutine2-2e9b84b.stderr", "stderr_hash": "cdd6f5045d10d67292e10e561b3e3e368e46a987db60c98c39e16392", "returncode": 2 }lfortran-0.64.0/tests/reference/run-stop_03-897cacd.json0000664000175000017500000000070715227365530023054 0ustar alastairalastair{ "basename": "run-stop_03-897cacd", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/stop_03.f90", "infile_hash": "87d669b34b513b6802c7b254562f8ea915c2a166d298150441398562", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-stop_03-897cacd.stderr", "stderr_hash": "3e23cf1cb50e4b97d71757a6cc871271723a4247df92d3c07b24a0b0", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array9-fe1439d.stdout0000664000175000017500000001321015227365530023236 0ustar alastairalastair(TranslationUnit [(Program array9 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [(DerivedType varying_string [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Declaration (AttrType TypeCharacter [(len 1 Value)] () () None ) [(SimpleAttribute AttrAllocatable )] [(characters [(() () DimensionExpr)] [] () () None ())] () )] [] ) (Declaration (AttrType TypeType [] () varying_string None ) [] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () varying_string None ) [(SimpleAttribute AttrAllocatable )] [(a [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrAllocatable )] [(b [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrAllocatable )] [(c [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [(kind 4 Value)] () () None ) [(SimpleAttribute AttrAllocatable )] [(d [(() () DimensionExpr)] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 a (ArrayInitializer () varying_string [] ) () ) (Assignment 0 b (ArrayInitializer (AttrType TypeReal [] () () None ) () [] ) () ) (Assignment 0 b (ArrayInitializer (AttrType TypeInteger [] () () None ) () [] ) () ) (Assignment 0 d (ArrayInitializer (AttrType TypeReal [(kind 4 Value)] () () None ) () [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 a (ArrayInitializer () varying_string [x x] ) () ) (Assignment 0 b (ArrayInitializer (AttrType TypeReal [] () () None ) () [(Real "1.0") (Real "2.0")] ) () ) (Assignment 0 b (ArrayInitializer (AttrType TypeInteger [] () () None ) () [1 2] ) () ) (Assignment 0 d (ArrayInitializer (AttrType TypeReal [(kind 4 Value)] () () None ) () [(Real "1.0") (Real "2.0")] ) () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-classes2-f926d51.json0000664000175000017500000000072015227365530023303 0ustar alastairalastair{ "basename": "llvm-classes2-f926d51", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/classes2.f90", "infile_hash": "2cfac3880e7182601f0b4be7f9818327edf969abff5d13be53cbf23d", "outfile": null, "outfile_hash": null, "stdout": "llvm-classes2-f926d51.stdout", "stdout_hash": "0f3bd3d832853a7d5949aebacab368d284e81ae9d23aa03d9f9dfcb4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_size_02-94fb4d3.stderr0000664000175000017500000000031415227365530024460 0ustar alastairalastairsemantic error: dim has already been specified as a positional/keyword argument to size --> tests/errors/array_size_02.f90:5:14 | 5 | size_a = size(a, 1, dim=1) | ^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor10-6279d1f.stdout0000664000175000017500000000655015227365530027115 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor10: (Program (SymbolTable 2 { }) preprocessor10 [] [(Print (StringConstant "X is defined" (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Y is defined" (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Z is not defined" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and Y is defined" (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Z and Y is not defined" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Z or Y is defined" (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and Y and Z is not defined" (String 1 (IntegerConstant 28 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and Y or Z is defined" (String 1 (IntegerConstant 23 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and Y or Z is defined" (String 1 (IntegerConstant 23 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and !Y or !Z is defined" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "X and !(Y or Z) is not defined" (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-modules_02-dc19c13.stdout0000664000175000017500000010153415227365530023777 0ustar alastairalastair(TranslationUnit [(Module random (TriviaNode [(EndOfLine) (EndOfLine)] [] ) [(Use [] types [(UseSymbol dp () )] .true. () ) (Use [] utils [(UseSymbol stop_error () )] .true. () )] [(ImplicitNone [] () )] [(Declaration () [(SimpleAttribute AttrPrivate )] [] () ) (Declaration () [(SimpleAttribute AttrPublic )] [(randn [] [] () () None ()) (rand_gamma [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Interface (InterfaceHeaderName randn ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [randn_scalar] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_vector] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_matrix] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_vector_n] [(SimpleAttribute AttrModule )] () )] ) (Interface (InterfaceHeaderName rand_gamma ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [rand_gamma_scalar] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [rand_gamma_vector] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [rand_gamma_matrix] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [rand_gamma_vector_n] [(SimpleAttribute AttrModule )] () )] )] [] [(Subroutine randn_scalar [(x)] [] () (TriviaNode [(EndOfLine) (Comment "! Returns a psuedorandom scalar drawn from the standard normal distribution." ) (Comment "!" ) (Comment "! [1] Marsaglia, G., & Bray, T. A. (1964). A Convenient Method for Generating" ) (Comment "! Normal Variables. SIAM Review, 6(3), 260-264." )] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [(SimpleAttribute AttrSave )] [(first [] [] () (Logical .true. ()) Equal ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(SimpleAttribute AttrSave )] [(u [(1 2 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [] [(r2 [] [] () () None ())] () )] [(If 0 () first [(DoLoop 0 () 0 () () () () [(SubroutineCall 0 random_number [] [(() u () 0)] [] [] () ) (Assignment 0 u (- (* 2 u) 1) () ) (Assignment 0 r2 (FuncCallOrArray sum [] [(() (** u 2) () 0)] [] [] [] ) () ) (If 0 () (BoolOp (< r2 1) And (> r2 0) ) [(Exit 0 () () )] [] () () () )] () () ) (Assignment 0 u (* u (FuncCallOrArray sqrt [] [(() (/ (* (u- 2) (FuncCallOrArray log [] [(() r2 () 0)] [] [] [] )) r2) () 0)] [] [] [] )) () ) (Assignment 0 x (FuncCallOrArray u [] [(() 1 () 0)] [] [] [] ) () )] [(Assignment 0 x (FuncCallOrArray u [] [(() 2 () 0)] [] [] [] ) () )] () () () ) (Assignment 0 first (not first) () )] [] [] ) (Subroutine randn_vector_n [(n) (x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(n [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(1 n DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(DoLoop 0 () 0 i 1 (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () [(SubroutineCall 0 randn [] [(() (FuncCallOrArray x [] [(() i () 0)] [] [] [] ) () 0)] [] [] () )] () () )] [] [] ) (Subroutine randn_vector [(x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(() () DimensionExpr)] [] () () None ())] () )] [(SubroutineCall 0 randn_vector_n [] [(() (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () 0) (() x () 0)] [] [] () )] [] [] ) (Subroutine randn_matrix [(x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(() () DimensionExpr) (() () DimensionExpr)] [] () () None ())] () )] [(SubroutineCall 0 randn_vector_n [] [(() (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () 0) (() x () 0)] [] [] () )] [] [] ) (Subroutine rand_gamma0 [(a) (first) (fn_val)] [] () (TriviaNode [(EndOfLine) (Comment "! Returns a psuedorandom scalar drawn from the gamma distribution." ) (Comment "!" ) (Comment "! The shape parameter a >= 1." ) (Comment "!" ) (Comment "! [1] Marsaglia, G., & Tsang, W. W. (2000). A Simple Method for Generating" ) (Comment "! Gamma Variables. ACM Transactions on Mathematical Software (TOMS), 26(3)," ) (Comment "! 363-372." )] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [(AttrIntent In )] [(first [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(fn_val [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(SimpleAttribute AttrSave )] [(c [] [] () () None ()) (d [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [] [(U [] [] () () None ()) (v [] [] () () None ()) (x [] [] () () None ())] () )] [(If 0 () (< a 1) [(SubroutineCall 0 stop_error [] [(() (String "Shape parameter must be >= 1" ()) () 0)] [] [] () )] [] () () () ) (If 0 () first [(Assignment 0 d (- a (/ (Real "1._dp") 3)) () ) (Assignment 0 c (/ 1 (FuncCallOrArray sqrt [] [(() (* 9 d) () 0)] [] [] [] )) () )] [] () () () ) (DoLoop 0 () 0 () () () () [(DoLoop 0 () 0 () () () () [(SubroutineCall 0 randn [] [(() x () 0)] [] [] () ) (Assignment 0 v (** (+ 1 (* c x)) 3) () ) (If 0 () (> v 0) [(Exit 0 () () )] [] () () () )] () () ) (SubroutineCall 0 random_number [] [(() U () 0)] [] [] (TriviaNode [] [(EndOfLine) (Comment "! Note: the number 0.0331 below is exact, see [1]." )] ) ) (If 0 () (< U (- 1 (* (Real "0.0331_dp") (** x 4)))) [(Assignment 0 fn_val (* d v) () ) (Exit 0 () () )] [(If 0 () (< (FuncCallOrArray log [] [(() U () 0)] [] [] [] ) (+ (/ (** x 2) 2) (* d (+ (- 1 v) (FuncCallOrArray log [] [(() v () 0)] [] [] [] ))))) [(Assignment 0 fn_val (* d v) () ) (Exit 0 () () )] [] () () () )] () () () )] () () )] [] [] ) (Subroutine rand_gamma_scalar [(a) (x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [] [] () () None ())] () )] [(SubroutineCall 0 rand_gamma0 [] [(() a () 0) (() (Logical .true. ()) () 0) (() x () 0)] [] [] () )] [] [] ) (Subroutine rand_gamma_vector_n [(a) (n) (x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(n [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(1 n DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(SubroutineCall 0 rand_gamma0 [] [(() a () 0) (() (Logical .true. ()) () 0) (() (FuncCallOrArray x [] [(() 1 () 0)] [] [] [] ) () 0)] [] [] () ) (DoLoop 0 () 0 i 2 (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () [(SubroutineCall 0 rand_gamma0 [] [(() a () 0) (() (Logical .false. ()) () 0) (() (FuncCallOrArray x [] [(() i () 0)] [] [] [] ) () 0)] [] [] () )] () () )] [] [] ) (Subroutine rand_gamma_vector [(a) (x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(() () DimensionExpr)] [] () () None ())] () )] [(SubroutineCall 0 rand_gamma_vector_n [] [(() a () 0) (() (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () 0) (() x () 0)] [] [] () )] [] [] ) (Subroutine rand_gamma_matrix [(a) (x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent Out )] [(x [(() () DimensionExpr) (() () DimensionExpr)] [] () () None ())] () )] [(SubroutineCall 0 rand_gamma_vector_n [] [(() a () 0) (() (FuncCallOrArray size [] [(() x () 0)] [] [] [] ) () 0) (() x () 0)] [] [] () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/ast-program3-e2fc2d1.json0000664000175000017500000000071515227365530023265 0ustar alastairalastair{ "basename": "ast-program3-e2fc2d1", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/program3.f90", "infile_hash": "f5e4a3f2a2a6f406171d0aa3895b5d7342c4d87b73ffede073827f34", "outfile": null, "outfile_hash": null, "stdout": "ast-program3-e2fc2d1.stdout", "stdout_hash": "28e8f482d908b247c131cf7853fbb910625fa811fcaa5eb77dc81652", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_openmp-pragma1-25cfcb2.json0000664000175000017500000000074115227365530024436 0ustar alastairalastair{ "basename": "asr_openmp-pragma1-25cfcb2", "cmd": "lfortran --show-asr --no-color --openmp {infile} -o {outfile}", "infile": "tests/pragma1.f90", "infile_hash": "0b9eea06186cb7eb1866b55256263d4e562835c40920f35b92ed18ee", "outfile": null, "outfile_hash": null, "stdout": "asr_openmp-pragma1-25cfcb2.stdout", "stdout_hash": "46520ab5159eb6ba67326d3d90f6494300cd18cf4f5f0d33c2980b13", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-nullify_01-810c9d3.stdout0000664000175000017500000000165115227365530024116 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %p1 = alloca i32*, align 8 store i32* null, i32** %p1, align 8 %p2 = alloca i32*, align 8 store i32* null, i32** %p2, align 8 %t1 = alloca i32, align 4 store i32* %t1, i32** %p1, align 8 store i32* %t1, i32** %p2, align 8 %2 = load i32*, i32** %p1, align 8 store i32 1, i32* %2, align 4 store i32* null, i32** %p1, align 8 store i32* null, i32** %p2, align 8 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nullify_01 FINALIZE_SYMTABLE_nullify_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-dfloat1-6063adb.json0000664000175000017500000000072115227365530022777 0ustar alastairalastair{ "basename": "asr-dfloat1-6063adb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dfloat1.f90", "infile_hash": "b50b81a63b232ce8b4801c6c435c827b7df71baf4217dd90f15762e4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dfloat1-6063adb.stderr", "stderr_hash": "de5d5c88ec7bf943a3b4746575d13c97cc97b9cd9b8f4c9866791a8b", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-continue_compilation_coarrays-85ccad8.stderr0000664000175000017500000000246415227365530030224 0ustar alastairalastairsemantic error: Variable 'x' is not a coarray; coindex notation [..] requires a codimension attribute --> tests/errors/continue_compilation_coarrays.f90:5:9 | 5 | x = x[1] | ^^^^ semantic error: Coarray 'b' has corank 2 but 1 coindices were provided --> tests/errors/continue_compilation_coarrays.f90:9:5 | 9 | B[1] = 5 | ^^^^ semantic error: Variable 's' is not a coarray; coindex notation [..] requires a codimension attribute --> tests/errors/continue_compilation_coarrays.f90:17:11 | 17 | s%x = s%x[1] | ^^^^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_coarrays.f90:17:5 | 17 | s%x = s%x[1] | ^^^ ^^^^^^ type mismatch (integer and t) semantic error: Coarray 's' has corank 2 but 1 coindices were provided --> tests/errors/continue_compilation_coarrays.f90:20:5 | 20 | s%y[1] = 5 | ^^^^^^ semantic error: Coarray coindices do not support step notation (e.g., [i:j:k]) --> tests/errors/continue_compilation_coarrays.f90:23:9 | 23 | a = z[1:5:2] | ^^^^^^^^ semantic error: Coarray 'cod' coindex 1 is out of bounds: 5 not in [1, 4] --> tests/errors/continue_compilation_coarrays.f90:26:13 | 26 | print *,cod[5] | ^^^^^^ lfortran-0.64.0/tests/reference/cpp-expr_05-3b5ec63.json0000664000175000017500000000072215227365530022732 0ustar alastairalastair{ "basename": "cpp-expr_05-3b5ec63", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/expr_05.f90", "infile_hash": "ab6fcfdb7d7b127b347b822368c1a3d22c7241a82453de78dd535c05", "outfile": null, "outfile_hash": null, "stdout": "cpp-expr_05-3b5ec63.stdout", "stdout_hash": "254da958ec0be8bf0705deaed51b55584a214ae34951339e2f090e85", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fn3-5eccc1b.stdout0000664000175000017500000000464515227365530022657 0ustar alastairalastair(TranslationUnit [(Function a [] [(SimpleAttribute AttrRecursive ) (SimpleAttribute AttrPure ) (AttrType TypeInteger [] () () None )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) (Function b [] [(SimpleAttribute AttrPure ) (AttrType TypeInteger [] () () None ) (SimpleAttribute AttrElemental )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) (Function c [] [(SimpleAttribute AttrElemental ) (SimpleAttribute AttrPure ) (AttrType TypeInteger [] () () None )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) (Function cb [] [(SimpleAttribute AttrElemental ) (SimpleAttribute AttrPure )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(cb [] [] () () None ())] () )] [] [] [] ) (Function d [] [(AttrType TypeInteger [] () () None ) (SimpleAttribute AttrPure ) (SimpleAttribute AttrRecursive )] () () () [] [] [] [] [] [] [] )] ) lfortran-0.64.0/tests/reference/ast-derived_type_without_start_program-089810e.json0000664000175000017500000000104215227365530030527 0ustar alastairalastair{ "basename": "ast-derived_type_without_start_program-089810e", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/derived_type_without_start_program.f90", "infile_hash": "868e3167deeaa36d65490e0f0763100113cd37df9967c7a3773a3f1c", "outfile": null, "outfile_hash": null, "stdout": "ast-derived_type_without_start_program-089810e.stdout", "stdout_hash": "ba7b92d9ec5ddefee702708a00141c93e300cd5d0049cc1e64f61967", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-statement1-481e9b6.stdout0000664000175000017500000007717715227365530024063 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { statement1: (Program (SymbolTable 2 { dfloat: (Function (SymbolTable 4 { dfloat_return_var_name: (Variable 4 dfloat_return_var_name [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 4 i [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 4 j [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dfloat (FunctionType [(Integer 4) (Integer 4)] (Real 8) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 i) (Var 4 j)] [(Assignment (Var 4 dfloat_return_var_name) (Cast (IntegerBinOp (Var 4 i) Add (Var 4 j) (Integer 4) () ) IntegerToReal (Real 8) () () ) () .false. .false. )] (Var 4 dfloat_return_var_name) Public .false. .true. () ), dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ifloat: (Function (SymbolTable 5 { i: (Variable 5 i [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ifloat_return_var_name: (Variable 5 ifloat_return_var_name [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 5 j [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ifloat (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 5 i) (Var 5 j)] [(Assignment (Var 5 ifloat_return_var_name) (IntegerBinOp (Var 5 i) Add (Var 5 j) (Integer 4) () ) () .false. .false. )] (Var 5 ifloat_return_var_name) Public .false. .true. () ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sfloat: (Function (SymbolTable 3 { i: (Variable 3 i [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 3 j [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sfloat_return_var_name: (Variable 3 sfloat_return_var_name [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sfloat (FunctionType [(Integer 4) (Integer 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 i) (Var 3 j)] [(Assignment (Var 3 sfloat_return_var_name) (Cast (IntegerBinOp (Var 3 i) Mul (Var 3 j) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. )] (Var 3 sfloat_return_var_name) Public .false. .true. () ), sum: (Variable 2 sum [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ti: (Variable 2 ti [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) statement1 [] [(Assignment (Var 2 ti) (FunctionCall 2 sfloat () [((IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 8 (Integer 4) Decimal))] (Real 4) () () ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 ti) Sub (Cast (IntegerConstant 8 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 8.000000 (Real 4) ) () ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 sum) (RealBinOp (FunctionCall 2 sfloat () [((IntegerConstant 12 (Integer 4) Decimal)) ((IntegerConstant 9 (Integer 4) Decimal))] (Real 4) () () ) Add (RealConstant 12.420000 (Real 4) ) (Real 4) () ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 sum) Sub (RealConstant 120.419998 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (FunctionCall 2 dfloat () [((IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Real 8) () () ) Sub (Cast (IntegerConstant 9 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 9.000000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (FunctionCall 2 ifloat () [((IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Integer 4) () () ) NotEq (IntegerConstant 9 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-array9-25daf13.json0000664000175000017500000000072215227365530023335 0ustar alastairalastair{ "basename": "ast_f90-array9-25daf13", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/array9.f90", "infile_hash": "7107510b84a7e22f82d8f1f61617c399bc53b8a0fb59a5453419889c", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-array9-25daf13.stdout", "stdout_hash": "6486b5f54278b27b328aaac980f8684d357725453a07c4497ca55640", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_where-where_04-2ee4397.stdout0000664000175000017500000005545115227365530024755 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { compare_solutions: (Function (SymbolTable 3 { absdiff: (Variable 3 absdiff [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reldiff: (Variable 3 reldiff [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compare_solutions (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solution] [] [(Assignment (Var 3 reldiff) (ArrayConstant 8 [0.00000000e+00, 0.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 3 absdiff) (RealConstant 0.500000 (Real 4) ) () .false. .false. ) (If () (RealCompare (FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () ) NotEq (RealConstant 0.000000 (Real 4) ) (Array (Logical 4) [(() ())] DescriptorArray ) () ) [(Assignment (Var 3 reldiff) (RealBinOp (ArrayBroadcast (Var 3 absdiff) (IntrinsicArrayFunction Shape [(IntrinsicElementalFunction Abs [(FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () )] 0 (Array (Real 4) [(() ())] DescriptorArray ) () )] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [(() ())] DescriptorArray ) () ) Div (IntrinsicElementalFunction Abs [(FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () )] 0 (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 3 reldiff) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 5.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 3 reldiff) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 5.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 3 reldiff)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), solution: (Function (SymbolTable 4 { x: (Variable 4 x [] ReturnVar () () Default (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solution (FunctionType [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 4 x) (ArrayConstant 8 [1.00000001e-01, 1.00000001e-01] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. )] (Var 4 x) Public .true. .true. () ) }) main [] [(SubroutineCall 2 compare_solutions () [] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-associate_07-a296ccb.stdout0000664000175000017500000003542315227365530024372 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { associate_07: (Program (SymbolTable 2 { p1: (Variable 2 p1 [] Local (PointerNullConstant (Pointer (Integer 4) ) () ) (PointerNullConstant (Pointer (Integer 4) ) () ) Save (Pointer (Integer 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p2: (Variable 2 p2 [] Local (PointerNullConstant (Pointer (Array (Real 8) [(() ()) (() ())] DescriptorArray ) ) () ) (PointerNullConstant (Pointer (Array (Real 8) [(() ()) (() ())] DescriptorArray ) ) () ) Save (Pointer (Array (Real 8) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p3: (Variable 2 p3 [] Local (PointerNullConstant (Pointer (Array (Complex 4) [(() ()) (() ())] DescriptorArray ) ) () ) (PointerNullConstant (Pointer (Array (Complex 4) [(() ()) (() ())] DescriptorArray ) ) () ) Save (Pointer (Array (Complex 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 2 t1 [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), t2: (Variable 2 t2 [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), t3: (Variable 2 t3 [] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) associate_07 [] [(Associate (Var 2 p1) (Var 2 t1) ) (Associate (Var 2 p2) (ArrayPhysicalCast (Var 2 t2) FixedSizeArray DescriptorArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] DescriptorArray ) () ) ) (If () (LogicalNot (PointerAssociated (Var 2 p1) () (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalNot (PointerAssociated (Var 2 p2) () (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalNot (PointerAssociated (Var 2 p1) (Var 2 t1) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalNot (PointerAssociated (Var 2 p2) (Var 2 t2) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (PointerAssociated (Var 2 p3) () (Logical 4) () ) [(ErrorStop () )] [] ) (If () (PointerAssociated (Var 2 p3) (Var 2 t3) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-type_casting_01-4e8a892.stderr0000664000175000017500000000035415227365530024731 0ustar alastairalastairsemantic error: Type mismatch in array initialization. Enable logical casting by setting `--logical-casting = true` --> tests/errors/type_casting_01.f90:3:5 | 3 | logical :: x(3) = [1, 1, 0] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/julia-arrays_04_func-2fc0cbe.json0000664000175000017500000000075515227365530024751 0ustar alastairalastair{ "basename": "julia-arrays_04_func-2fc0cbe", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/arrays_04_func.f90", "infile_hash": "50eb699e803e7dace8da286ee49cdb7381ebe3141bff17ca374f1f02", "outfile": null, "outfile_hash": null, "stdout": "julia-arrays_04_func-2fc0cbe.stdout", "stdout_hash": "1e1f59588204d803f78587c90afb9a66f5b9d495b06ab6209166984b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_50-7def206.json0000664000175000017500000000071515227365530023273 0ustar alastairalastair{ "basename": "run-format_50-7def206", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_50.f90", "infile_hash": "ced3f301a712574d64ae033d0ff783b3f28e4ca070ed93d0ebf669ec", "outfile": null, "outfile_hash": null, "stdout": "run-format_50-7def206.stdout", "stdout_hash": "709e50b018137e30ecbf20beeeb4837a1e7405fea3dc60e7960561d4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-error_stop_04-8f1e721.stderr0000664000175000017500000000001615227365530024444 0ustar alastairalastairERROR STOP hi lfortran-0.64.0/tests/reference/llvm-intrinsics_06-15c0eef.stdout0000664000175000017500000003135715227365530024771 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.5 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.6 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc16 = alloca %string_descriptor, align 8 %stringFormat_desc13 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %dp = alloca i32, align 4 store i32 8, i32* %dp, align 4 %x = alloca float, align 4 store float 0x3FEFFFFFE0000000, float* %x, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry store float 0x3FEFFFFFE0000000, float* %x, align 4 %14 = alloca i64, align 8 %15 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %14, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %16 = load i64, i64* %14, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %15, i8** %17, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %16, i64* %18, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %20 = load i8*, i8** %19, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %22 = load i64, i64* %21, align 8 %23 = trunc i64 %22 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %20, i32 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %24 = icmp eq i8* %15, null br i1 %24, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %15) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done store float 1.000000e+00, float* %x, align 4 %25 = alloca i64, align 8 %26 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %25, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %27 = load i64, i64* %25, align 8 %28 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %26, i8** %28, align 8 %29 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %27, i64* %29, align 8 %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %31 = load i8*, i8** %30, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %33 = load i64, i64* %32, align 8 %34 = trunc i64 %33 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %31, i32 %34, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %35 = icmp eq i8* %26, null br i1 %35, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %26) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 store float 1.000000e+00, float* %x, align 4 %36 = alloca i64, align 8 %37 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.3, i32 0, i32 0), i64* %36, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %38 = load i64, i64* %36, align 8 %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %37, i8** %39, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %38, i64* %40, align 8 %41 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %42 = load i8*, i8** %41, align 8 %43 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %44 = load i64, i64* %43, align 8 %45 = trunc i64 %44 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %42, i32 %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %46 = icmp eq i8* %37, null br i1 %46, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %free_done6 call void @_lfortran_free_alloc(i8* %2, i8* %37) br label %free_done9 free_done9: ; preds = %free_nonnull8, %free_done6 store float 1.000000e+00, float* %x, align 4 %47 = alloca i64, align 8 %48 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.4, i32 0, i32 0), i64* %47, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %49 = load i64, i64* %47, align 8 %50 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %48, i8** %50, align 8 %51 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %49, i64* %51, align 8 %52 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %53 = load i8*, i8** %52, align 8 %54 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %55 = load i64, i64* %54, align 8 %56 = trunc i64 %55 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %53, i32 %56, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %57 = icmp eq i8* %48, null br i1 %57, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %free_done9 call void @_lfortran_free_alloc(i8* %2, i8* %48) br label %free_done12 free_done12: ; preds = %free_nonnull11, %free_done9 store float 0x3FEFFFFFE0000000, float* %x, align 4 %58 = alloca i64, align 8 %59 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.5, i32 0, i32 0), i64* %58, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %60 = load i64, i64* %58, align 8 %61 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 store i8* %59, i8** %61, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 store i64 %60, i64* %62, align 8 %63 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 %64 = load i8*, i8** %63, align 8 %65 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 %66 = load i64, i64* %65, align 8 %67 = trunc i64 %66 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %64, i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %68 = icmp eq i8* %59, null br i1 %68, label %free_done15, label %free_nonnull14 free_nonnull14: ; preds = %free_done12 call void @_lfortran_free_alloc(i8* %2, i8* %59) br label %free_done15 free_done15: ; preds = %free_nonnull14, %free_done12 store float 1.000000e+00, float* %x, align 4 %69 = alloca i64, align 8 %70 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.6, i32 0, i32 0), i64* %69, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x) %71 = load i64, i64* %69, align 8 %72 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 store i8* %70, i8** %72, align 8 %73 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 store i64 %71, i64* %73, align 8 %74 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 %75 = load i8*, i8** %74, align 8 %76 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 %77 = load i64, i64* %76, align 8 %78 = trunc i64 %77 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %75, i32 %78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %79 = icmp eq i8* %70, null br i1 %79, label %free_done18, label %free_nonnull17 free_nonnull17: ; preds = %free_done15 call void @_lfortran_free_alloc(i8* %2, i8* %70) br label %free_done18 free_done18: ; preds = %free_nonnull17, %free_done15 br label %return return: ; preds = %free_done18 br label %FINALIZE_SYMTABLE_intrinsics_06 FINALIZE_SYMTABLE_intrinsics_06: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-associate_03-bc2b027.json0000664000175000017500000000075615227365530023726 0ustar alastairalastair{ "basename": "asr-associate_03-bc2b027", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/associate_03.f90", "infile_hash": "54a0fef1ee3727e70478189b60d108081d8e7760cadd89e8c99a8378", "outfile": null, "outfile_hash": null, "stdout": "asr-associate_03-bc2b027.stdout", "stdout_hash": "0c82c006019364fb4818c93d0abd8bfd78ff85095063e1acc1ddae11", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array1-cceb5f3.json0000664000175000017500000000070715227365530023017 0ustar alastairalastair{ "basename": "ast-array1-cceb5f3", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array1.f90", "infile_hash": "74ef23b0c6d49a710e5035ce53fa6899eb51ef5e5b693d15108744ca", "outfile": null, "outfile_hash": null, "stdout": "ast-array1-cceb5f3.stdout", "stdout_hash": "a9e4c3789a95cba14597a7b259d2e3edb7d8d63a7e22aad75e33e50f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor22-17078cd.json0000664000175000017500000000077315227365530026543 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor22-17078cd", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor22.f90", "infile_hash": "e389d649c7f9f50187334845e9058801aef996346232815c3a6a5304", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor22-17078cd.stdout", "stdout_hash": "59c0eb2534d3fe294ceb31c9d8eb3b993e640c1cc38c76b8ae061dca", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-doloop_08-cf3820d.stdout0000664000175000017500000000144615227365530023627 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { int32_t i; i = 1; while (true) { i = i + 1; if (i == 10) { break; } } if (i != 10) { std::cerr << "ERROR STOP" << std::endl; exit(1); } } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/ast_f90-complex_01-e4954b1.stdout0000664000175000017500000000040115227365530024370 0ustar alastairalastairprogram complex_01 implicit none complex :: x = (1.0, -3.0) real, parameter :: a = 3.0, b = 4.0 complex :: y = (a, b) complex, parameter :: i_ = (0, 1) complex :: z = a + i_*b complex :: w = a + b + i_*(a - b) print *, x, y, z, w end program complex_01 lfortran-0.64.0/tests/reference/pass_fma-fma-071ac0d.stdout0000664000175000017500000015014215227365530023562 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { _lcompilers_optimization_fma_f32: (Function (SymbolTable 3 { _lcompilers_optimization_fma_f32: (Variable 3 _lcompilers_optimization_fma_f32 [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 3 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_optimization_fma_f32 (FunctionType [(Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c)] [(Assignment (Var 3 _lcompilers_optimization_fma_f32) (RealBinOp (Var 3 a) Add (RealBinOp (Var 3 b) Mul (Var 3 c) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 3 _lcompilers_optimization_fma_f32) Public .false. .false. () ), _lcompilers_optimization_fma_f321: (Function (SymbolTable 4 { _lcompilers_optimization_fma_f321: (Variable 4 _lcompilers_optimization_fma_f321 [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 4 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_optimization_fma_f321 (FunctionType [(Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 a) (Var 4 b) (Var 4 c)] [(Assignment (Var 4 _lcompilers_optimization_fma_f321) (RealBinOp (Var 4 a) Add (RealBinOp (Var 4 b) Mul (Var 4 c) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 4 _lcompilers_optimization_fma_f321) Public .false. .false. () ), _lcompilers_optimization_fma_f322: (Function (SymbolTable 6 { _lcompilers_optimization_fma_f322: (Variable 6 _lcompilers_optimization_fma_f322 [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 6 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 6 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 6 c [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_optimization_fma_f322 (FunctionType [(Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 a) (Var 6 b) (Var 6 c)] [(Assignment (Var 6 _lcompilers_optimization_fma_f322) (RealBinOp (Var 6 a) Add (RealBinOp (Var 6 b) Mul (Var 6 c) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 6 _lcompilers_optimization_fma_f322) Public .false. .false. () ), _lcompilers_optimization_fma_f323: (Function (SymbolTable 7 { _lcompilers_optimization_fma_f323: (Variable 7 _lcompilers_optimization_fma_f323 [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 7 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 7 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 7 c [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_optimization_fma_f323 (FunctionType [(Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 a) (Var 7 b) (Var 7 c)] [(Assignment (Var 7 _lcompilers_optimization_fma_f323) (RealBinOp (Var 7 a) Add (RealBinOp (Var 7 b) Mul (Var 7 c) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 7 _lcompilers_optimization_fma_f323) Public .false. .false. () ), _lcompilers_optimization_fma_f64: (Function (SymbolTable 5 { _lcompilers_optimization_fma_f64: (Variable 5 _lcompilers_optimization_fma_f64 [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 5 a [] In () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 5 b [] In () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 5 c [] In () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_optimization_fma_f64 (FunctionType [(Real 8) (Real 8) (Real 8)] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 a) (Var 5 b) (Var 5 c)] [(Assignment (Var 5 _lcompilers_optimization_fma_f64) (RealBinOp (Var 5 a) Add (RealBinOp (Var 5 b) Mul (Var 5 c) (Real 8) () ) (Real 8) () ) () .false. .false. )] (Var 5 _lcompilers_optimization_fma_f64) Public .false. .false. () ), fma: (Program (SymbolTable 2 { b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pi: (Variable 2 pi [] Local (RealConstant 3.140000 (Real 4) ) (RealConstant 3.140000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 2 s1 [] Local (Cast (RealConstant 1.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 1.000000 (Real 8) ) () ) (RealConstant 1.000000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 2 s2 [] Local (Cast (RealConstant 2.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 2.000000 (Real 8) ) () ) (RealConstant 2.000000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (RealConstant 4.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local (Cast (RealConstant 1.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 1.000000 (Real 8) ) () ) (RealConstant 1.000000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fma [] [(Assignment (Var 2 x) (FunctionCall 1 _lcompilers_optimization_fma_f321 1 _lcompilers_optimization_fma_f321 [((FunctionCall 1 _lcompilers_optimization_fma_f32 1 _lcompilers_optimization_fma_f32 [((RealBinOp (Var 2 x) Mul (Cast (IntegerConstant 4 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 4.000000 (Real 4) ) () ) (Real 4) () )) ((RealConstant 0.500000 (Real 4) )) ((IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (Var 2 x)] 0 (Real 4) () ))] (Real 4) () () )) ((RealUnaryMinus (Var 2 x) (Real 4) () )) ((Var 2 pi))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 z) (FunctionCall 1 _lcompilers_optimization_fma_f64 1 _lcompilers_optimization_fma_f64 [((Var 2 s1)) ((Var 2 z)) ((Var 2 s2))] (Real 8) () () ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealConstant 3.940000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 z) Sub (Cast (RealConstant 3.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 3.000000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000001 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000001 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Assignment (Var 2 r) (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntrinsicElementalFunction Nint [(IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (FunctionCall 1 _lcompilers_optimization_fma_f322 1 _lcompilers_optimization_fma_f322 [((Var 2 r)) ((Var 2 r)) ((Var 2 r))] (Real 4) () () )] 0 (Real 4) () )] 0 (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Cast (FunctionCall 1 _lcompilers_optimization_fma_f323 1 _lcompilers_optimization_fma_f323 [((Var 2 r)) ((RealUnaryMinus (Var 2 r) (Real 4) () )) ((Var 2 r))] (Real 4) () () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/run-array14-c9f6829.stdout0000664000175000017500000000013215227365530023261 0ustar alastairalastair5.00000000 -1.00000000 3.00000000 4.00000000 2.00000000 5.00000000 -1.00000000 3.00000000 lfortran-0.64.0/tests/reference/asr-template_travel_02-4448a71.stdout0000664000175000017500000062035315227365530025367 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_travel_02: (Program (SymbolTable 26 { add_real: (ExternalSymbol 26 add_real 2 add_real template_travel_02_math [] add_real Public ), operations: (ExternalSymbol 26 operations 5 operations template_travel_02_travel [] operations Public ), slash_real: (ExternalSymbol 26 slash_real 2 slash_real template_travel_02_math [] slash_real Public ), test_template: (ExternalSymbol 26 test_template 23 test_template template_travel_02_m [] test_template Public ), travel_tmpl: (ExternalSymbol 26 travel_tmpl 5 travel_tmpl template_travel_02_travel [] travel_tmpl Public ), travel_tmpl2: (ExternalSymbol 26 travel_tmpl2 5 travel_tmpl2 template_travel_02_travel [] travel_tmpl2 Public ) }) template_travel_02 [template_travel_02_m template_travel_02_math template_travel_02_travel] [(SubroutineCall 26 test_template () [] () .false. )] ), template_travel_02_m: (Module (SymbolTable 23 { add_real: (ExternalSymbol 23 add_real 2 add_real template_travel_02_math [] add_real Public ), operations: (ExternalSymbol 23 operations 5 operations template_travel_02_travel [] operations Public ), slash_real: (ExternalSymbol 23 slash_real 2 slash_real template_travel_02_math [] slash_real Public ), test_template: (Function (SymbolTable 24 { __asr_avg_s_from_t: (Function (SymbolTable 27 { avg: (Variable 27 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 27 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 27 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 27 t1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 27 t2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr_avg_s_from_t (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 27 d1) (Var 27 t1) (Var 27 d2) (Var 27 t2)] [(Assignment (Var 27 avg) (FunctionCall 23 slash_real () [((FunctionCall 23 add_real () [((Var 27 d1)) ((Var 27 d2))] (Real 4) () () )) ((FunctionCall 23 add_real () [((Var 27 t1)) ((Var 27 t2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 27 avg) Public .true. .true. () ), avg_real_s_from_s: (Function (SymbolTable 25 { avg: (Variable 25 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 25 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 25 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 25 s1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 25 s2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_real_s_from_s (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [__asr_avg_s_from_t] [(Var 25 d1) (Var 25 s1) (Var 25 d2) (Var 25 s2)] [(Assignment (Var 25 avg) (FunctionCall 24 __asr_avg_s_from_t () [((Var 25 d1)) ((FunctionCall 23 slash_real () [((Var 25 d1)) ((Var 25 s1))] (Real 4) () () )) ((Var 25 d2)) ((FunctionCall 23 slash_real () [((Var 25 d2)) ((Var 25 s2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 25 avg) Private .true. .true. () ), s: (Variable 24 s [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 24 s) (FunctionCall 24 avg_real_s_from_s () [((RealConstant 1.100000 (Real 4) )) ((RealConstant 0.500000 (Real 4) )) ((RealConstant 2.000000 (Real 4) )) ((RealConstant 0.750000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "s=" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 24 s)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), travel_tmpl: (ExternalSymbol 23 travel_tmpl 5 travel_tmpl template_travel_02_travel [] travel_tmpl Public ), travel_tmpl2: (ExternalSymbol 23 travel_tmpl2 5 travel_tmpl2 template_travel_02_travel [] travel_tmpl2 Public ) }) template_travel_02_m () [template_travel_02_math template_travel_02_travel template_travel_02_m] .false. .false. .false. ), template_travel_02_math: (Module (SymbolTable 2 { add_real: (Function (SymbolTable 3 { total: (Variable 3 total [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 x) (Var 3 y)] [(Assignment (Var 3 total) (RealBinOp (Var 3 x) Add (Var 3 y) (Real 4) () ) () .false. .false. )] (Var 3 total) Public .true. .true. () ), slash_real: (Function (SymbolTable 4 { total: (Variable 4 total [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) slash_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 x) (Var 4 y)] [(Assignment (Var 4 total) (RealBinOp (Var 4 x) Div (Var 4 y) (Real 4) () ) () .false. .false. )] (Var 4 total) Public .true. .true. () ) }) template_travel_02_math () [] .false. .false. .false. ), template_travel_02_travel: (Module (SymbolTable 5 { add_real: (ExternalSymbol 5 add_real 2 add_real template_travel_02_math [] add_real Public ), operations: (Requirement (SymbolTable 6 { d: (Variable 6 d [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d_divided_by_s: (Function (SymbolTable 10 { d: (Variable 10 d [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 10 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 10 quotient [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_s (FunctionType [(TypeParameter d ) (TypeParameter s )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 10 n) (Var 10 d)] [] (Var 10 quotient) Private .true. .true. () ), d_divided_by_t: (Function (SymbolTable 9 { d: (Variable 9 d [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 9 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 9 quotient [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_t (FunctionType [(TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 9 n) (Var 9 d)] [] (Var 9 quotient) Private .true. .true. () ), plus_d: (Function (SymbolTable 7 { l: (Variable 7 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 7 r [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 7 total [] ReturnVar () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_d (FunctionType [(TypeParameter d ) (TypeParameter d )] (TypeParameter d ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 7 l) (Var 7 r)] [] (Var 7 total) Private .true. .true. () ), plus_t: (Function (SymbolTable 8 { l: (Variable 8 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 8 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 8 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 8 l) (Var 8 r)] [] (Var 8 total) Private .true. .true. () ), s: (Variable 6 s [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 6 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) operations [d t s plus_d plus_t d_divided_by_t d_divided_by_s] [] ), slash_real: (ExternalSymbol 5 slash_real 2 slash_real template_travel_02_math [] slash_real Public ), travel_tmpl: (Template (SymbolTable 11 { avg_s_from_s: (Function (SymbolTable 17 { avg: (Variable 17 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 17 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 17 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 17 s1 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 17 s2 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_s (FunctionType [(TypeParameter d ) (TypeParameter s ) (TypeParameter d ) (TypeParameter s )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [d_divided_by_s avg_s_from_t] [(Var 17 d1) (Var 17 s1) (Var 17 d2) (Var 17 s2)] [(Assignment (Var 17 avg) (FunctionCall 11 avg_s_from_t () [((Var 17 d1)) ((FunctionCall 11 d_divided_by_s () [((Var 17 d1)) ((Var 17 s1))] (TypeParameter t ) () () )) ((Var 17 d2)) ((FunctionCall 11 d_divided_by_s () [((Var 17 d2)) ((Var 17 s2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 17 avg) Private .true. .true. () ), avg_s_from_t: (Function (SymbolTable 16 { avg: (Variable 16 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 16 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 16 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 16 t1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 16 t2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_t (FunctionType [(TypeParameter d ) (TypeParameter t ) (TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus_d plus_t d_divided_by_t] [(Var 16 d1) (Var 16 t1) (Var 16 d2) (Var 16 t2)] [(Assignment (Var 16 avg) (FunctionCall 11 d_divided_by_t () [((FunctionCall 11 plus_d () [((Var 16 d1)) ((Var 16 d2))] (TypeParameter d ) () () )) ((FunctionCall 11 plus_t () [((Var 16 t1)) ((Var 16 t2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 16 avg) Public .true. .true. () ), d: (Variable 11 d [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d_divided_by_s: (Function (SymbolTable 15 { d: (Variable 15 d [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 15 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 15 quotient [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_s (FunctionType [(TypeParameter d ) (TypeParameter s )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 15 n) (Var 15 d)] [] (Var 15 quotient) Private .true. .true. () ), d_divided_by_t: (Function (SymbolTable 14 { d: (Variable 14 d [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 14 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 14 quotient [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_t (FunctionType [(TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 14 n) (Var 14 d)] [] (Var 14 quotient) Private .true. .true. () ), plus_d: (Function (SymbolTable 12 { l: (Variable 12 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 12 r [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 12 total [] ReturnVar () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_d (FunctionType [(TypeParameter d ) (TypeParameter d )] (TypeParameter d ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 12 l) (Var 12 r)] [] (Var 12 total) Private .true. .true. () ), plus_t: (Function (SymbolTable 13 { l: (Variable 13 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 13 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 13 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 13 l) (Var 13 r)] [] (Var 13 total) Private .true. .true. () ), s: (Variable 11 s [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 11 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) travel_tmpl [d t s plus_d plus_t d_divided_by_t d_divided_by_s] [(Require operations [d t s plus_d plus_t d_divided_by_t d_divided_by_s] )] ), travel_tmpl2: (Template (SymbolTable 18 { avg_s_from_s: (Function (SymbolTable 21 { avg: (Variable 21 avg [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 21 d1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 21 d2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 21 s1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 21 s2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_s (FunctionType [(TypeParameter t ) (TypeParameter t ) (TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [div avg_s_from_t] [(Var 21 d1) (Var 21 s1) (Var 21 d2) (Var 21 s2)] [(Assignment (Var 21 avg) (FunctionCall 18 avg_s_from_t () [((Var 21 d1)) ((FunctionCall 18 div () [((Var 21 d1)) ((Var 21 s1))] (TypeParameter t ) () () )) ((Var 21 d2)) ((FunctionCall 18 div () [((Var 21 d2)) ((Var 21 s2))] (TypeParameter t ) () () ))] (TypeParameter t ) () () ) () .false. .false. )] (Var 21 avg) Private .true. .true. () ), avg_s_from_t: (Function (SymbolTable 22 { avg: (Variable 22 avg [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 22 d1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 22 d2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 22 t1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 22 t2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_t (FunctionType [(TypeParameter t ) (TypeParameter t ) (TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus div] [(Var 22 d1) (Var 22 t1) (Var 22 d2) (Var 22 t2)] [(Assignment (Var 22 avg) (FunctionCall 18 div () [((FunctionCall 18 plus () [((Var 22 d1)) ((Var 22 d2))] (TypeParameter t ) () () )) ((FunctionCall 18 plus () [((Var 22 t1)) ((Var 22 t2))] (TypeParameter t ) () () ))] (TypeParameter t ) () () ) () .false. .false. )] (Var 22 avg) Public .true. .true. () ), div: (Function (SymbolTable 20 { d: (Variable 20 d [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 20 n [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 20 quotient [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 20 n) (Var 20 d)] [] (Var 20 quotient) Private .true. .true. () ), plus: (Function (SymbolTable 19 { l: (Variable 19 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 19 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 19 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 19 l) (Var 19 r)] [] (Var 19 total) Private .true. .true. () ), t: (Variable 18 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) travel_tmpl2 [t plus div] [(Require operations [t plus div] )] ) }) template_travel_02_travel () [template_travel_02_math template_travel_02_travel] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-dimension_02-2fc38c6.json0000664000175000017500000000074015227365530023745 0ustar alastairalastair{ "basename": "asr-dimension_02-2fc38c6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dimension_02.f90", "infile_hash": "6f2688e5aabb8713f42f87a3cf9595b44940f71cea7b5947673e1355", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dimension_02-2fc38c6.stderr", "stderr_hash": "36369436635af024d38553b91e78f35d990be0fc8f5fe0defdaf7d5a", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-program_03-374e848.json0000664000175000017500000000075315227365530023471 0ustar alastairalastair{ "basename": "llvm-program_03-374e848", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/program_03.f90", "infile_hash": "66e74edaf380b88bc4d65b0f35934f6857a8e67080628b16bd0e935a", "outfile": null, "outfile_hash": null, "stdout": "llvm-program_03-374e848.stdout", "stdout_hash": "e2d568e0f8a1cc19cdd5c43b3d2af449e27176f2ae13ace6d4618644", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-goto_04-2487215.stdout0000664000175000017500000003421115227365530023061 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { goto_04: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) goto_04 [] [(Assignment (Var 2 n) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 a) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (Select () (IntegerBinOp (Var 2 n) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) [(CaseStmt [(IntegerConstant 1 (Integer 4) Decimal)] [(GoTo 1 1 )] .false. ) (CaseStmt [(IntegerConstant 2 (Integer 4) Decimal)] [(GoTo 2 2 )] .false. ) (CaseStmt [(IntegerConstant 3 (Integer 4) Decimal)] [(GoTo 3 3 )] .false. )] [] .false. ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 1 1 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 2 2 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 20 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 3 3 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 30 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 a) NotEq (IntegerConstant 70 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Select () (IntegerBinOp (Var 2 n) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) [(CaseStmt [(IntegerConstant 1 (Integer 4) Decimal)] [(GoTo 4 4 )] .false. ) (CaseStmt [(IntegerConstant 2 (Integer 4) Decimal)] [(GoTo 5 5 )] .false. ) (CaseStmt [(IntegerConstant 3 (Integer 4) Decimal)] [(GoTo 6 6 )] .false. )] [] .false. ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 4 4 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 40 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 5 5 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 50 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 6 6 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 60 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 a) NotEq (IntegerConstant 130 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Select () (IntegerBinOp (Var 2 n) Mul (Var 2 n) (Integer 4) () ) [(CaseStmt [(IntegerConstant 1 (Integer 4) Decimal)] [(GoTo 7 7 )] .false. ) (CaseStmt [(IntegerConstant 2 (Integer 4) Decimal)] [(GoTo 8 8 )] .false. ) (CaseStmt [(IntegerConstant 3 (Integer 4) Decimal)] [(GoTo 9 9 )] .false. )] [] .false. ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 7 7 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 70 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 8 8 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 80 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (GoToTarget 9 9 ) (Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 90 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 a) NotEq (IntegerConstant 375 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-array8-f50328f.json0000664000175000017500000000072215227365530023264 0ustar alastairalastair{ "basename": "ast_f90-array8-f50328f", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/array8.f90", "infile_hash": "fee5e1c1b4525cfa5f4eb3102cbdfdb2959403009df4a8920e8d1347", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-array8-f50328f.stdout", "stdout_hash": "9dcbe3770b73ad4694a29832a42ae6f7afb5a9d740a1532d932ed0d8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-infer_mode_smoke_01-f9a09d6.json0000664000175000017500000000057415227365530025314 0ustar alastairalastair{ "basename": "run-infer_mode_smoke_01-f9a09d6", "cmd": "lfortran --no-color {infile}", "infile": "tests/infer_mode_smoke_01.f90", "infile_hash": "27f38709d506bc21c86a5e43a27e790423a9c88fe6f19eaaf8d6ebf4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-class_01-82031c0.json0000664000175000017500000000106515227365530023074 0ustar alastairalastair{ "basename": "llvm-class_01-82031c0", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/class_01.f90", "infile_hash": "d56b80167c24a798a3f70abbc77b31570b560e826ce6b96ab9476bab", "outfile": null, "outfile_hash": null, "stdout": "llvm-class_01-82031c0.stdout", "stdout_hash": "b78533f938453da6836df7277c749551768ce05840ff655f9197f4a9", "stderr": "llvm-class_01-82031c0.stderr", "stderr_hash": "83b7bc133c115994c08e9afc99edb6e1e19ce354b399bf4374f7b855", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit8-03c7a90.json0000664000175000017500000000072015227365530023267 0ustar alastairalastair{ "basename": "asr-implicit8-03c7a90", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/implicit8.f90", "infile_hash": "5ab8320f5bd93962cbba1babe7f4f17779af2d5575f625095988f4d8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit8-03c7a90.stderr", "stderr_hash": "6990d3cbec523ef3460ff0c8eeeb96a68cf69b77a943bd72383a7895", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_flip_sign-expr_13-e24d940.json0000664000175000017500000000100615227365530025064 0ustar alastairalastair{ "basename": "pass_flip_sign-expr_13-e24d940", "cmd": "lfortran --pass=flip_sign --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/expr_13.f90", "infile_hash": "2eaa9b9631c66ea28ea4dc4ede8f1a3717f4a929a68455837525f54f", "outfile": null, "outfile_hash": null, "stdout": "pass_flip_sign-expr_13-e24d940.stdout", "stdout_hash": "5d6ab7bda905ad76ae604e5dc5144ddb4b6c902a2d0111b4f23918b5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-global_scope2-181c327.stdout0000664000175000017500000000050515227365530024376 0ustar alastairalastair(TranslationUnit [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () ) (Assignment 0 x 6 () )] ) lfortran-0.64.0/tests/reference/ast_f90-block_data1-f3dfb1f.stdout0000664000175000017500000000054715227365530025016 0ustar alastairalastairblock data init implicit integer (a-z) common /range/ x0, x1 data x0, x1/1, 10/ end block data init program block_data1 implicit integer (a-z) common /range/ x0, x1 print *, "Printing Even number in the Range: ", x0, " to ", x1 do i = x0, x1 if (mod(i, 2) /= 0) then cycle end if write(*, *) i end do end program block_data1 lfortran-0.64.0/tests/reference/llvm-return_06-ec98b0b.stdout0000664000175000017500000000123215227365530024114 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) br label %return unreachable_after_return: ; No predecessors! br label %return return: ; preds = %unreachable_after_return, %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-string_11-0e4b62c.stdout0000664000175000017500000001325015227365530023626 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { string_11: (Program (SymbolTable 2 { mystring: (Variable 2 mystring [] Local () () Default (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), teststring: (Variable 2 teststring [] Local () () Default (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_11 [] [(Assignment (Var 2 mystring) (StringConstant "This is a test" (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 teststring) (StringConstant "test" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (If () (IntegerCompare (IntrinsicElementalFunction SubstrIndex [(Var 2 mystring) (Var 2 teststring) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) () ) Eq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Print (StringConstant "test is not found" (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringFormat () [(StringConstant "test is found at index: " (String 1 (IntegerConstant 24 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (IntrinsicElementalFunction SubstrIndex [(Var 2 mystring) (Var 2 teststring) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-do2-1ec601e.json0000664000175000017500000000101015227365530022122 0ustar alastairalastair{ "basename": "ast-do2-1ec601e", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do2.f90", "infile_hash": "7f47b6b127565d836c9d83019e001f2160489c3d1243f1de7e93af71", "outfile": null, "outfile_hash": null, "stdout": "ast-do2-1ec601e.stdout", "stdout_hash": "0ab41435499b9bf55305b0895a7d74b7c79771cd7279d2868fdef093", "stderr": "ast-do2-1ec601e.stderr", "stderr_hash": "058e62ed95ffbe797f06eaf8d52e4ae850f39e6e94112c2895a35bdf", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_06-821cc56.json0000664000175000017500000000072315227365530023352 0ustar alastairalastair{ "basename": "asr-modules_06-821cc56", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/modules_06.f90", "infile_hash": "7699c2084686f687c1681ea9d088f613f3530b48449a37df5fc1cdce", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_06-821cc56.stdout", "stdout_hash": "3d270ec06d4eac157011cab8697189999231693f64007351b4778682", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_goto_select-6cc9882.stdout0000664000175000017500000000277015227365530026500 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(k [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(m [] [] () () None ()) (n [] [] () () None ())] () )] [(Assignment 0 k 1 () ) (Print 100 () [(String "hello" ())] () ) (Assignment 200 k (+ k 1) () ) (Assignment 0 m 1 () ) (Assignment 0 n 2 () ) (GoTo 0 () m [200 100] () ) (GoTo 0 () n [100 200] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-implicit_typing4-df7d614.json0000664000175000017500000000077615227365530024761 0ustar alastairalastair{ "basename": "asr-implicit_typing4-df7d614", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/errors/implicit_typing4.f90", "infile_hash": "21dfe09305df396a4254e7b1f818acbac4b158b5731a58805794efda", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_typing4-df7d614.stderr", "stderr_hash": "0e5bf83cfac5959bd16ca0216ed0f276a9f0a153dbe877e08c0a04c9", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-redeclaration1-b66ed3a.json0000664000175000017500000000074615227365530024436 0ustar alastairalastair{ "basename": "asr-redeclaration1-b66ed3a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/redeclaration1.f90", "infile_hash": "4d6cab928e80a2d41ed8e5b4f018b5bd36eab2f6e7bf9572486280b2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-redeclaration1-b66ed3a.stderr", "stderr_hash": "9065758617b52d0d612d6fb388037f17558d47874fc3409dbbf2c574", "returncode": 2 }lfortran-0.64.0/tests/reference/ast_f90-array6-d640983.json0000664000175000017500000000072215227365530023206 0ustar alastairalastair{ "basename": "ast_f90-array6-d640983", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/array6.f90", "infile_hash": "bd74956aa588e4b340d6de16fc0b67a51fbf31518393a6cb4e7d2901", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-array6-d640983.stdout", "stdout_hash": "84af996e58fc5ed590391ba06cd18f3d867424266b05f8b182b31dbf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-program_cmake_01-a9e6179.stdout0000664000175000017500000000113415227365530025064 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { testfortran: (Program (SymbolTable 2 { }) testfortran [] [(Print (StringConstant "Hello" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_do_loops-doloop_04-749d5f0.json0000664000175000017500000000101115227365530025251 0ustar alastairalastair{ "basename": "pass_do_loops-doloop_04-749d5f0", "cmd": "lfortran --pass=do_loops --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_04.f90", "infile_hash": "d2027c560ba8546e31b7627200b8fb28695617c3238a8f1a086c62ef", "outfile": null, "outfile_hash": null, "stdout": "pass_do_loops-doloop_04-749d5f0.stdout", "stdout_hash": "e6b06250c79ba62ae0b65383b0267af7b959fe32c19a8bb629511e26", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-arrays_08_func-ec93f58.stderr0000664000175000017500000000032315227365530025160 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/arrays_08_func.f90:29:27 | 29 | r = r .and. (a(i) .eq. b(i)) | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/pass_global_stmts-expr6-a926072.stdout0000664000175000017500000000716315227365530025671 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f2: (Variable 2 f2 [] ReturnVar () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Real 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f2) (RealConstant 5.300000 (Real 4) ) () .false. .false. )] (Var 2 f2) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-program_03-fbe20e8.json0000664000175000017500000000075015227365530023506 0ustar alastairalastair{ "basename": "asr-program_03-fbe20e8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/program_03.f90", "infile_hash": "66e74edaf380b88bc4d65b0f35934f6857a8e67080628b16bd0e935a", "outfile": null, "outfile_hash": null, "stdout": "asr-program_03-fbe20e8.stdout", "stdout_hash": "d74bd140965afceda4a21003dbd80ff6b3c2ee7098bb3167e0d2e814", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-module_struct_global_separate_compilation_01-043bc7f.stdout0000664000175000017500000000153715227365530033207 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %module_struct_global_separate_compilation_01.t.3 = type { i32 } @__module_module_struct_global_separate_compilation_01_targets = global %module_struct_global_separate_compilation_01.t.3 zeroinitializer define void @__module_module_struct_global_separate_compilation_01_set_targets(i32* %v) { .entry: %0 = load i32, i32* %v, align 4 store i32 %0, i32* getelementptr inbounds (%module_struct_global_separate_compilation_01.t.3, %module_struct_global_separate_compilation_01.t.3* @__module_module_struct_global_separate_compilation_01_targets, i32 0, i32 0), align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_set_targets FINALIZE_SYMTABLE_set_targets: ; preds = %return ret void } lfortran-0.64.0/tests/reference/tokens-subroutine1-c249ad5.stdout0000664000175000017500000000206015227365530025020 0ustar alastairalastair(KEYWORD "subroutine") (TOKEN "identifier" g) (TOKEN "(") (TOKEN ")") (NEWLINE) (KEYWORD "integer") (TOKEN "::") (TOKEN "identifier" x) (TOKEN ",") (TOKEN "identifier" i) (NEWLINE) (TOKEN "identifier" x) (TOKEN "=") (TOKEN "integer" 1) (NEWLINE) (KEYWORD "do") (TOKEN "identifier" i) (TOKEN "=") (TOKEN "integer" 1) (TOKEN ",") (TOKEN "integer" 10) (NEWLINE) (TOKEN "identifier" x) (TOKEN "=") (TOKEN "identifier" x) (TOKEN "*") (TOKEN "identifier" i) (NEWLINE) (KEYWORD "end do") (NEWLINE) (KEYWORD "end subroutine") (NEWLINE) (NEWLINE) (KEYWORD "subroutine") (TOKEN "identifier" h) (TOKEN "(") (TOKEN ")") (NEWLINE) (KEYWORD "integer") (TOKEN "::") (TOKEN "identifier" x) (TOKEN ",") (TOKEN "identifier" i) (NEWLINE) (TOKEN "identifier" x) (TOKEN "=") (TOKEN "integer" 1) (NEWLINE) (KEYWORD "do") (TOKEN "identifier" i) (TOKEN "=") (TOKEN "integer" 1) (TOKEN ",") (TOKEN "integer" 10) (NEWLINE) (TOKEN "identifier" x) (TOKEN "=") (TOKEN "identifier" i) (TOKEN "*") (TOKEN "identifier" x) (NEWLINE) (KEYWORD "end do") (NEWLINE) (KEYWORD "end subroutine") (NEWLINE) (EOF) lfortran-0.64.0/tests/reference/wat-doloop_02-1ee6409.stdout0000664000175000017500000002314615227365530023557 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 i32 i32 i32 i32 i32) i32.const 0 local.set 5 i32.const 1 local.set 2 i32.const 10 local.set 3 local.get 3 local.set 0 local.get 2 i32.const 1 i32.sub local.set 4 loop local.get 4 i32.const 1 i32.add local.get 0 i32.le_s if local.get 4 i32.const 1 i32.add local.set 4 local.get 5 local.get 4 i32.add local.set 5 br 1 else end end local.get 5 i32.const 55 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 5 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 2 i32.const 1 i32.const 1 i32.sub local.set 4 loop local.get 4 i32.const 1 i32.add i32.const 10 i32.le_s if local.get 4 i32.const 1 i32.add local.set 4 i32.const 1 i32.const 1 i32.sub local.set 5 loop local.get 5 i32.const 1 i32.add i32.const 10 i32.le_s if local.get 5 i32.const 1 i32.add local.set 5 local.get 2 local.get 4 i32.const 1 i32.sub i32.const 10 i32.mul i32.add local.get 5 i32.add local.set 2 br 1 else end end br 1 else end end local.get 2 i32.const 5050 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 2 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 2 i32.const 1 i32.const 1 i32.sub local.set 4 loop local.get 4 i32.const 1 i32.add i32.const 10 i32.le_s if local.get 4 i32.const 1 i32.add local.set 4 local.get 4 local.set 1 i32.const 1 i32.const 1 i32.sub local.set 5 loop local.get 5 i32.const 1 i32.add local.get 1 i32.le_s if local.get 5 i32.const 1 i32.add local.set 5 local.get 2 local.get 5 i32.add local.set 2 br 1 else end end br 1 else end end local.get 2 i32.const 220 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 2 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") (data (;34;) (i32.const 208) "\d8\00\00\00\0b\00\00\00") (data (;35;) (i32.const 216) "ERROR STOP\n ") ) lfortran-0.64.0/tests/reference/llvm-types_05-aa71aa9.json0000664000175000017500000000074515227365530023367 0ustar alastairalastair{ "basename": "llvm-types_05-aa71aa9", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/types_05.f90", "infile_hash": "96f8e950abafbc42b9d0438efdca0a8355bb2bd7b4b168ee23063521", "outfile": null, "outfile_hash": null, "stdout": "llvm-types_05-aa71aa9.stdout", "stdout_hash": "88800bf784cd5c190b3c83236fffc5a988dc0f14237515a48b5caa08", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope7-d6ec187.json0000664000175000017500000000101415227365530027130 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope7-d6ec187", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope7.f90", "infile_hash": "b3d005db52f7a57b335928fc6d884d6fdee0654c64fc98c2e797e242", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope7-d6ec187.stdout", "stdout_hash": "97b2e00f239c2debf57a5b035a007ce757be71017595c20e4646b1fa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allow_implicit_interface-68156ec.stdout0000664000175000017500000006464715227365530027023 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { prho: (Function (SymbolTable 2 { alnorm: (Function (SymbolTable 4 { alnorm_arg_0: (Variable 4 alnorm_arg_0 [] Unspecified () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), alnorm_arg_1: (Variable 4 alnorm_arg_1 [] Unspecified () () Default (Logical 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), alnorm_return_var_name: (Variable 4 alnorm_return_var_name [] ReturnVar () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) alnorm (FunctionType [(Real 8) (Logical 4)] (Real 4) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 alnorm_arg_0) (Var 4 alnorm_arg_1)] [] (Var 4 alnorm_return_var_name) Public .false. .false. () ), b: (Variable 2 b [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dgetrf: (Function (SymbolTable 5 { dgetrf_arg_0: (Variable 5 dgetrf_arg_0 [] Unspecified () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dgetrf_arg_1: (Variable 5 dgetrf_arg_1 [] Unspecified () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dgetrf_arg_2: (Variable 5 dgetrf_arg_2 [] Unspecified () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dgetrf (FunctionType [(Real 8) (Real 8) (Real 8)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 dgetrf_arg_0) (Var 5 dgetrf_arg_1) (Var 5 dgetrf_arg_2)] [] () Public .false. .false. () ), one: (Variable 2 one [] Local (RealConstant 1.000000 (Real 8) ) (RealConstant 1.000000 (Real 8) ) Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prho: (Variable 2 prho [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), six: (Variable 2 six [] Local (RealConstant 6.000000 (Real 8) ) (RealConstant 6.000000 (Real 8) ) Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), two: (Variable 2 two [] Local (RealConstant 2.000000 (Real 8) ) (RealConstant 2.000000 (Real 8) ) Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zero: (Variable 2 zero [] Local (RealConstant 0.000000 (Real 8) ) (RealConstant 0.000000 (Real 8) ) Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) prho (FunctionType [] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 zero) (RealConstant 0.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 one) (RealConstant 1.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 two) (RealConstant 2.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 six) (RealConstant 6.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 prho) (RealBinOp (RealBinOp (Var 2 u) Div (IntrinsicElementalFunction Exp [(RealBinOp (Var 2 y) Div (Var 2 two) (Real 8) () )] 0 (Real 8) () ) (Real 8) () ) Add (Cast (FunctionCall 2 alnorm () [((Var 2 x)) ((LogicalConstant .true. (Logical 4) ))] (Real 4) () () ) RealToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (SubroutineCall 2 dgetrf () [((Var 2 x)) ((Var 2 y)) ((Var 2 u))] () .false. ) (If () (RealCompare (Var 2 prho) Lt (Var 2 zero) (Logical 4) () ) [(Assignment (Var 2 prho) (Var 2 zero) () .false. .false. )] [] ) (If () (RealCompare (Var 2 prho) Gt (Var 2 one) (Logical 4) () ) [(Assignment (Var 2 prho) (Var 2 one) () .false. .false. )] [] ) (Return)] (Var 2 prho) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/tokens-expr8-00c1054.json0000664000175000017500000000071515227365530023063 0ustar alastairalastair{ "basename": "tokens-expr8-00c1054", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/expr8.f90", "infile_hash": "b0f7cfaa460c9319f7cc7b0fa470fbbce940f7f4eef3156b55897b51", "outfile": null, "outfile_hash": null, "stdout": "tokens-expr8-00c1054.stdout", "stdout_hash": "f7ec05a11cafd75b4ddbbe0cbb606e0da8c6cec70baad1b3647519f7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-types_14-79df2e1.json0000664000175000017500000000074215227365530023134 0ustar alastairalastair{ "basename": "asr-types_14-79df2e1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_14.f90", "infile_hash": "604dcedee00d3b6bd830fb4ca72cbd189f2daab1b1f19dd82cf8ccc0", "outfile": null, "outfile_hash": null, "stdout": "asr-types_14-79df2e1.stdout", "stdout_hash": "11cdf3867281463c436066eb9ca7126a3603407db2c3fa7ad80bc8de", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-block1-f4e17ad.stdout0000664000175000017500000000103115227365530023732 0ustar alastairalastairprogram block1 implicit integer (a-z) integer :: B ! TODO: Fix this test case block ! use mod, only: example ! import, none ! !import, only: B B = 10 print *, B if (B == 10) then print *, "pass" end if end block end program block1 ! The variable B is implicitly declared in the scoping unit of the main program. ! The statement IMPORT, NONE makes B inaccessible in the BLOCK construct. ! If the IMPORT, NONE statement is replaced with the IMPORT statement in the ! comment, the program is conformant. lfortran-0.64.0/tests/reference/pass_nested_vars-nested_external_dedup_01-94a5d6b.json0000664000175000017500000000107715227365530031106 0ustar alastairalastair{ "basename": "pass_nested_vars-nested_external_dedup_01-94a5d6b", "cmd": "lfortran --pass=nested_vars --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_external_dedup_01.f90", "infile_hash": "2aab29c92da224e4546714887b85dfa6883b7ba509705159b438bf9a", "outfile": null, "outfile_hash": null, "stdout": "pass_nested_vars-nested_external_dedup_01-94a5d6b.stdout", "stdout_hash": "4402a246ba4fd2b7c6b1b75889d98edf279781f3b441be6a44710b93", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_cmake_02-d8d8f4d.stderr0000664000175000017500000000040315227365530025206 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/program_cmake_02.f90:4:49 | 4 | integer stop ; stop = 1 ; do while ( stop .eq. 0 ) ; end do | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/ast-common1-abbc59b.stdout0000664000175000017500000001204415227365530023534 0ustar alastairalastair(TranslationUnit [(Program common1 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Implicit [(ImplicitSpec (AttrType TypeReal [] () () None ) [(LetterSpec a z )] )] () )] [(Declaration (AttrType TypeReal [] () () None ) [] [(A [] [] () () None ()) (B [] [] () () None ())] () ) (Declaration () [(AttrCommon [(sample [(A [] [] () A None ()) (B [] [] () B None ())])] )] [] () ) (Declaration () [(AttrCommon [(c [(c [] [] () c None ())]) (b [(d [] [] () d None ()) (e [] [] () e None ()) (f [] [] () f None ())]) (c [(g [] [] () g None ()) (h [] [] () h None ()) (i [(1 5 DimensionExpr)] [] () (FuncCallOrArray i [] [(() 5 () 0)] [] [] [] ) None ())])] )] [] () ) (Declaration () [(AttrCommon [(() [(x [] [] () x None ()) (y [] [] () y None ()) (z [(1 10 DimensionExpr)] [] () (FuncCallOrArray z [] [(() 10 () 0)] [] [] [] ) None ())])] )] [] () )] [(Assignment 0 A 10 () ) (Assignment 0 B 20 () ) (SubroutineCall 0 pass [] [] [] [] () ) (Stop 0 () () () )] [] ) (Subroutine pass [] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [] [(A [] [] () () None ()) (B [] [] () () None ())] () ) (Declaration () [(AttrCommon [(sample [(A [] [] () A None ()) (B [] [] () B None ())])] )] [] () )] [(Print 0 () [A B] () ) (Return 0 () () )] [] [] )] ) lfortran-0.64.0/tests/reference/run-scalar_allocation_check_05-e3b524c.stderr0000664000175000017500000000025115227365530027131 0ustar alastairalastairruntime error: Argument 1 is unallocated. --> tests/errors/scalar_allocation_check_05.f90:10:14 | 10 | print *, m1%x | ^^^^ This is unallocated lfortran-0.64.0/tests/reference/ast-fixed_form_implicit1-5bea864.json0000664000175000017500000000077415227365530025565 0ustar alastairalastair{ "basename": "ast-fixed_form_implicit1-5bea864", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_implicit1.f", "infile_hash": "23368f2fe6f6771c71559e99af7296e68d793e5df5a6a69aa6c39f62", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form_implicit1-5bea864.stdout", "stdout_hash": "9f2a92545fa9fef0e728a5105db787511732b5dfd0e291a9c7d1ec5e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_09-2af35ec.json0000664000175000017500000000076115227365530024231 0ustar alastairalastair{ "basename": "asr-intrinsics_09-2af35ec", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_09.f90", "infile_hash": "12c64a66c84a553de209e2227f56e1da90f0ce7e51cef682cb608cea", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_09-2af35ec.stdout", "stdout_hash": "b2d6dc65c87902fe09db47f6e6ee61a72b37afcaf5ab7b63cf0d8298", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_transfer_01-3dca715.json0000664000175000017500000000075715227365530025002 0ustar alastairalastair{ "basename": "asr-array_transfer_01-3dca715", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_transfer_01.f90", "infile_hash": "98bc1c8f86b6df52afdc9b504d783677d18ac3c8df19a7f37745108e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_transfer_01-3dca715.stderr", "stderr_hash": "c9c6004b1c3700fc8c09a34a02aa902bc57cd47fe9164257e54395db", "returncode": 2 }lfortran-0.64.0/tests/reference/wat-types_01-c4e1000.stdout0000664000175000017500000000542715227365530023407 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local f32) f32.const 1.000000 local.set 0 f32.const 1.500000 local.set 0 f32.const 1.000000 local.set 0 f32.const 2.000000 local.set 0 f32.const 3.000000 local.set 0 i32.const 0 call 0 return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/llvm-implicit_interface_04-9b6786e.stdout0000664000175000017500000010656515227365530026322 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [4 x i8] c"arr\00", align 1 @3 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @4 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @5 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1 @11 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @12 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @13 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @16 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1 @17 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @18 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @19 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @21 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @22 = private unnamed_addr constant [5 x i8] c"arr1\00", align 1 @23 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @24 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @25 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @26 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @27 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @main.b = internal global [3 x i32] zeroinitializer @main.n = internal global i32 3 @28 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @29 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @30 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @31 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @32 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @33 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @34 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @35 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @36 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @37 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @38 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @39 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @40 = private unnamed_addr constant [7 x i8] c"driver\00", align 1 @41 = private unnamed_addr constant [53 x i8] c"tests/../integration_tests/implicit_interface_04.f90\00", align 1 @42 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @43 = private unnamed_addr constant [143 x i8] c"Runtime error: Array shape mismatch in subroutine '%s'\0A\0ATried to match size %d of dimension %d of argument number %d, but expected size is %d\0A\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__1_k = alloca i32, align 4 store i32 1, i32* %__1_k, align 4 %3 = load i32, i32* %__1_k, align 4 %4 = sext i32 %3 to i64 %5 = sub i64 %4, 1 %6 = mul i64 1, %5 %7 = add i64 0, %6 %8 = icmp slt i64 %4, 1 %9 = icmp sgt i64 %4, 3 %10 = or i1 %8, %9 br i1 %10, label %then, label %ifcont then: ; preds = %.entry %11 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %12 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %13 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %12, i32 0, i32 0 %14 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @29, i32 0, i32 0), i8** %14, align 8 %15 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 1 store i32 3, i32* %15, align 4 %16 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 2 store i32 12, i32* %16, align 4 %17 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 3 store i32 3, i32* %17, align 4 %18 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 4 store i32 30, i32* %18, align 4 %19 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @30, i32 0, i32 0)) %20 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %11, i32 0, i32 0 %21 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %12, i32 0, i32 0 %22 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 2 %23 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 0 store i1 true, i1* %23, align 1 %24 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 1 store i8* %19, i8** %24, align 8 store { i8*, i32, i32, i32, i32 }* %21, { i8*, i32, i32, i32, i32 }** %22, align 8 %25 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 3 store i32 1, i32* %25, align 4 %26 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %11, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %26, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @31, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0), i64 %4, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont: ; preds = %.entry %27 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i64 %7 store i32 10, i32* %27, align 4 store i32 2, i32* %__1_k, align 4 %28 = load i32, i32* %__1_k, align 4 %29 = sext i32 %28 to i64 %30 = sub i64 %29, 1 %31 = mul i64 1, %30 %32 = add i64 0, %31 %33 = icmp slt i64 %29, 1 %34 = icmp sgt i64 %29, 3 %35 = or i1 %33, %34 br i1 %35, label %then1, label %ifcont2 then1: ; preds = %ifcont %36 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %37 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %38 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %37, i32 0, i32 0 %39 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %38, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @33, i32 0, i32 0), i8** %39, align 8 %40 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %38, i32 0, i32 1 store i32 3, i32* %40, align 4 %41 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %38, i32 0, i32 2 store i32 12, i32* %41, align 4 %42 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %38, i32 0, i32 3 store i32 3, i32* %42, align 4 %43 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %38, i32 0, i32 4 store i32 30, i32* %43, align 4 %44 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @34, i32 0, i32 0)) %45 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %36, i32 0, i32 0 %46 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %37, i32 0, i32 0 %47 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %45, i32 0, i32 2 %48 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %45, i32 0, i32 0 store i1 true, i1* %48, align 1 %49 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %45, i32 0, i32 1 store i8* %44, i8** %49, align 8 store { i8*, i32, i32, i32, i32 }* %46, { i8*, i32, i32, i32, i32 }** %47, align 8 %50 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %45, i32 0, i32 3 store i32 1, i32* %50, align 4 %51 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %36, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %51, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @35, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @32, i32 0, i32 0), i64 %29, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont2: ; preds = %ifcont %52 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i64 %32 store i32 20, i32* %52, align 4 store i32 3, i32* %__1_k, align 4 %53 = load i32, i32* %__1_k, align 4 %54 = sext i32 %53 to i64 %55 = sub i64 %54, 1 %56 = mul i64 1, %55 %57 = add i64 0, %56 %58 = icmp slt i64 %54, 1 %59 = icmp sgt i64 %54, 3 %60 = or i1 %58, %59 br i1 %60, label %then3, label %ifcont4 then3: ; preds = %ifcont2 %61 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %62 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %63 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %62, i32 0, i32 0 %64 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %63, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @37, i32 0, i32 0), i8** %64, align 8 %65 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %63, i32 0, i32 1 store i32 3, i32* %65, align 4 %66 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %63, i32 0, i32 2 store i32 12, i32* %66, align 4 %67 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %63, i32 0, i32 3 store i32 3, i32* %67, align 4 %68 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %63, i32 0, i32 4 store i32 30, i32* %68, align 4 %69 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @38, i32 0, i32 0)) %70 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %61, i32 0, i32 0 %71 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %62, i32 0, i32 0 %72 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %70, i32 0, i32 2 %73 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %70, i32 0, i32 0 store i1 true, i1* %73, align 1 %74 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %70, i32 0, i32 1 store i8* %69, i8** %74, align 8 store { i8*, i32, i32, i32, i32 }* %71, { i8*, i32, i32, i32, i32 }** %72, align 8 %75 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %70, i32 0, i32 3 store i32 1, i32* %75, align 4 %76 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %61, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %76, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @39, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @36, i32 0, i32 0), i64 %54, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont4: ; preds = %ifcont2 %77 = getelementptr [3 x i32], [3 x i32]* @main.b, i32 0, i64 %57 store i32 30, i32* %77, align 4 %78 = load i32, i32* @main.n, align 4 %79 = icmp slt i32 3, %78 br i1 %79, label %then5, label %ifcont6 then5: ; preds = %ifcont4 %80 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %81 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %82 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %81, i32 0, i32 0 %83 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %82, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @41, i32 0, i32 0), i8** %83, align 8 %84 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %82, i32 0, i32 1 store i32 6, i32* %84, align 4 %85 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %82, i32 0, i32 2 store i32 39, i32* %85, align 4 %86 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %82, i32 0, i32 3 store i32 6, i32* %86, align 4 %87 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %82, i32 0, i32 4 store i32 39, i32* %87, align 4 %88 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @42, i32 0, i32 0)) %89 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %80, i32 0, i32 0 %90 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %81, i32 0, i32 0 %91 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 0, i32 2 %92 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 0, i32 0 store i1 true, i1* %92, align 1 %93 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 0, i32 1 store i8* %88, i8** %93, align 8 store { i8*, i32, i32, i32, i32 }* %90, { i8*, i32, i32, i32, i32 }** %91, align 8 %94 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 0, i32 3 store i32 1, i32* %94, align 4 %95 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %80, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %95, i32 1, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @43, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @40, i32 0, i32 0), i32 3, i32 1, i32 2, i32 %78) call void @exit(i32 1) unreachable ifcont6: ; preds = %ifcont4 call void @driver(void (i32*, i32*, i32*)* @implicit_interface_check, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.b, i32 0, i32 0), i32* @main.n) br label %return return: ; preds = %ifcont6 br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } define void @driver(void (i32*, i32*, i32*)* %fnc, i32* %arr, i32* %m) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = alloca float, align 4 store float 1.000000e+00, float* %2, align 4 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, float* %2) %4 = load i64, i64* %1, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry %13 = load i32, i32* %m, align 4 %14 = sext i32 %13 to i64 %15 = add i64 1, %14 %16 = sub i64 %15, 1 %17 = icmp sgt i64 3, %16 %18 = or i1 false, %17 br i1 %18, label %then, label %ifcont then: ; preds = %free_done %19 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %20 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %21 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %20, i32 0, i32 0 %22 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @3, i32 0, i32 0), i8** %22, align 8 %23 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 1 store i32 13, i32* %23, align 4 %24 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 2 store i32 18, i32* %24, align 4 %25 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 3 store i32 13, i32* %25, align 4 %26 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 4 store i32 23, i32* %26, align 4 %27 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @4, i32 0, i32 0)) %28 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %19, i32 0, i32 0 %29 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %20, i32 0, i32 0 %30 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 2 %31 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 0 store i1 true, i1* %31, align 1 %32 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 1 store i8* %27, i8** %32, align 8 store { i8*, i32, i32, i32, i32 }* %29, { i8*, i32, i32, i32, i32 }** %30, align 8 %33 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 3 store i32 1, i32* %33, align 4 %34 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %19, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %34, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @2, i32 0, i32 0), i64 3, i32 1, i64 1, i64 %16) call void @exit(i32 1) unreachable ifcont: ; preds = %free_done %35 = mul i64 1, %14 %36 = getelementptr inbounds i32, i32* %arr, i64 2 call void %fnc(i32* %arr, i32* %m, i32* %36) br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_driver FINALIZE_SYMTABLE_driver: ; preds = %return ret void } declare void @fnc(i32*, i32*, i32*) define void @implicit_interface_check(i32* %arr1, i32* %m, i32* %c) { .entry: %0 = call i8* @_lfortran_get_default_allocator() %1 = load i32, i32* %m, align 4 %2 = icmp ne i32 %1, 3 br i1 %2, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %3 = load i32, i32* %c, align 4 %4 = icmp ne i32 %3, 30 br i1 %4, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %5 = load i32, i32* %m, align 4 %6 = sext i32 %5 to i64 %7 = add i64 1, %6 %8 = sub i64 %7, 1 %9 = icmp sgt i64 1, %8 %10 = or i1 false, %9 br i1 %10, label %then4, label %ifcont5 then4: ; preds = %ifcont3 %11 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %12 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %13 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %12, i32 0, i32 0 %14 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @11, i32 0, i32 0), i8** %14, align 8 %15 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 1 store i32 20, i32* %15, align 4 %16 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 2 store i32 5, i32* %16, align 4 %17 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 3 store i32 20, i32* %17, align 4 %18 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %13, i32 0, i32 4 store i32 11, i32* %18, align 4 %19 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @12, i32 0, i32 0)) %20 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %11, i32 0, i32 0 %21 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %12, i32 0, i32 0 %22 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 2 %23 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 0 store i1 true, i1* %23, align 1 %24 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 1 store i8* %19, i8** %24, align 8 store { i8*, i32, i32, i32, i32 }* %21, { i8*, i32, i32, i32, i32 }** %22, align 8 %25 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %20, i32 0, i32 3 store i32 1, i32* %25, align 4 %26 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %11, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %26, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @10, i32 0, i32 0), i64 1, i32 1, i64 1, i64 %8) call void @exit(i32 1) unreachable ifcont5: ; preds = %ifcont3 %27 = mul i64 1, %6 %28 = getelementptr inbounds i32, i32* %arr1, i64 0 %29 = load i32, i32* %28, align 4 %30 = icmp ne i32 %29, 10 br i1 %30, label %then6, label %else7 then6: ; preds = %ifcont5 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont8 else7: ; preds = %ifcont5 br label %ifcont8 ifcont8: ; preds = %else7, %then6 %31 = load i32, i32* %m, align 4 %32 = sext i32 %31 to i64 %33 = add i64 1, %32 %34 = sub i64 %33, 1 %35 = icmp sgt i64 2, %34 %36 = or i1 false, %35 br i1 %36, label %then9, label %ifcont10 then9: ; preds = %ifcont8 %37 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %38 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %39 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %38, i32 0, i32 0 %40 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @17, i32 0, i32 0), i8** %40, align 8 %41 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 1 store i32 21, i32* %41, align 4 %42 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 2 store i32 5, i32* %42, align 4 %43 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 3 store i32 21, i32* %43, align 4 %44 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 4 store i32 11, i32* %44, align 4 %45 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @18, i32 0, i32 0)) %46 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %37, i32 0, i32 0 %47 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %38, i32 0, i32 0 %48 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 2 %49 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 0 store i1 true, i1* %49, align 1 %50 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 1 store i8* %45, i8** %50, align 8 store { i8*, i32, i32, i32, i32 }* %47, { i8*, i32, i32, i32, i32 }** %48, align 8 %51 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 3 store i32 1, i32* %51, align 4 %52 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %37, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %52, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @16, i32 0, i32 0), i64 2, i32 1, i64 1, i64 %34) call void @exit(i32 1) unreachable ifcont10: ; preds = %ifcont8 %53 = mul i64 1, %32 %54 = getelementptr inbounds i32, i32* %arr1, i64 1 %55 = load i32, i32* %54, align 4 %56 = icmp ne i32 %55, 20 br i1 %56, label %then11, label %else12 then11: ; preds = %ifcont10 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont13 else12: ; preds = %ifcont10 br label %ifcont13 ifcont13: ; preds = %else12, %then11 %57 = load i32, i32* %m, align 4 %58 = sext i32 %57 to i64 %59 = add i64 1, %58 %60 = sub i64 %59, 1 %61 = icmp sgt i64 3, %60 %62 = or i1 false, %61 br i1 %62, label %then14, label %ifcont15 then14: ; preds = %ifcont13 %63 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %64 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %65 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %64, i32 0, i32 0 %66 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %65, i32 0, i32 0 store i8* getelementptr inbounds ([53 x i8], [53 x i8]* @23, i32 0, i32 0), i8** %66, align 8 %67 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %65, i32 0, i32 1 store i32 22, i32* %67, align 4 %68 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %65, i32 0, i32 2 store i32 5, i32* %68, align 4 %69 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %65, i32 0, i32 3 store i32 22, i32* %69, align 4 %70 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %65, i32 0, i32 4 store i32 11, i32* %70, align 4 %71 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @24, i32 0, i32 0)) %72 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %63, i32 0, i32 0 %73 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %64, i32 0, i32 0 %74 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %72, i32 0, i32 2 %75 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %72, i32 0, i32 0 store i1 true, i1* %75, align 1 %76 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %72, i32 0, i32 1 store i8* %71, i8** %76, align 8 store { i8*, i32, i32, i32, i32 }* %73, { i8*, i32, i32, i32, i32 }** %74, align 8 %77 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %72, i32 0, i32 3 store i32 1, i32* %77, align 4 %78 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %63, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %78, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @22, i32 0, i32 0), i64 3, i32 1, i64 1, i64 %60) call void @exit(i32 1) unreachable ifcont15: ; preds = %ifcont13 %79 = mul i64 1, %58 %80 = getelementptr inbounds i32, i32* %arr1, i64 2 %81 = load i32, i32* %80, align 4 %82 = icmp ne i32 %81, 30 br i1 %82, label %then16, label %else17 then16: ; preds = %ifcont15 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @26, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont18 else17: ; preds = %ifcont15 br label %ifcont18 ifcont18: ; preds = %else17, %then16 br label %return return: ; preds = %ifcont18 br label %FINALIZE_SYMTABLE_implicit_interface_check FINALIZE_SYMTABLE_implicit_interface_check: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @_lpython_call_initial_functions(i32, i8**) lfortran-0.64.0/tests/reference/asr-modules_44-ec0baa3.stdout0000664000175000017500000005605515227365530024141 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_44: (Program (SymbolTable 9 { cmd_new: (ExternalSymbol 9 cmd_new 2 cmd_new modules_44_fpm_cmd_new [] cmd_new Public ), fpm_cmd_settings: (ExternalSymbol 9 fpm_cmd_settings 2 fpm_cmd_settings modules_44_fpm_cmd_new [] fpm_cmd_settings Public ), fpm_new_settings: (ExternalSymbol 9 fpm_new_settings 2 fpm_new_settings modules_44_fpm_cmd_new [] fpm_new_settings Public ), settings: (Variable 9 settings [] Local () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 9 fpm_new_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), warnwrite: (ExternalSymbol 9 warnwrite 4 warnwrite modules_44_module_fpm_filesystem [] warnwrite Public ) }) modules_44 [modules_44_fpm_cmd_new modules_44_module_fpm_filesystem] [(SubroutineCall 9 cmd_new () [((Var 9 settings))] () .false. )] ), modules_44_fpm_cmd_new: (Module (SymbolTable 2 { cmd_new: (Function (SymbolTable 8 { 1_fpm_new_settings_name: (ExternalSymbol 8 1_fpm_new_settings_name 7 name modules_44_fpm_cmd_new [fpm_new_settings] name Public ), littlefile: (Variable 8 littlefile [] Local () () Default (Allocatable (Array (String 1 () DeferredLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), settings: (Variable 8 settings [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 fpm_new_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cmd_new (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 settings)] [(Assignment (Var 8 littlefile) (ArrayConstant 160 ["# ", "My cool new project! "] (Array (String 1 (IntegerConstant 80 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] PointerArray ) ColMajor ) () .false. .false. ) (SubroutineCall 2 warnwrite () [((StructInstanceMember (Var 8 settings) 8 1_fpm_new_settings_name (Allocatable (String 1 () DeferredLength DescriptorString) ) () )) ((Var 8 littlefile))] () .false. )] () Public .true. .true. () ), fpm_cmd_settings: (Struct (SymbolTable 6 { working_dir: (Variable 6 working_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_cmd_settings (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [working_dir] [] Source Public .false. .true. .false. [] () () [] ), fpm_new_settings: (Struct (SymbolTable 7 { name: (Variable 7 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_new_settings (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name] [] Source Public .false. .false. .false. [] () 2 fpm_cmd_settings [] ), warnwrite: (ExternalSymbol 2 warnwrite 4 warnwrite modules_44_module_fpm_filesystem [] warnwrite Public ) }) modules_44_fpm_cmd_new () [modules_44_module_fpm_filesystem] .false. .false. .false. ), modules_44_module_fpm_filesystem: (Module (SymbolTable 4 { warnwrite: (Function (SymbolTable 5 { data: (Variable 5 data [] In () () Default (Array (String 1 () AssumedLength DescriptorString) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fname: (Variable 5 fname [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) warnwrite (FunctionType [(String 1 () AssumedLength DescriptorString) (Array (String 1 () AssumedLength DescriptorString) [(() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 fname) (Var 5 data)] [] () Public .true. .true. () ) }) modules_44_module_fpm_filesystem () [] .true. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_20-4b5a0e4.json0000664000175000017500000000074515227365530023254 0ustar alastairalastair{ "basename": "asr-arrays_20-4b5a0e4", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_20.f90", "infile_hash": "9b510b477f3e38a2dd4c07f275793e897a598f8252fcfa0870a55899", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_20-4b5a0e4.stdout", "stdout_hash": "8623c4a2666838f54141f4f9480f4148d5bb4c3878338cb170a709a5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-matrix_matmul_04-90da47c.stderr0000664000175000017500000000030515227365530025171 0ustar alastairalastairsemantic error: `matmul` accepts arrays of rank 1 or 2 only, provided an array with rank, 3 --> tests/errors/matrix_matmul_04.f90:5:21 | 5 | print *, matmul(a, b) | ^ lfortran-0.64.0/tests/reference/ast-where_01-cc363a1.json0000664000175000017500000000074215227365530023062 0ustar alastairalastair{ "basename": "ast-where_01-cc363a1", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_01.f90", "infile_hash": "b3e2251e4cd263f14db0266759a9af716dce48521dcd2f1e6eadce17", "outfile": null, "outfile_hash": null, "stdout": "ast-where_01-cc363a1.stdout", "stdout_hash": "eebceb97b9c4cc54625f9f2e2cebfba97056a8ecb0e41dae5f35ae3e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-struct_allocate-606e066.json0000664000175000017500000000076715227365530024516 0ustar alastairalastair{ "basename": "asr-struct_allocate-606e066", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/struct_allocate.f90", "infile_hash": "8f826ffcc557e1f998f9fb99e619bed6aa68bc3f5e45768ad8fa12a9", "outfile": null, "outfile_hash": null, "stdout": "asr-struct_allocate-606e066.stdout", "stdout_hash": "81a148bafd1b5e9c49841e3a6a57589290ed13f18da233d48cef121d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-fixed_form_implicit_check-94844d9.json0000664000175000017500000000106215227365530026501 0ustar alastairalastair{ "basename": "asr-fixed_form_implicit_check-94844d9", "cmd": "lfortran --fixed-form --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_implicit_check.f", "infile_hash": "4913776655a2aab98265358375f290eedb9b92a2ef7424536067345c", "outfile": null, "outfile_hash": null, "stdout": "asr-fixed_form_implicit_check-94844d9.stdout", "stdout_hash": "f5db4bb18322b5946f9b1b07708d5aa93abb8f40b7505b8050412bed", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incompatible_dimension_assignment_arr1-28b49c0.json0000664000175000017500000000105615227365530031265 0ustar alastairalastair{ "basename": "asr-incompatible_dimension_assignment_arr1-28b49c0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incompatible_dimension_assignment_arr1.f90", "infile_hash": "daa395a32105f0f71dbd4c9d998fc201815d8af3bfc7999db517fa80", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incompatible_dimension_assignment_arr1-28b49c0.stderr", "stderr_hash": "490c2fa77a6d816d9cd7d8956aa9dde9d389f043b860bb92ddffa64d", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope1-f174531.json0000664000175000017500000000101415227365530026753 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope1-f174531", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope1.f90", "infile_hash": "449b38487b6c79754deedb9991f1867bcf8c67d0d93019c2fe15854c", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope1-f174531.stdout", "stdout_hash": "b98d270e083dcf1a5b2059dd09b9da5d6d3075663ac8b44f25c98402", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-block_data1-33d76d9.json0000664000175000017500000000075415227365530023557 0ustar alastairalastair{ "basename": "ast-block_data1-33d76d9", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/block_data1.f", "infile_hash": "75a23d4519eec459620a61996f68ddb43af0b44cb2fb1a34861528f0", "outfile": null, "outfile_hash": null, "stdout": "ast-block_data1-33d76d9.stdout", "stdout_hash": "fa6fc46628f6fbca3fed9e33648c5c116898e59d1be2698a8d5ab91f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-interface_01-b750ffe.json0000664000175000017500000000077115227365530024463 0ustar alastairalastair{ "basename": "ast_f90-interface_01-b750ffe", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/interface_01.f90", "infile_hash": "56828a66265782f7acd20520a5d25ac6246d6d44dfb8fa758507ed63", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-interface_01-b750ffe.stdout", "stdout_hash": "4d0222747e3813824dcd952e71a74279b38a6a0c576406f624e11190", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-interface_01-587eedf.json0000664000175000017500000000075615227365530024021 0ustar alastairalastair{ "basename": "ast-interface_01-587eedf", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/interface_01.f90", "infile_hash": "56828a66265782f7acd20520a5d25ac6246d6d44dfb8fa758507ed63", "outfile": null, "outfile_hash": null, "stdout": "ast-interface_01-587eedf.stdout", "stdout_hash": "2ffc8cf3e1c71c2bdd5857a3526d2e43d601c1633c0de8678ba7a5ed", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-string_03-7320626.stdout0000664000175000017500000002741515227365530023423 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { string_03: (Program (SymbolTable 3 { combined: (Variable 3 combined [] Local () () Default (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), intro: (ExternalSymbol 3 intro 2 intro string_03_mod [] intro Public ), last_name: (Variable 3 last_name [] Local () () Default (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), posit: (Variable 3 posit [] Local () () Default (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), title: (Variable 3 title [] Local () () Default (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), verb: (Variable 3 verb [] Local () () Default (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_03 [string_03_mod] [(Assignment (Var 3 verb) (StringConstant "learned " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 3 posit) (StringConstant "from " (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 3 title) (StringConstant "the " (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 3 last_name) (StringConstant "best" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 3 combined) (IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(Var 3 intro) (Var 3 verb)] 0 (String 1 (IntegerConstant 13 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) (Var 3 posit)] 0 (String 1 (IntegerConstant 18 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) (Var 3 title)] 0 (String 1 (IntegerConstant 22 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) (Var 3 last_name)] 0 (String 1 (IntegerConstant 29 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) (StringConstant "." (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] 0 (String 1 (IntegerConstant 30 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) () .false. .false. ) (Print (Var 3 combined) )] ), string_03_mod: (Module (SymbolTable 2 { intro: (Variable 2 intro [] Local (StringConstant "I've " (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "I've " (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_03_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-sole_intrinsic-3e826bd.json0000664000175000017500000000075215227365530024505 0ustar alastairalastair{ "basename": "asr-sole_intrinsic-3e826bd", "cmd": "lfortran --fixed-form --show-asr --no-color {infile} -o {outfile}", "infile": "tests/sole_intrinsic.f", "infile_hash": "eb8dafc3736c80b83b7cc0b62cbe2fce5882fac022c391b7514607ea", "outfile": null, "outfile_hash": null, "stdout": "asr-sole_intrinsic-3e826bd.stdout", "stdout_hash": "3a168777a5f7e179f3f5557fd6e2555628a064ea2bdeca4203d23b29", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kind_var_of_int-1199f59.stderr0000664000175000017500000000026015227365530025012 0ustar alastairalastairsemantic error: Parameter 'a' is a variable, which does not reduce to a constant expression --> tests/errors/kind_var_of_int.f90:4:10 | 4 | real(a) :: x | ^ lfortran-0.64.0/tests/reference/asr-save_03-1103dd0.json0000664000175000017500000000073715227365530022623 0ustar alastairalastair{ "basename": "asr-save_03-1103dd0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/save_03.f90", "infile_hash": "cf1d7642d08ac82732ef50230fcd5c6a2efe507a49d1bab6d5fc4d18", "outfile": null, "outfile_hash": null, "stdout": "asr-save_03-1103dd0.stdout", "stdout_hash": "a576161a34d6d2a53c779037a24da64164201b2e796617e174c1ce61", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit11-95f56fd.json0000664000175000017500000000106615227365530023447 0ustar alastairalastair{ "basename": "asr-implicit11-95f56fd", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit11.f90", "infile_hash": "b6ee32da95ff9a5b2be776f4ad79d4d7f0e0c5360d106273583e2a78", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit11-95f56fd.stdout", "stdout_hash": "0edeaf6ee4b822e1b7ea9798ed232643fa675cb04d9b40cb39a300ec", "stderr": "asr-implicit11-95f56fd.stderr", "stderr_hash": "09a57b521bb707f6d839d4a343a1d55910508436649b6c66115d3c15", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-assign_01-2cf003f.json0000664000175000017500000000074715227365530023237 0ustar alastairalastair{ "basename": "asr-assign_01-2cf003f", "cmd": "lfortran --semantics-only --continue-compilation --no-color {infile}", "infile": "tests/errors/assign_01.f90", "infile_hash": "b3907bfc11ab4a5400099590f3d20715a7fed312e26241facae934fb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-assign_01-2cf003f.stderr", "stderr_hash": "22926a0ca854e3a26213cee88788e52c189e7e6d275089ff0cdc971c", "returncode": 1 }lfortran-0.64.0/tests/reference/julia-expr_11-ab53b8f.stderr0000664000175000017500000000024215227365530023660 0ustar alastairalastairstyle suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/expr_11.f90:3:5 | 3 | real*8 x | ^^^^^^ help: write this as 'real(8)' lfortran-0.64.0/tests/reference/pass_inline_function_calls-functions_08-49d8a27.json0000664000175000017500000000110015227365530030513 0ustar alastairalastair{ "basename": "pass_inline_function_calls-functions_08-49d8a27", "cmd": "lfortran --pass=inline_function_calls --show-asr --no-color --fast {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_08.f90", "infile_hash": "625582953de25dfa6d54c1e44d22b6e19394212ca99c252ca13236e2", "outfile": null, "outfile_hash": null, "stdout": "pass_inline_function_calls-functions_08-49d8a27.stdout", "stdout_hash": "67e58a4c00c3109d6995cda9943ec4c1cd5426861456b2a3d7104192", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-case_03-436c4e5.json0000664000175000017500000000075215227365530023276 0ustar alastairalastair{ "basename": "ast_f90-case_03-436c4e5", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/case_03.f90", "infile_hash": "4fc1bb48b2136f22bb44b7c69aaa05a43b4ed2e4b8464c433340295d", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-case_03-436c4e5.stdout", "stdout_hash": "e3af8a21921e8d450ecd592961b7ca7e412454698b1ddbcbb34c3800", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character_parameter_padding_trimming-ea91653.json0000664000175000017500000000121415227365530030763 0ustar alastairalastair{ "basename": "asr-character_parameter_padding_trimming-ea91653", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/character_parameter_padding_trimming.f90", "infile_hash": "3ac17fa68feb60423eaa66ebbb88a3e18da1a72d0c7e8ed8ac8de022", "outfile": null, "outfile_hash": null, "stdout": "asr-character_parameter_padding_trimming-ea91653.stdout", "stdout_hash": "47960920ae021fcb072bc14d2ea210fc23a19874b50afc88737cc96c", "stderr": "asr-character_parameter_padding_trimming-ea91653.stderr", "stderr_hash": "dd1d526423717b4be7522ae77a4f0054f4ceee382d37bbf977ca3d2b", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_03-54c2520.stdout0000664000175000017500000001366315227365530023640 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { access_vars: (Module (SymbolTable 2 { print_vars: (Function (SymbolTable 3 { }) print_vars (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(StringConstant "priv = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 priv)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "publ = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 publ)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), priv: (Variable 2 priv [] Local (RealConstant 1.500000 (Real 4) ) (RealConstant 1.500000 (Real 4) ) Save (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), publ: (Variable 2 publ [] Local (RealConstant 2.500000 (Real 4) ) (RealConstant 2.500000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) access_vars () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/wat-types_04-054550e.stdout0000664000175000017500000001020515227365530023333 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 f32 f32) f32.const 1.500000 local.set 1 i32.const 2 local.set 0 local.get 0 local.get 0 i32.mul f32.convert_i32_s local.set 2 local.get 1 local.get 1 f32.mul local.set 2 local.get 0 f32.convert_i32_s local.get 1 f32.mul local.set 2 local.get 1 local.get 0 f32.convert_i32_s f32.mul local.set 2 local.get 0 local.get 0 i32.add f32.convert_i32_s local.set 2 local.get 1 local.get 1 f32.add local.set 2 local.get 1 local.get 0 f32.convert_i32_s f32.add local.set 2 local.get 0 f32.convert_i32_s local.get 1 f32.add local.set 2 local.get 0 local.get 0 i32.sub f32.convert_i32_s local.set 2 local.get 1 local.get 1 f32.sub local.set 2 local.get 1 local.get 0 f32.convert_i32_s f32.sub local.set 2 local.get 0 f32.convert_i32_s local.get 1 f32.sub local.set 2 local.get 0 local.get 0 i32.div_s f32.convert_i32_s local.set 2 local.get 1 local.get 1 f32.div local.set 2 local.get 0 f32.convert_i32_s local.get 1 f32.div local.set 2 local.get 1 local.get 0 f32.convert_i32_s f32.div local.set 2 i32.const 0 call 0 return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/ast_f90-program_01-4418962.json0000664000175000017500000000076315227365530023676 0ustar alastairalastair{ "basename": "ast_f90-program_01-4418962", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/program_01.f90", "infile_hash": "917ed02637c7a6c4e5e5407a0ccf45b4ef6ff79355c5c080e53d97e9", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-program_01-4418962.stdout", "stdout_hash": "1767245198713f882b2140749109ed41af157da8e1982e95a1868f6a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit8-03c7a90.stderr0000664000175000017500000000033215227365530023620 0ustar alastairalastairsemantic error: m, n is/are used as dimensions but not declared --> tests/implicit8.f90:1:1 - 6:12 | 1 | integer function a(n,m) | ^^^^^^^^^^^^^^^^^^^^^^^... ... | 6 | end function | ...^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-template_05-fe28e11.stdout0000664000175000017500000103036515227365530024153 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_05: (Program (SymbolTable 16 { integer_minus: (Function (SymbolTable 27 { r: (Variable 27 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 27 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 27 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) integer_minus (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~sub_intrinsic] [(Var 27 x) (Var 27 y)] [(Assignment (Var 27 r) (FunctionCall 16 ~sub_intrinsic () [((Var 27 x)) ((Var 27 y))] (Integer 4) () () ) () .false. .false. )] (Var 27 r) Public .true. .true. () ), integer_plus: (Function (SymbolTable 18 { r: (Variable 18 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 18 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 18 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) integer_plus (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~add_intrinsic] [(Var 18 x) (Var 18 y)] [(Assignment (Var 18 r) (FunctionCall 16 ~add_intrinsic () [((Var 18 x)) ((Var 18 y))] (Integer 4) () () ) () .false. .false. )] (Var 18 r) Public .true. .true. () ), integer_tmp_minus: (Template (SymbolTable 19 { g_minus: (Function (SymbolTable 20 { r: (Variable 20 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 20 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 20 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g_minus (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [minus] [(Var 20 x) (Var 20 y)] [(Assignment (Var 20 r) (FunctionCall 19 minus () [((Var 20 x)) ((Var 20 y))] (Integer 4) () () ) () .false. .false. )] (Var 20 r) Public .true. .true. () ), minus: (Function (SymbolTable 21 { r: (Variable 21 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 21 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 21 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 21 x) (Var 21 y)] [] (Var 21 r) Public .true. .true. () ), t: (Variable 19 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_mult: (Template (SymbolTable 22 { mult: (Function (SymbolTable 23 { r: (Variable 23 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 23 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 23 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mult (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 23 x) (Var 23 y)] [] (Var 23 r) Public .true. .true. () ), t: (Variable 22 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_div: (Template (SymbolTable 24 { div: (Function (SymbolTable 25 { r: (Variable 25 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 25 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 25 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 25 x) (Var 25 y)] [] (Var 25 r) Public .true. .true. () ), t: (Variable 24 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tmp_div [div] [(Require req [t div] )] ) }) tmp_mult [mult] [(Require req [t mult] )] ) }) integer_tmp_minus [minus] [(Require req [t minus] ) (Require req [t plus] )] ), integer_tmp_mult: (Template (SymbolTable 28 { mult: (Function (SymbolTable 29 { r: (Variable 29 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 29 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 29 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mult (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 29 x) (Var 29 y)] [] (Var 29 r) Public .true. .true. () ), t: (Variable 28 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_div: (Template (SymbolTable 30 { div: (Function (SymbolTable 31 { r: (Variable 31 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 31 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 31 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 31 x) (Var 31 y)] [] (Var 31 r) Public .true. .true. () ), t: (Variable 30 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tmp_div [div] [(Require req [t div] )] ) }) integer_tmp_mult [mult] [(Require req [t mult] )] ), real_minus: (Function (SymbolTable 42 { r: (Variable 42 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 42 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 42 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) real_minus (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~sub_intrinsic1] [(Var 42 x) (Var 42 y)] [(Assignment (Var 42 r) (FunctionCall 16 ~sub_intrinsic1 () [((Var 42 x)) ((Var 42 y))] (Real 4) () () ) () .false. .false. )] (Var 42 r) Public .true. .true. () ), real_plus: (Function (SymbolTable 33 { r: (Variable 33 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 33 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 33 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) real_plus (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~add_intrinsic1] [(Var 33 x) (Var 33 y)] [(Assignment (Var 33 r) (FunctionCall 16 ~add_intrinsic1 () [((Var 33 x)) ((Var 33 y))] (Real 4) () () ) () .false. .false. )] (Var 33 r) Public .true. .true. () ), real_tmp_minus: (Template (SymbolTable 34 { g_minus: (Function (SymbolTable 35 { r: (Variable 35 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 35 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 35 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g_minus (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [minus] [(Var 35 x) (Var 35 y)] [(Assignment (Var 35 r) (FunctionCall 34 minus () [((Var 35 x)) ((Var 35 y))] (Real 4) () () ) () .false. .false. )] (Var 35 r) Public .true. .true. () ), minus: (Function (SymbolTable 36 { r: (Variable 36 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 36 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 36 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 36 x) (Var 36 y)] [] (Var 36 r) Public .true. .true. () ), t: (Variable 34 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_mult: (Template (SymbolTable 37 { mult: (Function (SymbolTable 38 { r: (Variable 38 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 38 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 38 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mult (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 38 x) (Var 38 y)] [] (Var 38 r) Public .true. .true. () ), t: (Variable 37 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_div: (Template (SymbolTable 39 { div: (Function (SymbolTable 40 { r: (Variable 40 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 40 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 40 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 40 x) (Var 40 y)] [] (Var 40 r) Public .true. .true. () ), t: (Variable 39 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tmp_div [div] [(Require req [t div] )] ) }) tmp_mult [mult] [(Require req [t mult] )] ) }) real_tmp_minus [minus] [(Require req [t minus] ) (Require req [t plus] )] ), real_tmp_mult: (Template (SymbolTable 43 { mult: (Function (SymbolTable 44 { r: (Variable 44 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 44 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 44 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mult (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 44 x) (Var 44 y)] [] (Var 44 r) Public .true. .true. () ), t: (Variable 43 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_div: (Template (SymbolTable 45 { div: (Function (SymbolTable 46 { r: (Variable 46 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 46 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 46 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 46 x) (Var 46 y)] [] (Var 46 r) Public .true. .true. () ), t: (Variable 45 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tmp_div [div] [(Require req [t div] )] ) }) real_tmp_mult [mult] [(Require req [t mult] )] ), req: (ExternalSymbol 16 req 2 req template_05_m [] req Public ), tmp: (ExternalSymbol 16 tmp 2 tmp template_05_m [] tmp Public ), ~add: (CustomOperator 16 ~add [16 ~add_intrinsic 16 ~add_intrinsic1] Public ), ~add_intrinsic: (Function (SymbolTable 17 { arg0: (Variable 17 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 17 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 17 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 17 arg0) (Var 17 arg1)] [(Assignment (Var 17 ret) (IntegerBinOp (Var 17 arg0) Add (Var 17 arg1) (Integer 4) () ) () .false. .false. )] (Var 17 ret) Public .true. .true. () ), ~add_intrinsic1: (Function (SymbolTable 32 { arg0: (Variable 32 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 32 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 32 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic1 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 32 arg0) (Var 32 arg1)] [(Assignment (Var 32 ret) (RealBinOp (Var 32 arg0) Add (Var 32 arg1) (Real 4) () ) () .false. .false. )] (Var 32 ret) Public .true. .true. () ), ~sub: (CustomOperator 16 ~sub [16 ~sub_intrinsic 16 ~sub_intrinsic1] Public ), ~sub_intrinsic: (Function (SymbolTable 26 { arg0: (Variable 26 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 26 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 26 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~sub_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 26 arg0) (Var 26 arg1)] [(Assignment (Var 26 ret) (IntegerBinOp (Var 26 arg0) Sub (Var 26 arg1) (Integer 4) () ) () .false. .false. )] (Var 26 ret) Public .true. .true. () ), ~sub_intrinsic1: (Function (SymbolTable 41 { arg0: (Variable 41 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 41 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 41 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~sub_intrinsic1 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 41 arg0) (Var 41 arg1)] [(Assignment (Var 41 ret) (RealBinOp (Var 41 arg0) Sub (Var 41 arg1) (Real 4) () ) () .false. .false. )] (Var 41 ret) Public .true. .true. () ) }) template_05 [template_05_m] [] ), template_05_m: (Module (SymbolTable 2 { req: (Requirement (SymbolTable 3 { op: (Function (SymbolTable 4 { r: (Variable 4 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) op (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 4 x) (Var 4 y)] [] (Var 4 r) Public .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) req [t op] [] ), tmp: (Template (SymbolTable 5 { g_plus: (Function (SymbolTable 15 { r: (Variable 15 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 15 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 15 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g_plus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [plus] [(Var 15 x) (Var 15 y)] [(Assignment (Var 15 r) (FunctionCall 5 plus () [((Var 15 x)) ((Var 15 y))] (TypeParameter t ) () () ) () .false. .false. )] (Var 15 r) Public .true. .true. () ), plus: (Function (SymbolTable 6 { r: (Variable 6 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 6 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 6 x) (Var 6 y)] [] (Var 6 r) Public .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_minus: (Template (SymbolTable 7 { g_minus: (Function (SymbolTable 14 { r: (Variable 14 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 14 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 14 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g_minus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [minus] [(Var 14 x) (Var 14 y)] [(Assignment (Var 14 r) (FunctionCall 7 minus () [((Var 14 x)) ((Var 14 y))] (TypeParameter t ) () () ) () .false. .false. )] (Var 14 r) Public .true. .true. () ), minus: (Function (SymbolTable 8 { r: (Variable 8 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 8 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 8 x) (Var 8 y)] [] (Var 8 r) Public .true. .true. () ), plus: (Function (SymbolTable 9 { r: (Variable 9 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 9 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 9 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 9 x) (Var 9 y)] [] (Var 9 r) Public .true. .true. () ), t: (Variable 7 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_mult: (Template (SymbolTable 10 { mult: (Function (SymbolTable 11 { r: (Variable 11 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 11 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 11 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mult (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 11 x) (Var 11 y)] [] (Var 11 r) Public .true. .true. () ), t: (Variable 10 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp_div: (Template (SymbolTable 12 { div: (Function (SymbolTable 13 { r: (Variable 13 r [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 13 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 13 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) div (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .false. .false. .false. .false. [] .true. ) [] [(Var 13 x) (Var 13 y)] [] (Var 13 r) Public .true. .true. () ), t: (Variable 12 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tmp_div [div] [(Require req [t div] )] ) }) tmp_mult [mult] [(Require req [t mult] )] ) }) tmp_minus [minus] [(Require req [t minus] ) (Require req [t plus] )] ) }) tmp [t plus] [(Require req [t plus] )] ) }) template_05_m () [template_05_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-string_14-861794e.stdout0000664000175000017500000007063715227365530023527 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { string_14: (Program (SymbolTable 6 { }) string_14 [] [] ), string_14_stdlib_string_type: (Module (SymbolTable 2 { read_formatted: (Function (SymbolTable 5 { iomsg: (Variable 5 iomsg [] InOut () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iostat: (Variable 5 iostat [] Out () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iotype: (Variable 5 iotype [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), line: (Variable 5 line [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 5 string [] InOut () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 5 unit [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v_list: (Variable 5 v_list [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) read_formatted (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Integer 4) (String 1 () AssumedLength DescriptorString) (Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 string) (Var 5 unit) (Var 5 iotype) (Var 5 v_list) (Var 5 iostat) (Var 5 iomsg)] [] () Public .true. .true. () ), string_type: (Struct (SymbolTable 3 { raw: (Variable 3 raw [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_type (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [raw] [] Source Private .false. .false. .true. [] () () [] ), write_formatted: (Function (SymbolTable 4 { iomsg: (Variable 4 iomsg [] InOut () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iostat: (Variable 4 iostat [] Out () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iotype: (Variable 4 iotype [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 4 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 4 unit [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v_list: (Variable 4 v_list [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) write_formatted (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Integer 4) (String 1 () AssumedLength DescriptorString) (Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 string) (Var 4 unit) (Var 4 iotype) (Var 4 v_list) (Var 4 iostat) (Var 4 iomsg)] [] () Public .true. .true. () ), ~read_formatted: (CustomOperator 2 ~read_formatted [2 read_formatted] Public ), ~write_formatted: (CustomOperator 2 ~write_formatted [2 write_formatted] Public ) }) string_14_stdlib_string_type () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit_typing2-1e706a4.stderr0000664000175000017500000000020615227365530025205 0ustar alastairalastairsemantic error: Variable 'x' is not declared --> tests/errors/implicit_typing2.f90:6:5 | 6 | x = 1 | ^ 'x' is undeclared lfortran-0.64.0/tests/reference/c-pragma2-a14de52.json0000664000175000017500000000066715227365530022444 0ustar alastairalastair{ "basename": "c-pragma2-a14de52", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/pragma2.f90", "infile_hash": "c76c30115a39aa0c98b24173c8517df1fb525bf101023b12dc38ca3e", "outfile": null, "outfile_hash": null, "stdout": "c-pragma2-a14de52.stdout", "stdout_hash": "a657ba049ef975e996c0b11ced85944ff0c0a5e3785154c82d55deff", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-write_22-368d6f8.json0000664000175000017500000000071215227365530023064 0ustar alastairalastair{ "basename": "run-write_22-368d6f8", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/write_22.f90", "infile_hash": "bb59757aca5431680883ad827dfcf64f91d2dc9e8ec0a32298308d61", "outfile": null, "outfile_hash": null, "stdout": "run-write_22-368d6f8.stdout", "stdout_hash": "bc6ca5445125237b82fe812b13f94a6233070ae3b070a1b5630bcf1c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_subroutine2-805f758.stdout0000664000175000017500000000314715227365530026232 0ustar alastairalastair(TranslationUnit [(Program subr2 () [] [] [] [(SubroutineCall 0 my_subr [] [] [] [] () )] [] ) (Subroutine my_subr [] [] () () [] [] [] [] [(Print 0 () [(FuncCallOrArray sxvals [] [] [] [] [] )] () ) (If 0 () (/= (FuncCallOrArray sxvals [] [] [] [] [] ) 4) [(ErrorStop 0 () () () )] [] () () () ) (Return 0 () () )] [(Function sxvals [] [(AttrType TypeInteger [] () () None )] () () () [] [] [] [] [(Assignment 0 sxvals 4 () ) (Return 0 () () )] [] [] )] [] )] ) lfortran-0.64.0/tests/reference/asr-assign_01-40d16c6.stderr0000664000175000017500000000035215227365530023505 0ustar alastairalastairsemantic error: Cannot assign to a constant variable --> tests/errors/assign_01.f90:5:5 | 5 | x = 1 | ^^^^^ assignment here | 4 | integer, parameter :: x = 2 | ~~~~~ declared as constant lfortran-0.64.0/tests/reference/asr_disable_warnings-style1-3d16af1.stderr0000664000175000017500000000046515227365530026620 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/style1.f90:4:11 | 4 | if (y .eq. 1) then | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/style1.f90:10:15 | 10 | if (x .eq. 1) then | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/asr-functions_09-1e51ac7.json0000664000175000017500000000075615227365530023776 0ustar alastairalastair{ "basename": "asr-functions_09-1e51ac7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_09.f90", "infile_hash": "050352bd7c3ecc846699ec79fe6e09ed5b9515fba210bdbbf66355b0", "outfile": null, "outfile_hash": null, "stdout": "asr-functions_09-1e51ac7.stdout", "stdout_hash": "e1bbb595efd377b59f4a897cb8c50c13aac09f69688f6c790add3559", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dprod_01-80a930c.stderr0000664000175000017500000000026715227365530023336 0ustar alastairalastairsemantic error: first argument of `dprod` must have kind equal to 4 --> tests/errors/dprod_01.f90:2:13 | 2 | print*, dprod(4.23_8, 4.3_8) | ^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/llvm-modules_36-53c9a79.json0000664000175000017500000000075315227365530023556 0ustar alastairalastair{ "basename": "llvm-modules_36-53c9a79", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_36.f90", "infile_hash": "81bd7e21e30c46c3779cc4c928723fbf58bcc748333a96faee9d0b96", "outfile": null, "outfile_hash": null, "stdout": "llvm-modules_36-53c9a79.stdout", "stdout_hash": "e0dc21f81a7b6b11c114cda899443d50385b8b1d8850ff80c0897941", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-allocated_05-d9e0943.stderr0000664000175000017500000000040115227365530024201 0ustar alastairalastairruntime error: Attempting to allocate already allocated variable 'arr' --> tests/errors/allocated_05.f90:6:14 | 6 | allocate(arr(20)) ! Error: double allocation of array | ^^^^^^^ Cannot allocate 'arr' because it is already allocated lfortran-0.64.0/tests/reference/ast-complex3-001609d.stdout0000664000175000017500000000450515227365530023414 0ustar alastairalastair(TranslationUnit [(Program complex3 () [] [] [(Declaration (AttrType TypeComplex [(() 8 Value)] () () None ) [] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeComplex [(() 8 Value)] () () None ) [] [(y [] [] () () None ())] () ) (Declaration (AttrType TypeComplex [(() 4 Value)] () () None ) [] [(z [] [] () () None ())] () ) (Declaration (AttrType TypeComplex [(() 4 Value)] () () None ) [] [(w [] [] () () None ())] () )] [(Assignment 0 x (Complex (Real "3.0_8") (Real "4.0_8")) () ) (Print 0 () [x] () ) (Assignment 0 y (Complex (Real "3.0_8") (Real "4.0_8")) () ) (Print 0 () [y] () ) (Assignment 0 z (Complex (Real "3.0_4") (Real "4.0_4")) () ) (Print 0 () [z] () ) (Assignment 0 w (Complex (Real "3.0_4") (Real "4.0_4")) () ) (Print 0 () [w] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-arrays_01_size-aaed99f.json0000664000175000017500000000076715227365530024654 0ustar alastairalastair{ "basename": "llvm-arrays_01_size-aaed99f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_size.f90", "infile_hash": "cb58e1bbc81b8cb3e39e493299f8ce73339c3bfe6f97ec12ea102145", "outfile": null, "outfile_hash": null, "stdout": "llvm-arrays_01_size-aaed99f.stdout", "stdout_hash": "30c6e44be82350ae08109151db8952d910017f0d86f701a130bf6eee", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-team1-f402eac.json0000664000175000017500000000071715227365530023220 0ustar alastairalastair{ "basename": "ast_f90-team1-f402eac", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/team1.f90", "infile_hash": "c7d57807d2f91911de8beb317405307221c403b50c6abdec58484b8b", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-team1-f402eac.stdout", "stdout_hash": "7deb5f0a6d28fb6d9050ae9329cb75b57d169ba8671f27f26c2a2fb5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-subroutine9-8ecec78.json0000664000175000017500000000072615227365530024045 0ustar alastairalastair{ "basename": "ast-subroutine9-8ecec78", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subroutine9.f90", "infile_hash": "7936a6a897f4c893828bca05987a6c387bcda279b2ac5f20199ffda3", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutine9-8ecec78.stdout", "stdout_hash": "70ff4b1f1c748ff344c2f1067fb05b367850b7d510b15cec05c6a4c5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-close_invalid_kwarg1-b38b499.json0000664000175000017500000000077015227365530025477 0ustar alastairalastair{ "basename": "asr-close_invalid_kwarg1-b38b499", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/close_invalid_kwarg1.f90", "infile_hash": "296192ece06382b8ad7da3a6e8a9b36ec6a2d6b04dfd8d6a6e48fdf8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-close_invalid_kwarg1-b38b499.stderr", "stderr_hash": "c25da8e5009596338b320d2df46e459e72d9d78b60d4d488724c3953", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-array_constructor_with_different_char_lengths-5ba8b29.stderr0000664000175000017500000000034715227365530033377 0ustar alastairalastairsemantic error: Different `character` lengths 1 and 4 in array constructor --> tests/errors/array_constructor_with_different_char_lengths.f90:2:25 | 2 | print *, ["a", "b", "ball", "cat"] | ^^^^^^ lfortran-0.64.0/tests/reference/asr-data_implied_do3-831f843.json0000664000175000017500000000075415227365530024507 0ustar alastairalastair{ "basename": "asr-data_implied_do3-831f843", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/data_implied_do3.f90", "infile_hash": "4c07155ba247fba917733abca349b0f913d94718d6f112b738a4b935", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-data_implied_do3-831f843.stderr", "stderr_hash": "60f5d377bcdf47e10bbe333081aa6b077dc3b4b637f3d42dee03fa97", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-bits_01-2906c1d.stdout0000664000175000017500000001601615227365530023206 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bits_01: (Program (SymbolTable 2 { int32: (ExternalSymbol 2 int32 4 int32 lfortran_intrinsic_iso_fortran_env [] int32 Public ), int64: (ExternalSymbol 2 int64 4 int64 lfortran_intrinsic_iso_fortran_env [] int64 Public ) }) bits_01 [iso_fortran_env] [(If () (IntegerCompare (IntrinsicElementalFunction Ibclr [(IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Ibclr [(IntegerConstant 4 (Integer 8) Decimal) (IntegerConstant 1 (Integer 4) Decimal)] 0 (Integer 8) (IntegerConstant 4 (Integer 8) Decimal) ) NotEq (IntegerConstant 4 (Integer 8) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Ibset [(IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Ibset [(IntegerConstant 2 (Integer 8) Decimal) (IntegerConstant 3 (Integer 4) Decimal)] 0 (Integer 8) (IntegerConstant 10 (Integer 8) Decimal) ) NotEq (IntegerConstant 10 (Integer 8) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Ieor [(IntegerConstant 16 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 18 (Integer 4) Decimal) ) NotEq (IntegerConstant 18 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Ieor [(IntegerConstant 31 (Integer 8) Decimal) (IntegerConstant 3 (Integer 8) Decimal)] 0 (Integer 8) (IntegerConstant 28 (Integer 8) Decimal) ) NotEq (IntegerConstant 28 (Integer 8) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] ), iso_fortran_env: (IntrinsicModule lfortran_intrinsic_iso_fortran_env) }) [] ) lfortran-0.64.0/tests/reference/wat-cpu_time_02_wasm-fa2b15f.stdout0000664000175000017500000000456115227365530025250 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/asr-array_transfer_01-3dca715.stderr0000664000175000017500000000032015227365530025316 0ustar alastairalastairsemantic error: size argument to `transfer` intrinsic must be of Integer type. --> tests/errors/array_transfer_01.f90:5:29 | 5 | print *, transfer(a, 1, size_a) | ^^^^^^ lfortran-0.64.0/tests/reference/ast-coarrays_08-a784e09.stdout0000664000175000017500000000073515227365530024113 0ustar alastairalastair(TranslationUnit [(Program coarrays_08 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [(() () CodimensionStar)] () 0 Equal ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-interface_08-1848d3c.stdout0000664000175000017500000001073015227365530024217 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { interface_08: (Module (SymbolTable 2 { sub: (Function (SymbolTable 3 { x: (Variable 3 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub (FunctionType [(Integer 4) (Integer 4)] () Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 x) (Var 3 y)] [] () Public .false. .false. () ) }) interface_08 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/wat-empty-681c1d1.stdout0000664000175000017500000000456115227365530023112 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/asr-statement1-481e9b6.json0000664000175000017500000000075015227365530023471 0ustar alastairalastair{ "basename": "asr-statement1-481e9b6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/statement1.f90", "infile_hash": "e27125e5f5fdb977cddd49bc08366334cf6ed0375a909614296fbb14", "outfile": null, "outfile_hash": null, "stdout": "asr-statement1-481e9b6.stdout", "stdout_hash": "fc7faadc4ec0a1b90c3c0096e9efbb62111e34ba5894e09091e659fb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-common2-64c97b2.stdout0000664000175000017500000006740515227365530023337 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ), file_common_block_block_1: (Module (SymbolTable 3 { block_1: (Struct (SymbolTable 4 { a: (Variable 4 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 4 h [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_1 (StructType [] [] .true. .false. ) [] [a b h] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_1: (Variable 3 struct_instance_block_1 [] Local () () Default (StructType [] [] .true. .false. ) 3 block_1 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_1 () [] .false. .false. .false. ), file_common_block_block_2: (Module (SymbolTable 5 { block_2: (Struct (SymbolTable 6 { c: (Variable 6 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 6 d [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_2 (StructType [] [] .true. .false. ) [] [c d] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_2: (Variable 5 struct_instance_block_2 [] Local () () Default (StructType [] [] .true. .false. ) 5 block_2 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_2 () [] .false. .false. .false. ), file_common_block_block_3: (Module (SymbolTable 7 { block_3: (Struct (SymbolTable 8 { e: (Variable 8 e [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 8 g [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_3 (StructType [] [] .true. .false. ) [] [e g] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_3: (Variable 7 struct_instance_block_3 [] Local () () Default (StructType [] [] .true. .false. ) 7 block_3 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_3 () [] .false. .false. .false. ), file_common_block_block_4: (Module (SymbolTable 9 { block_4: (Struct (SymbolTable 10 { i: (Variable 10 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_4 (StructType [] [] .true. .false. ) [] [i] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_4: (Variable 9 struct_instance_block_4 [] Local () () Default (StructType [] [] .true. .false. ) 9 block_4 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_4 () [] .false. .false. .false. ), file_common_block_block_5: (Module (SymbolTable 11 { block_5: (Struct (SymbolTable 12 { j: (Variable 12 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 12 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_5 (StructType [] [] .true. .false. ) [] [j k] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_5: (Variable 11 struct_instance_block_5 [] Local () () Default (StructType [] [] .true. .false. ) 11 block_5 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_5 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-error_stop_04-8f1e721.json0000664000175000017500000000073115227365530024116 0ustar alastairalastair{ "basename": "run-error_stop_04-8f1e721", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/error_stop_04.f90", "infile_hash": "43fa904db7997988ab0d436e206706e0938feb0bf82ce0cbfec1fd67", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-error_stop_04-8f1e721.stderr", "stderr_hash": "03404f69d60aea2f0d4467699ed7e836de4bd9a3b4c7053c1419c68f", "returncode": 1 }lfortran-0.64.0/tests/reference/pass_where-where_03-00685f9.json0000664000175000017500000000077515227365530024321 0ustar alastairalastair{ "basename": "pass_where-where_03-00685f9", "cmd": "lfortran --pass=where --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_03.f90", "infile_hash": "987afee1a50b146dbe0bb5ebb0052fdc3bcef478e6a2409f78b5607f", "outfile": null, "outfile_hash": null, "stdout": "pass_where-where_03-00685f9.stdout", "stdout_hash": "26cce635c1bc08eecb42f768750e7b5d2099ae7aca458da15bcc6ecd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do4-f8e2956.stdout0000664000175000017500000000456315227365530022461 0ustar alastairalastair(TranslationUnit [(Program do4 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (j [] [] () () None ()) (k [] [] () () None ())] () )] [(Assignment 0 j 0 () ) (DoLoop 0 () 15 i 1 5 () [(Assignment 0 j (+ j i) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 j 0 () ) (DoLoop 0 () 20 i 1 6 2 [(Assignment 0 j (+ j i) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 k 0 () ) (DoLoop 0 () 30 i 1 5 () [(DoLoop 0 () 35 j 1 5 () [(Assignment 0 k (+ k 1) () ) (Continue 31 () )] () () ) (Continue 33 () )] () () ) (Continue 40 () )] [] )] ) lfortran-0.64.0/tests/reference/asr-array_constructor_with_asterisk_in_type_spec-24efd03.json0000664000175000017500000000110015227365530032723 0ustar alastairalastair{ "basename": "asr-array_constructor_with_asterisk_in_type_spec-24efd03", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_constructor_with_asterisk_in_type_spec.f90", "infile_hash": "32cd88de1530bbe18208a1999a4a3eb975c5e679d7a5f417966d2507", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_constructor_with_asterisk_in_type_spec-24efd03.stderr", "stderr_hash": "a54c91b46642660539c1dc2e3abfad83c7c1b128c15b0bbcbec31518", "returncode": 2 }lfortran-0.64.0/tests/reference/run-format5-79b3b8f.json0000664000175000017500000000066215227365530023064 0ustar alastairalastair{ "basename": "run-format5-79b3b8f", "cmd": "lfortran --no-color {infile}", "infile": "tests/format5.f90", "infile_hash": "dfe2e9bd30c55ac5189bba5635ea01ad967e2729ac08c9e601cc6236", "outfile": null, "outfile_hash": null, "stdout": "run-format5-79b3b8f.stdout", "stdout_hash": "199447b2012d92e53ca72d105e8e6572d142454dff2dcbdd6e639c45", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_30-9f519b4.stdout0000664000175000017500000012361415227365530023735 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { fpm_manifest_executable_modules_30: (Module (SymbolTable 7 { default_executable: (Function (SymbolTable 9 { 1_executable_config_main: (ExternalSymbol 9 1_executable_config_main 8 main fpm_manifest_executable_modules_30 [executable_config] main Public ), 1_executable_config_name: (ExternalSymbol 9 1_executable_config_name 8 name fpm_manifest_executable_modules_30 [executable_config] name Public ), 1_executable_config_source_dir: (ExternalSymbol 9 1_executable_config_source_dir 8 source_dir fpm_manifest_executable_modules_30 [executable_config] source_dir Public ), name: (Variable 9 name [] InOut () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 9 self [] Out () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 7 executable_config Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) default_executable (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 self) (Var 9 name)] [(Assignment (StructInstanceMember (Var 9 self) 9 1_executable_config_name (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Var 9 name) () .false. .false. ) (Assignment (StructInstanceMember (Var 9 self) 9 1_executable_config_source_dir (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (StringConstant "app" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 9 self) 9 1_executable_config_main (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (StringConstant "main.f90" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. )] () Public .true. .true. () ), executable_config: (Struct (SymbolTable 8 { main: (Variable 8 main [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 8 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), source_dir: (Variable 8 source_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) executable_config (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name source_dir main] [] Source Public .false. .false. .false. [] () () [] ) }) fpm_manifest_executable_modules_30 () [] .true. .false. .false. ), fpm_manifest_modules_30: (Module (SymbolTable 2 { default_executable: (ExternalSymbol 2 default_executable 7 default_executable fpm_manifest_executable_modules_30 [] default_executable Public ), package_config_t: (ExternalSymbol 2 package_config_t 4 package_config_t fpm_manifest_package_modules_30 [] package_config_t Public ), package_defaults: (Function (SymbolTable 10 { 1_package_config_t_executable: (ExternalSymbol 10 1_package_config_t_executable 5 executable fpm_manifest_package_modules_30 [package_config_t] executable Public ), 1_package_config_t_name: (ExternalSymbol 10 1_package_config_t_name 5 name fpm_manifest_package_modules_30 [package_config_t] name Public ), package: (Variable 10 package [] InOut () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) 2 package_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), root: (Variable 10 root [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) package_defaults (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 package) (Var 10 root)] [(Allocate [((StructInstanceMember (Var 10 package) 10 1_package_config_t_executable (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] () () ())] () () () ) (SubroutineCall 2 default_executable () [((ArrayItem (StructInstanceMember (Var 10 package) 10 1_package_config_t_executable (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ColMajor () )) ((StructInstanceMember (Var 10 package) 10 1_package_config_t_name (Allocatable (String 1 () DeferredLength DescriptorString) ) () ))] () .false. )] () Public .true. .true. () ) }) fpm_manifest_modules_30 () [fpm_manifest_package_modules_30 fpm_manifest_executable_modules_30] .false. .false. .false. ), fpm_manifest_package_modules_30: (Module (SymbolTable 4 { executable_config: (ExternalSymbol 4 executable_config 7 executable_config fpm_manifest_executable_modules_30 [] executable_config Public ), package_config_t: (Struct (SymbolTable 5 { executable: (Variable 5 executable [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 4 executable_config Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 5 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) package_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) [] [name executable] [] Source Public .false. .false. .false. [] () () [] ) }) fpm_manifest_package_modules_30 () [fpm_manifest_executable_modules_30] .true. .false. .false. ), modules_30: (Program (SymbolTable 11 { }) modules_30 [] [(Print (StringConstant "running modules_30 program" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-fmt1-c767956.json0000664000175000017500000000071415227365530022663 0ustar alastairalastair{ "basename": "ast_f90-fmt1-c767956", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/fmt1.f90", "infile_hash": "cc416a9bdea43f7844e35c44673a53dda17f3037acfc76ddef6f7c48", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-fmt1-c767956.stdout", "stdout_hash": "52971e2bba50a527abcf333d6f8b150a629a39dfac69b36c72587774", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-entry_05-f368f0e.json0000664000175000017500000000074215227365530023131 0ustar alastairalastair{ "basename": "asr-entry_05-f368f0e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/entry_05.f90", "infile_hash": "6ba013faf5b219ebe9941b538cdb0e7566fcd7389ab49f3e09971eeb", "outfile": null, "outfile_hash": null, "stdout": "asr-entry_05-f368f0e.stdout", "stdout_hash": "155fe2acba34ec6520cdbcc34b809ddb1c0b2d7ad2c41b2c8863d9cb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-mre_parameter-15f810f.json0000664000175000017500000000074215227365530024237 0ustar alastairalastair{ "basename": "run-mre_parameter-15f810f", "cmd": "lfortran --continue-compilation --no-color {infile}", "infile": "tests/errors/mre_parameter.f90", "infile_hash": "98f39f3110f80da2ce3dcae7c3d1a1bf53190249d4cb0d1f39f95e4e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-mre_parameter-15f810f.stderr", "stderr_hash": "01c4dff897b57fbb9191fb41026044183854c84d51c90c5b2231e15e", "returncode": 1 }lfortran-0.64.0/tests/reference/fortran-real_to_complex_cast_in_comparison-655651c.f900000664000175000017500000000057515227365530030746 0ustar alastairalastairprogram expr2 implicit none integer(4), parameter :: dp = Kind(0.0000000000000000e+00_8) real(8) :: zero zero = 0.0000000000000000e+00_8 contains elemental complex(8) function dabs(x) result(r) complex(8), intent(in) :: x if (x /= cmplx(zero, 0.0, kind=8)) then r = x else r = cmplx(0, 0.0, kind=8) - x end if end function dabs end program expr2 lfortran-0.64.0/tests/reference/llvm-global_scope5-688b5a0.stdout0000664000175000017500000000153215227365530024652 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 0 define i32 @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i32, align 4 %__lfortran_evaluate_12 = alloca i32, align 4 store i32 6, i32* @x, align 4 %0 = load i32, i32* @x, align 4 %1 = mul i32 2, %0 store i32 %1, i32* %__lfortran_evaluate_11, align 4 %2 = load i32, i32* @x, align 4 %3 = add i32 %2, 1 store i32 %3, i32* @x, align 4 %4 = load i32, i32* @x, align 4 %5 = mul i32 3, %4 store i32 %5, i32* %__lfortran_evaluate_12, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return %6 = load i32, i32* %__lfortran_evaluate_12, align 4 ret i32 %6 } lfortran-0.64.0/tests/reference/asr-nullify_02-1f0bd3a.json0000664000175000017500000000075015227365530023505 0ustar alastairalastair{ "basename": "asr-nullify_02-1f0bd3a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_02.f90", "infile_hash": "8603bbfc07290d14f0828e12a8b04c3521c007c844a4c901b4bb7483", "outfile": null, "outfile_hash": null, "stdout": "asr-nullify_02-1f0bd3a.stdout", "stdout_hash": "a9b707b259384fbccbccd69a7a725f8cdba2057a8cd976b4f79f899f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-min_01-aa661b0.json0000664000175000017500000000105115227365530022520 0ustar alastairalastair{ "basename": "asr-min_01-aa661b0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/min_01.f90", "infile_hash": "e952b62303ec12acafb074d8692d387259ce4ad18384b48667e9369f", "outfile": null, "outfile_hash": null, "stdout": "asr-min_01-aa661b0.stdout", "stdout_hash": "a9ecd142e6cfbf2185581c47bb061ced0633ea740faaa93cd1846949", "stderr": "asr-min_01-aa661b0.stderr", "stderr_hash": "a02531d479d1f7f30892cce7008c18cfd36a995138e153c4e24dc068", "returncode": 0 }lfortran-0.64.0/tests/reference/pass_pass_array_by_data-modules_44-cd82150.stdout0000664000175000017500000006305015227365530030012 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_44: (Program (SymbolTable 9 { cmd_new: (ExternalSymbol 9 cmd_new 2 cmd_new modules_44_fpm_cmd_new [] cmd_new Public ), fpm_cmd_settings: (ExternalSymbol 9 fpm_cmd_settings 2 fpm_cmd_settings modules_44_fpm_cmd_new [] fpm_cmd_settings Public ), fpm_new_settings: (ExternalSymbol 9 fpm_new_settings 2 fpm_new_settings modules_44_fpm_cmd_new [] fpm_new_settings Public ), settings: (Variable 9 settings [] Local () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 9 fpm_new_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) modules_44 [modules_44_fpm_cmd_new modules_44_module_fpm_filesystem] [(SubroutineCall 9 cmd_new () [((Var 9 settings))] () .false. )] ), modules_44_fpm_cmd_new: (Module (SymbolTable 2 { cmd_new: (Function (SymbolTable 8 { 1_fpm_new_settings_name: (ExternalSymbol 8 1_fpm_new_settings_name 7 name modules_44_fpm_cmd_new [fpm_new_settings] name Public ), littlefile: (Variable 8 littlefile [] Local () () Default (Allocatable (Array (String 1 () DeferredLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), settings: (Variable 8 settings [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 fpm_new_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cmd_new (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 settings)] [(Assignment (Var 8 littlefile) (ArrayConstant 160 ["# ", "My cool new project! "] (Array (String 1 (IntegerConstant 80 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] PointerArray ) ColMajor ) () .false. .false. ) (SubroutineCall 2 warnwrite_string____1 2 warnwrite_string____1 [((StructInstanceMember (Var 8 settings) 8 1_fpm_new_settings_name (Allocatable (String 1 () DeferredLength DescriptorString) ) () )) ((ArrayPhysicalCast (Var 8 littlefile) DescriptorArray PointerArray (Allocatable (Array (String 1 () DeferredLength DescriptorString) [(() ())] PointerArray ) ) () )) ((ArraySize (Var 8 littlefile) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () .false. )] () Public .true. .true. () ), fpm_cmd_settings: (Struct (SymbolTable 6 { working_dir: (Variable 6 working_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_cmd_settings (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [working_dir] [] Source Public .false. .true. .false. [] () () [] ), fpm_new_settings: (Struct (SymbolTable 7 { name: (Variable 7 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_new_settings (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name] [] Source Public .false. .false. .false. [] () 2 fpm_cmd_settings [] ), warnwrite_string____1: (ExternalSymbol 2 warnwrite_string____1 4 warnwrite_string____1 modules_44_module_fpm_filesystem [] warnwrite_string____1 Public ) }) modules_44_fpm_cmd_new () [modules_44_module_fpm_filesystem] .false. .false. .false. ), modules_44_module_fpm_filesystem: (Module (SymbolTable 4 { warnwrite_string____1: (Function (SymbolTable 10 { __1data: (Variable 10 __1data [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), data: (Variable 10 data [__1data] In () () Default (Array (String 1 () AssumedLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (Var 10 __1data))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fname: (Variable 10 fname [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) warnwrite_string____1 (FunctionType [(String 1 () AssumedLength DescriptorString) (Array (String 1 () AssumedLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 2 (Integer 4) () ))] PointerArray ) (Integer 4)] () Source Implementation "" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 fname) (Var 10 data) (Var 10 __1data)] [] () Public .false. .false. () ) }) modules_44_module_fpm_filesystem () [] .true. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_travel_01b-db46a56.json0000664000175000017500000000100315227365530025277 0ustar alastairalastair{ "basename": "asr-template_travel_01b-db46a56", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_travel_01b.f90", "infile_hash": "631939077e36e1bc6d2f3e96e19e4981f43579d944bacbb0fd542b69", "outfile": null, "outfile_hash": null, "stdout": "asr-template_travel_01b-db46a56.stdout", "stdout_hash": "898afa94a7637a987a102a8e9cf177284aea9b55665bf01333ffef34", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-functions_10-0449324.json0000664000175000017500000000075615227365530023551 0ustar alastairalastair{ "basename": "asr-functions_10-0449324", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_10.f90", "infile_hash": "fe4afd6d0a7065df5d59b482ad1bc0447df5303dc8246e85aa192fe0", "outfile": null, "outfile_hash": null, "stdout": "asr-functions_10-0449324.stdout", "stdout_hash": "db2e75c526775d1d2e7d6a2e2b133b6ac02acb7e4199b5082db71055", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allocate_01-f3446f6.json0000664000175000017500000000075315227365530023473 0ustar alastairalastair{ "basename": "asr-allocate_01-f3446f6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/allocate_01.f90", "infile_hash": "1132bfc098d2bca743472b75141d3c99f1a387436ca5098352f0c757", "outfile": null, "outfile_hash": null, "stdout": "asr-allocate_01-f3446f6.stdout", "stdout_hash": "c59914d3114ad8d69c56223dd800d1965fe7ec3aa78c89749546b0c0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do2-8eeb477.json0000664000175000017500000000072415227365530022156 0ustar alastairalastair{ "basename": "ast-do2-8eeb477", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/do2.f", "infile_hash": "004a5528e3fe66a7cc3f71ac1d14c359322161c682ed2d580f3de437", "outfile": null, "outfile_hash": null, "stdout": "ast-do2-8eeb477.stdout", "stdout_hash": "7012b27fbd0718042c3b6a146fabcb3ad4a71bb12786a4a6c45ff981", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-forallloop_01-d1e2bfa.json0000664000175000017500000000076115227365530024263 0ustar alastairalastair{ "basename": "ast-forallloop_01-d1e2bfa", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/forallloop_01.f90", "infile_hash": "d81387102a9ff31c123a828e4ead234d6971d67bca291dc5e40dc418", "outfile": null, "outfile_hash": null, "stdout": "ast-forallloop_01-d1e2bfa.stdout", "stdout_hash": "d77ce5939298eb49c3eb045291249d0362fd40395ba2faadf2cecbf9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor2-1db2235.json0000664000175000017500000000077015227365530026443 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor2-1db2235", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor2.f90", "infile_hash": "0ad5c1e9977ab80f0d8872a378aa0927023ce0b47360bfedeea09364", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor2-1db2235.stdout", "stdout_hash": "c8c68e012684f5097c489a19fbcf868f5d2d896fb6dba68e84fbd754", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-double_complex1-2f3d83c.json0000664000175000017500000000077015227365530024544 0ustar alastairalastair{ "basename": "ast-double_complex1-2f3d83c", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/double_complex1.f", "infile_hash": "67c79648ea8350e391b185e24698b65c09cdc201a298e72e7e59f992", "outfile": null, "outfile_hash": null, "stdout": "ast-double_complex1-2f3d83c.stdout", "stdout_hash": "7995ee30697dbb88bbc5b6b7f59a4a9c1606b126decbdcffe625af4c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-polymorphic_class_in_derived_type-15eb7b6.json0000664000175000017500000000103015227365530030430 0ustar alastairalastair{ "basename": "asr-polymorphic_class_in_derived_type-15eb7b6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/polymorphic_class_in_derived_type.f90", "infile_hash": "677dedbd26096d25f181bde9ec5de0e23794b2f2435c5ba79defa792", "outfile": null, "outfile_hash": null, "stdout": "asr-polymorphic_class_in_derived_type-15eb7b6.stdout", "stdout_hash": "96c7df98337ba8ed7968447e93c5df326378f7ee702178e1bb83339d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kind_01-6c675be.json0000664000175000017500000000072115227365530022706 0ustar alastairalastair{ "basename": "asr-kind_01-6c675be", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kind_01.f90", "infile_hash": "b5be2245f43395dd32e9fbc5f06c07ac6c70905e5b83bf65ca745c30", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-kind_01-6c675be.stderr", "stderr_hash": "a4f46f313141003cd8a07b34744cfb6be4d780ac89b7bef22e149f74", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-global_scope1-786a363.json0000664000175000017500000000073415227365530024037 0ustar alastairalastair{ "basename": "asr-global_scope1-786a363", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope1.f90", "infile_hash": "449b38487b6c79754deedb9991f1867bcf8c67d0d93019c2fe15854c", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope1-786a363.stdout", "stdout_hash": "b98d270e083dcf1a5b2059dd09b9da5d6d3075663ac8b44f25c98402", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do_concurrent_reduce3-9c6ccff.json0000664000175000017500000000076415227365530026112 0ustar alastairalastair{ "basename": "ast-do_concurrent_reduce3-9c6ccff", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do_concurrent_reduce3.f90", "infile_hash": "68244c7ec55a2abd3a98afa53cf637130918461cb0264902730a72b3", "outfile": null, "outfile_hash": null, "stdout": "ast-do_concurrent_reduce3-9c6ccff.stdout", "stdout_hash": "d69b3d274f972bafe654e0a86d218c4119ee4904a90bad9598d40c92", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-transfer_09-a440034.json0000664000175000017500000000075315227365530023440 0ustar alastairalastair{ "basename": "asr-transfer_09-a440034", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/transfer_09.f90", "infile_hash": "e76993559a0b5a14c872b6b2ee4229f7d830997c80a68a73a9a1ccad", "outfile": null, "outfile_hash": null, "stdout": "asr-transfer_09-a440034.stdout", "stdout_hash": "d27b2b7129f2a5cdfd0686319bc9934e6eaf34e7254e161e287af4ef", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/c-expr_11-8e5ae80.stdout0000664000175000017500000000050615227365530022745 0ustar alastairalastair #include #include #include #include #include // Implementations int main(int argc, char* argv[]) { _lpython_set_argv(argc, argv); double x; x = ( 2.00000000000000000e+00*x + 1.00000000000000000e+00)/(x*(x + (double)(1))); return 0; } lfortran-0.64.0/tests/reference/asr-c_ptr_02-fce1b0e.json0000664000175000017500000000074215227365530023220 0ustar alastairalastair{ "basename": "asr-c_ptr_02-fce1b0e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/c_ptr_02.f90", "infile_hash": "b2f28a737ab24c02c4aa0fe0d88023004fbd708e506952f4c61b3211", "outfile": null, "outfile_hash": null, "stdout": "asr-c_ptr_02-fce1b0e.stdout", "stdout_hash": "331702bd6777aea6a01928b6fc7a7ae2fb64ff597654c1dcae7baab2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format6-f98f4d0.json0000664000175000017500000000066215227365530023065 0ustar alastairalastair{ "basename": "run-format6-f98f4d0", "cmd": "lfortran --no-color {infile}", "infile": "tests/format6.f90", "infile_hash": "45186df6d72a5fce9f892c48cdd3fe35ab0414b21dc36e8c2be45727", "outfile": null, "outfile_hash": null, "stdout": "run-format6-f98f4d0.stdout", "stdout_hash": "6933ced71c870e487ede5b388b933fbdfbf52c1e34fffd771dc611da", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character2-bc7e2ce.stdout0000664000175000017500000001131415227365530024201 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { character2: (Program (SymbolTable 2 { char1: (Variable 2 char1 [] Local (StringConstant "Goat" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "Goat" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 4 (Integer 8) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), char2: (Variable 2 char2 [] Local () () Default (String 1 (IntegerConstant 4 (Integer 8) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), char_param: (Variable 2 char_param [] Local (StringConstant "App" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "App" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 3 (Integer 8) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) character2 [] [(Assignment (Var 2 char2) (StringConstant "Balle" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/c-expr_11-8e5ae80.stderr0000664000175000017500000000024215227365530022723 0ustar alastairalastairstyle suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/expr_11.f90:3:5 | 3 | real*8 x | ^^^^^^ help: write this as 'real(8)' lfortran-0.64.0/tests/reference/ast-do_concurrent2-80c03e1.json0000664000175000017500000000073715227365530024322 0ustar alastairalastair{ "basename": "ast-do_concurrent2-80c03e1", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do_concurrent2.f90", "infile_hash": "afe8788676d4b7be4b765236db5d9c60aa267325a08b714b35ba7eb6", "outfile": null, "outfile_hash": null, "stdout": "ast-do_concurrent2-80c03e1.stdout", "stdout_hash": "8453b13d71357b563df819c30db05863cfcca709cbf2e5e2aa1bc188", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bindc_06-1fdaca6.stdout0000664000175000017500000003427215227365530023552 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bindc_06: (Program (SymbolTable 13 { c_f_pointer: (ExternalSymbol 13 c_f_pointer 4 c_f_pointer lfortran_intrinsic_iso_c_binding [] c_f_pointer Public ), c_int: (ExternalSymbol 13 c_int 4 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_ptr: (ExternalSymbol 13 c_ptr 4 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), f_int4: (ExternalSymbol 13 f_int4 2 f_int4 bindc_06_mod [] f_int4 Public ), f_int8: (ExternalSymbol 13 f_int8 2 f_int8 bindc_06_mod [] f_int8 Public ), f_logical: (ExternalSymbol 13 f_logical 2 f_logical bindc_06_mod [] f_logical Public ), f_type_c_ptr: (ExternalSymbol 13 f_type_c_ptr 2 f_type_c_ptr bindc_06_mod [] f_type_c_ptr Public ), ptr_f_type_c_ptr: (Variable 13 ptr_f_type_c_ptr [] Local () () Default (Pointer (Integer 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bindc_06 [bindc_06_mod iso_c_binding] [(Print (StringFormat () [(StringConstant "f_int4: " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 13 f_int4)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 13 f_int4) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(StringConstant "f_int8: " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 13 f_int8)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 13 f_int8) NotEq (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 2 (Integer 8) Decimal) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(StringConstant "f_logical: " (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 13 f_logical)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (LogicalBinOp (Var 13 f_logical) NEqv (LogicalConstant .false. (Logical 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (CPtrToPointer (Var 13 f_type_c_ptr) (Var 13 ptr_f_type_c_ptr) () () ) (Print (StringFormat () [(StringConstant "ptr_f_type_c_ptr: " (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 13 ptr_f_type_c_ptr)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 13 ptr_f_type_c_ptr) NotEq (IntegerConstant 12 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ), bindc_06_mod: (Module (SymbolTable 2 { c_ptr: (ExternalSymbol 2 c_ptr 4 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), f_int4: (Variable 2 f_int4 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. "c_int4" .false. .false. NotMethod () [] ), f_int8: (Variable 2 f_int8 [] Local () () Default (Integer 8) () BindC Public Required .false. .false. .false. "c_int8" .false. .false. NotMethod () [] ), f_logical: (Variable 2 f_logical [] Local () () Default (Logical 4) () BindC Public Required .false. .false. .false. "c_logical" .false. .false. NotMethod () [] ), f_type_c_ptr: (Variable 2 f_type_c_ptr [] Local () () Default (CPtr) () BindC Public Required .false. .false. .false. "c_type_c_ptr" .false. .false. NotMethod () [] ) }) bindc_06_mod () [iso_c_binding] .false. .false. .false. ), iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding) }) [] ) lfortran-0.64.0/tests/reference/ast-string_03-fc56745.stdout0000664000175000017500000001070015227365530023564 0ustar alastairalastair(TranslationUnit [(Module string_03_mod (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeCharacter [(len 5 Value)] () () None ) [(SimpleAttribute AttrParameter )] [(intro [] [] () (String "I've " ()) Equal ())] () )] [] [] ) (Program string_03 () [(Use [] string_03_mod [(UseSymbol intro () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeCharacter [(len 8 Value)] () () None ) [] [(verb [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 5 Value)] () () None ) [] [(posit [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 4 Value)] () () None ) [] [(title [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 7 Value)] () () None ) [] [(last_name [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 29 Value)] () () None ) [] [(combined [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 verb (String "learned " ()) () ) (Assignment 0 posit (String "from " ()) () ) (Assignment 0 title (String "the " ()) () ) (Assignment 0 last_name (String "best" ()) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 combined (StrOp (StrOp (StrOp (StrOp (StrOp intro Concat verb ) Concat posit ) Concat title ) Concat last_name ) Concat (String "." ()) ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 0 () [combined] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/llvm-variables_03-4ba9d62.json0000664000175000017500000000076115227365530024116 0ustar alastairalastair{ "basename": "llvm-variables_03-4ba9d62", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/variables_03.f90", "infile_hash": "8d8aca80aa33efae3a67154a5d778388037b8ff8866bb59f1909be52", "outfile": null, "outfile_hash": null, "stdout": "llvm-variables_03-4ba9d62.stdout", "stdout_hash": "0398dacc81bfafd640e94d9963d430d47f185a697d84f00f38ac2787", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-variable1-8ec1519.stdout0000664000175000017500000005441115227365530023623 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { variable01: (Function (SymbolTable 2 { m: (Variable 2 m [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca: (Function (SymbolTable 3 { matveca_arg_0: (Variable 3 matveca_arg_0 [] Unspecified () () Default (Array (Complex 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_1: (Variable 3 matveca_arg_1 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_2: (Variable 3 matveca_arg_2 [] Unspecified () () Default (Array (Complex 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_3: (Variable 3 matveca_arg_3 [] Unspecified () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_4: (Variable 3 matveca_arg_4 [] Unspecified () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_5: (Variable 3 matveca_arg_5 [] Unspecified () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matveca_arg_6: (Variable 3 matveca_arg_6 [] Unspecified () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) matveca (FunctionType [(Array (Complex 4) [(() ())] PointerArray ) (Integer 4) (Array (Complex 4) [(() ())] PointerArray ) (Complex 4) (Complex 4) (Complex 4) (Complex 4)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 matveca_arg_0) (Var 3 matveca_arg_1) (Var 3 matveca_arg_2) (Var 3 matveca_arg_3) (Var 3 matveca_arg_4) (Var 3 matveca_arg_5) (Var 3 matveca_arg_6)] [] () Public .false. .false. () ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p1: (Variable 2 p1 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p2: (Variable 2 p2 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p3: (Variable 2 p3 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p4: (Variable 2 p4 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [m] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 m))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [n] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) variable01 (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 m) (Var 2 n)] [(SubroutineCall 2 matveca () [((Var 2 x)) ((Var 2 m)) ((Var 2 y)) ((Var 2 p1)) ((Var 2 p2)) ((Var 2 p3)) ((Var 2 p4))] () .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-flush1-09001c8.stdout0000664000175000017500000000140315227365530023057 0ustar alastairalastair(TranslationUnit [(Program flush1 (TriviaNode [(EndOfLine) (Comment "! Tests for syntax (AST only):" )] [] ) [] [] [] [(Flush 0 [10] [(IOSTAT n)] () ) (Flush 0 [20] [(IOMSG n)] () ) (Flush 0 [] [(ERR label)] () ) (Flush 0 [30] [(UNIT 40)] () ) (Flush 0 [50] [] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-subroutine5-e248afc.json0000664000175000017500000000072615227365530024025 0ustar alastairalastair{ "basename": "asr-subroutine5-e248afc", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/subroutine5.f90", "infile_hash": "88c62ffd8f005d7a511511e43da68f25e8fe795a75fec462baa25885", "outfile": null, "outfile_hash": null, "stdout": "asr-subroutine5-e248afc.stdout", "stdout_hash": "7983889c5057c26a754cba697d4a74c237b18aecfb42ea69dda19deb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-derived_type_06-2623a81.stderr0000664000175000017500000000027615227365530024654 0ustar alastairalastairsemantic error: The expression with derived types contains two or more arrays. --> tests/errors/derived_type_06.f90:14:5 | 14 | main_arr%arr_2%num = 22 | ^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-incorrect_number_args_function-1f6f6fa.json0000664000175000017500000000102615227365530030017 0ustar alastairalastair{ "basename": "asr-incorrect_number_args_function-1f6f6fa", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_number_args_function.f90", "infile_hash": "2ce169328c06c00519157a9d7abae8902aa7fa8d165958d8abe359f0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_number_args_function-1f6f6fa.stderr", "stderr_hash": "80c5bdc2270b2db7e4e1ab8899c12c9c1352e1089d22984a21133c1c", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-preprocess_01-20f7efb.json0000664000175000017500000000107115227365530024217 0ustar alastairalastair{ "basename": "asr-preprocess_01-20f7efb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/warnings/preprocess_01.f90", "infile_hash": "8b0a43c23607be7c2557620c9ad10af23a6bcf0430bf1d5170b65303", "outfile": null, "outfile_hash": null, "stdout": "asr-preprocess_01-20f7efb.stdout", "stdout_hash": "d915138fecbb3415e2f34d065079bbe9935742d7b608d55c9016b11f", "stderr": "asr-preprocess_01-20f7efb.stderr", "stderr_hash": "add78f2a68b8c40d46c23122eeab18b258daae408143d3fb854b005d", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-format_01-b8a6dbf.json0000664000175000017500000000074515227365530023414 0ustar alastairalastair{ "basename": "ast-format_01-b8a6dbf", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/format_01.f90", "infile_hash": "4cc04453f51b9adcf8108f25d26d048109fd69c30496888f6f560433", "outfile": null, "outfile_hash": null, "stdout": "ast-format_01-b8a6dbf.stdout", "stdout_hash": "985b7e32d6336a9c9632c673dcdb3545a977da8dabdf0ce724ca5023", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-expr9-ba35d31.stdout0000664000175000017500000000107015227365530023062 0ustar alastairalastair(TranslationUnit [(SubroutineCall 0 trigger [(ERROR_HANDLER [])] [] [(errors (DefUnaryOp "errors" rslt ))] [] () ) (DefUnaryOp "INVERSE" B ) (DefUnaryOp "INVERSE" (+ A B) ) (DefUnaryOp "anotherunary" 1 ) (DefUnaryOp "anotherunary" (+ 1 2) ) (DefUnaryOp "anotherunary" C ) (DefUnaryOp "anotherunary" (+ c d) )] ) lfortran-0.64.0/tests/reference/llvm-bindc1-345b88c.stdout0000664000175000017500000000135715227365530023304 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %p = alloca void*, align 8 %x = alloca i32*, align 8 store i32* null, i32** %x, align 8 %2 = load i32*, i32** %x, align 8 %3 = bitcast i32* %2 to void* store void* %3, void** %p, align 8 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_bindc1 FINALIZE_SYMTABLE_bindc1: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-array12-cb81afc.stdout0000664000175000017500000004654715227365530023461 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array12: (Module (SymbolTable 2 { c_associated: (ExternalSymbol 2 c_associated 4 c_associated lfortran_intrinsic_iso_c_binding [] c_associated Public ), c_char: (ExternalSymbol 2 c_char 4 c_char lfortran_intrinsic_iso_c_binding [] c_char Public ), c_int: (ExternalSymbol 2 c_int 4 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_ptr: (ExternalSymbol 2 c_ptr 4 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), get_current_directory: (Function (SymbolTable 14 { buffersize: (Variable 14 buffersize [] Local (IntegerConstant 1000 (Integer 4) Decimal) (IntegerConstant 1000 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cpath: (Variable 14 cpath [] Local () () Default (Allocatable (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 14 path [] Out () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 14 tmp [] Local () () Default (CPtr) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_current_directory (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [getcwd] [(Var 14 path)] [(Allocate [((Var 14 cpath) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1000 (Integer 4) Decimal))] () () ())] () () () ) (Assignment (Var 14 tmp) (FunctionCall 2 getcwd () [((ArrayPhysicalCast (Var 14 cpath) DescriptorArray StringArraySinglePointer (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] StringArraySinglePointer ) () )) ((Var 14 buffersize))] (CPtr) () () ) () .false. .false. ) (If () (PointerAssociated (Var 14 tmp) () (Logical 4) () ) [(Print (StringFormat () [(StringConstant "PWD: " (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 14 tmp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] )] () Public .false. .false. () ), getcwd: (Function (SymbolTable 13 { buf: (Variable 13 buf [] In () () Default (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength CChar) [(() ())] StringArraySinglePointer ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), bufsize: (Variable 13 bufsize [] In () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 13 path [] ReturnVar () () Default (CPtr) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) getcwd (FunctionType [(Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength CChar) [(() ())] StringArraySinglePointer ) (Integer 4)] (CPtr) BindC Interface "getcwd" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 buf) (Var 13 bufsize)] [] (Var 13 path) Public .false. .false. () ) }) array12 () [iso_c_binding array12] .false. .false. .false. ), iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding) }) [] ) lfortran-0.64.0/tests/reference/llvm-doloop_02-9fcb598.stdout0000664000175000017500000003013515227365530024026 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc22 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__do_loop_end = alloca i32, align 4 %__do_loop_end1 = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 %i = alloca i32, align 4 %j = alloca i32, align 4 store i32 0, i32* %j, align 4 store i32 1, i32* %a, align 4 store i32 10, i32* %b, align 4 %3 = load i32, i32* %b, align 4 store i32 %3, i32* %__do_loop_end, align 4 %4 = load i32, i32* %a, align 4 %5 = sub i32 %4, 1 store i32 %5, i32* %i, align 4 br label %loop.head loop.head: ; preds = %loop.body, %.entry %6 = load i32, i32* %i, align 4 %7 = add i32 %6, 1 %8 = load i32, i32* %__do_loop_end, align 4 %9 = icmp sle i32 %7, %8 br i1 %9, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %10 = load i32, i32* %i, align 4 %11 = add i32 %10, 1 store i32 %11, i32* %i, align 4 %12 = load i32, i32* %j, align 4 %13 = load i32, i32* %i, align 4 %14 = add i32 %12, %13 store i32 %14, i32* %j, align 4 br label %loop.head loop.end: ; preds = %loop.head %15 = load i32, i32* %j, align 4 %16 = icmp ne i32 %15, 55 br i1 %16, label %then, label %else then: ; preds = %loop.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %loop.end br label %ifcont ifcont: ; preds = %else, %then %17 = alloca i64, align 8 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %19 = load i64, i64* %17, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %2, i8* %18) br label %free_done free_done: ; preds = %free_nonnull, %ifcont store i32 0, i32* %a, align 4 store i32 0, i32* %i, align 4 br label %loop.head1 loop.head1: ; preds = %loop.end5, %free_done %28 = load i32, i32* %i, align 4 %29 = add i32 %28, 1 %30 = icmp sle i32 %29, 10 br i1 %30, label %loop.body2, label %loop.end6 loop.body2: ; preds = %loop.head1 %31 = load i32, i32* %i, align 4 %32 = add i32 %31, 1 store i32 %32, i32* %i, align 4 store i32 0, i32* %j, align 4 br label %loop.head3 loop.head3: ; preds = %loop.body4, %loop.body2 %33 = load i32, i32* %j, align 4 %34 = add i32 %33, 1 %35 = icmp sle i32 %34, 10 br i1 %35, label %loop.body4, label %loop.end5 loop.body4: ; preds = %loop.head3 %36 = load i32, i32* %j, align 4 %37 = add i32 %36, 1 store i32 %37, i32* %j, align 4 %38 = load i32, i32* %a, align 4 %39 = load i32, i32* %i, align 4 %40 = sub i32 %39, 1 %41 = mul i32 %40, 10 %42 = add i32 %38, %41 %43 = load i32, i32* %j, align 4 %44 = add i32 %42, %43 store i32 %44, i32* %a, align 4 br label %loop.head3 loop.end5: ; preds = %loop.head3 br label %loop.head1 loop.end6: ; preds = %loop.head1 %45 = load i32, i32* %a, align 4 %46 = icmp ne i32 %45, 5050 br i1 %46, label %then7, label %else8 then7: ; preds = %loop.end6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont9 else8: ; preds = %loop.end6 br label %ifcont9 ifcont9: ; preds = %else8, %then7 %47 = alloca i64, align 8 %48 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %47, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %a) %49 = load i64, i64* %47, align 8 %50 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %48, i8** %50, align 8 %51 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %49, i64* %51, align 8 %52 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %53 = load i8*, i8** %52, align 8 %54 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %55 = load i64, i64* %54, align 8 %56 = trunc i64 %55 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %53, i32 %56, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %57 = icmp eq i8* %48, null br i1 %57, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %ifcont9 call void @_lfortran_free_alloc(i8* %2, i8* %48) br label %free_done12 free_done12: ; preds = %free_nonnull11, %ifcont9 store i32 0, i32* %a, align 4 store i32 0, i32* %i, align 4 br label %loop.head13 loop.head13: ; preds = %loop.end17, %free_done12 %58 = load i32, i32* %i, align 4 %59 = add i32 %58, 1 %60 = icmp sle i32 %59, 10 br i1 %60, label %loop.body14, label %loop.end18 loop.body14: ; preds = %loop.head13 %61 = load i32, i32* %i, align 4 %62 = add i32 %61, 1 store i32 %62, i32* %i, align 4 %63 = load i32, i32* %i, align 4 store i32 %63, i32* %__do_loop_end1, align 4 store i32 0, i32* %j, align 4 br label %loop.head15 loop.head15: ; preds = %loop.body16, %loop.body14 %64 = load i32, i32* %j, align 4 %65 = add i32 %64, 1 %66 = load i32, i32* %__do_loop_end1, align 4 %67 = icmp sle i32 %65, %66 br i1 %67, label %loop.body16, label %loop.end17 loop.body16: ; preds = %loop.head15 %68 = load i32, i32* %j, align 4 %69 = add i32 %68, 1 store i32 %69, i32* %j, align 4 %70 = load i32, i32* %a, align 4 %71 = load i32, i32* %j, align 4 %72 = add i32 %70, %71 store i32 %72, i32* %a, align 4 br label %loop.head15 loop.end17: ; preds = %loop.head15 br label %loop.head13 loop.end18: ; preds = %loop.head13 %73 = load i32, i32* %a, align 4 %74 = icmp ne i32 %73, 220 br i1 %74, label %then19, label %else20 then19: ; preds = %loop.end18 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont21 else20: ; preds = %loop.end18 br label %ifcont21 ifcont21: ; preds = %else20, %then19 %75 = alloca i64, align 8 %76 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %75, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %a) %77 = load i64, i64* %75, align 8 %78 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc22, i32 0, i32 0 store i8* %76, i8** %78, align 8 %79 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc22, i32 0, i32 1 store i64 %77, i64* %79, align 8 %80 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc22, i32 0, i32 0 %81 = load i8*, i8** %80, align 8 %82 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc22, i32 0, i32 1 %83 = load i64, i64* %82, align 8 %84 = trunc i64 %83 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %81, i32 %84, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %85 = icmp eq i8* %76, null br i1 %85, label %free_done24, label %free_nonnull23 free_nonnull23: ; preds = %ifcont21 call void @_lfortran_free_alloc(i8* %2, i8* %76) br label %free_done24 free_done24: ; preds = %free_nonnull23, %ifcont21 br label %return return: ; preds = %free_done24 br label %FINALIZE_SYMTABLE_doloop_02 FINALIZE_SYMTABLE_doloop_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/ast-error_stop2-7d55ddf.stdout0000664000175000017500000000064615227365530024403 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [] [(If 0 () (Logical .true. ()) [(ErrorStop 0 () () () )] [] () () () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-block1-f4e17ad.json0000664000175000017500000000072215227365530023367 0ustar alastairalastair{ "basename": "ast_f90-block1-f4e17ad", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/block1.f90", "infile_hash": "195aaf0b0ae556975d0d7c84d1ff451d793614e176384294a288b08c", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-block1-f4e17ad.stdout", "stdout_hash": "023d887b93d9b4e5408a600e5bc12cfd79b7d8d88960b4be25dc7a7b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-global_scope1-b0a630a.stdout0000664000175000017500000000014215227365530024701 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 0 lfortran-0.64.0/tests/reference/pass_do_loops-loop_var_use_after_loop-e26183c.json0000664000175000017500000000106315227365530030361 0ustar alastairalastair{ "basename": "pass_do_loops-loop_var_use_after_loop-e26183c", "cmd": "lfortran --pass=do_loops --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/loop_var_use_after_loop.f90", "infile_hash": "7155c67c016a79ec0de4c65637bdec02203cd567e2d20a7676393d09", "outfile": null, "outfile_hash": null, "stdout": "pass_do_loops-loop_var_use_after_loop-e26183c.stdout", "stdout_hash": "6e9a3b4f68f08040b5f194e7d0f3767af29fe775826f509f17e47e8e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_assign_minimal-c4142fa.json0000664000175000017500000000101015227365530026473 0ustar alastairalastair{ "basename": "ast-fixedform_assign_minimal-c4142fa", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_assign_minimal.f", "infile_hash": "c859f6358c9852842503fc3e803177fd6c3f47e9c7cf4037bdf71919", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_assign_minimal-c4142fa.stdout", "stdout_hash": "d31667a5b1ec2ba542cc957c3644f3879fc650daf8ec7167cf6457e2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-common_04-b603709.stdout0000664000175000017500000006601015227365530023461 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { file_common_block_block_1: (Module (SymbolTable 3 { block_1: (Struct (SymbolTable 4 { a: (Variable 4 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) block_1 (StructType [] [] .true. .false. ) [] [a b c] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_block_1: (Variable 3 struct_instance_block_1 [] Local () () Default (StructType [] [] .true. .false. ) 3 block_1 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_block_1 () [] .false. .false. .false. ), main: (Program (SymbolTable 2 { 1_block_1_a: (ExternalSymbol 2 1_block_1_a 4 a block_1 [] a Public ), 1_block_1_b: (ExternalSymbol 2 1_block_1_b 4 b block_1 [] b Public ), 1_block_1_c: (ExternalSymbol 2 1_block_1_c 4 c block_1 [] c Public ), block_1: (ExternalSymbol 2 block_1 3 block_1 file_common_block_block_1 [] block_1 Public ), d: (Variable 2 d [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), struct_instance_block_1: (ExternalSymbol 2 struct_instance_block_1 3 struct_instance_block_1 file_common_block_block_1 [] struct_instance_block_1 Public ) }) main [] [(Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 d) (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) (ArrayBroadcast (IntegerConstant 4 (Integer 4) Decimal) (ArrayConstant 4 [5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 20 [4, 4, 4, 4, 4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Assignment (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. ) (If () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 d) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_a (Integer 4) () ) (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_b (Integer 4) () ) (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) (ArrayItem (StructInstanceMember (Var 2 struct_instance_block_1) 2 1_block_1_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 2 d)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-infer_first_assignment_conflict_01-a1c38bb.json0000664000175000017500000000104215227365530030443 0ustar alastairalastair{ "basename": "asr-infer_first_assignment_conflict_01-a1c38bb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/infer_first_assignment_conflict_01.f90", "infile_hash": "55571c5dde56eb57671e3a4a605a7f8951af2055b6117ca23ef90155", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-infer_first_assignment_conflict_01-a1c38bb.stderr", "stderr_hash": "9e612580f04066b3aa8d1a88fbe3560dde89fff0e4b321a48b906209", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-global_scope8-67fff8d.stdout0000664000175000017500000000146115227365530024646 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [(Assignment (Var 1 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. ) (Var 1 x)] ) lfortran-0.64.0/tests/reference/pass_array_op-array15-079d0cd.stdout0000664000175000017500000000755015227365530025373 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array15: (Program (SymbolTable 2 { __libasr_index_0_: (Variable 2 __libasr_index_0_ [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array15 [] [(DoLoop () ((Var 2 __libasr_index_0_) (ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (ArrayItem (Var 2 x) [(() (Var 2 __libasr_index_0_) ())] (Integer 4) ColMajor () ) (IntegerConstant 23 (Integer 4) Decimal) () .false. .false. )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-fixed_form_implicit_check-94844d9.stdout0000664000175000017500000000053315227365530027054 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { }) main [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intent_01-c1f267a.json0000664000175000017500000000074515227365530023260 0ustar alastairalastair{ "basename": "asr-intent_01-c1f267a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intent_01.f90", "infile_hash": "ecbce2d4b01a09bee24ec92ce8be335f75903e746d23a667806bf264", "outfile": null, "outfile_hash": null, "stdout": "asr-intent_01-c1f267a.stdout", "stdout_hash": "7c24e992806b5d19467e21af0053f288674612009722a8b15c051d71", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form2-ad2afae.json0000664000175000017500000000074115227365530024073 0ustar alastairalastair{ "basename": "ast-fixed_form2-ad2afae", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form2.f", "infile_hash": "571cbfd198e5e5c217a11df963d0f4bda8786f94fc435927d45be679", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form2-ad2afae.stdout", "stdout_hash": "fb67dab9d7dcabe723b1c86b7fbb882257330ae5cd2f69ed9e73b683", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/lookup_name-lookup_name4-76fda17.json0000664000175000017500000000075415227365530025606 0ustar alastairalastair{ "basename": "lookup_name-lookup_name4-76fda17", "cmd": "lfortran --lookup-name --no-color {infile} -o {outfile}", "infile": "tests/lookup_name4.f90", "infile_hash": "4f94dd895f74a3603c2465f84044dc46c3156dbabcb01fbe69722e60", "outfile": null, "outfile_hash": null, "stdout": "lookup_name-lookup_name4-76fda17.stdout", "stdout_hash": "547f4cdcb68dbf0b977390e3ca98e359fb12dd3e018ddc10ef90db14", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope1-f174531.stdout0000664000175000017500000000124515227365530027332 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-expr7-b630493.json0000664000175000017500000000071715227365530023044 0ustar alastairalastair{ "basename": "ast_f90-expr7-b630493", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/expr7.f90", "infile_hash": "9b01fedf331316b08b35441cb9f4cb6f7808edd93b29c70e1caeea03", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-expr7-b630493.stdout", "stdout_hash": "6e75863362e53e9147fdfc66548bad38114442386f0d73f0a673409c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_01-3535389.json0000664000175000017500000000075015227365530023215 0ustar alastairalastair{ "basename": "asr-modules_01-3535389", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_01.f90", "infile_hash": "592921c14763dae70e205b1eaf8b9fd0b69df11eccc0a66d109e11b8", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_01-3535389.stdout", "stdout_hash": "a2d0a58174f3efdf8bb6aeecf43ececa36a10769642f182196bbb027", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_04-0d478be.json0000664000175000017500000000072315227365530023432 0ustar alastairalastair{ "basename": "asr-modules_04-0d478be", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/modules_04.f90", "infile_hash": "001166d3ec02d038539957e7b333b2f02902687e96980e325831c745", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_04-0d478be.stdout", "stdout_hash": "99b1526c884173b1ff4fc750f2f42a79c0a4a9283b1cc3e52d97dd0d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incompatible_rank_assign-a69f7b4.stderr0000664000175000017500000000025315227365530027041 0ustar alastairalastairsemantic error: Incompatible ranks `0` and `1` in assignment --> tests/errors/incompatible_rank_assign.f90:2:1 | 2 | integer :: x = [1,2,3] | ^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-intrinsics_23-db1ffb5.stdout0000664000175000017500000002407315227365530024661 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_23: (Program (SymbolTable 2 { i32: (Variable 2 i32 [] Local (TypeInquiry Huge (Integer 4) (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) (IntegerConstant 2147483647 (Integer 4) Decimal) ) (IntegerConstant 2147483647 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i64: (Variable 2 i64 [] Local (TypeInquiry Huge (Integer 8) (IntegerConstant 0 (Integer 8) Decimal) (Integer 8) (IntegerConstant 9223372036854775807 (Integer 8) Decimal) ) (IntegerConstant 9223372036854775807 (Integer 8) Decimal) Parameter (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (TypeInquiry Huge (Real 4) (RealConstant 0.000000 (Real 4) ) (Real 4) (RealConstant 340282346638528859811704183484516925440.000000 (Real 4) ) ) (RealConstant 340282346638528859811704183484516925440.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local (TypeInquiry Huge (Real 8) (RealConstant 0.000000 (Real 8) ) (Real 8) (RealConstant 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 (Real 8) ) ) (RealConstant 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 (Real 8) ) Parameter (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_23 [] [(Print (StringFormat () [(Var 2 i32) (Var 2 i64) (Var 2 y) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Huge (Integer 4) (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) (IntegerConstant 2147483647 (Integer 4) Decimal) ) (TypeInquiry Huge (Integer 8) (IntegerConstant 0 (Integer 8) Decimal) (Integer 8) (IntegerConstant 9223372036854775807 (Integer 8) Decimal) ) (TypeInquiry Huge (Real 4) (RealConstant 0.000000 (Real 4) ) (Real 4) (RealConstant 340282346638528859811704183484516925440.000000 (Real 4) ) ) (TypeInquiry Huge (Real 8) (RealConstant 0.000000 (Real 8) ) (Real 8) (RealConstant 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 (Real 8) ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-associate1-6e54e23.stdout0000664000175000017500000000026415227365530024464 0ustar alastairalastairassociate (x => y) end associate associate (x => (y)) end associate associate (x => y + z) end associate associate (x => -y) end associate call some_subroutine(x, (x)) x = f((x)) lfortran-0.64.0/tests/reference/asr-entry2-a9679e0.stdout0000664000175000017500000001565015227365530023207 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { prin: (Function (SymbolTable 3 { }) prin (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [prini_main__lcompilers] [] [(SubroutineCall 1 prini_main__lcompilers 1 prini_main__lcompilers [((IntegerConstant 2 (Integer 4) Decimal))] () .false. )] () Public .true. .true. () ), prini: (Function (SymbolTable 2 { }) prini (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [prini_main__lcompilers] [] [(SubroutineCall 1 prini_main__lcompilers 1 prini_main__lcompilers [((IntegerConstant 1 (Integer 4) Decimal))] () .false. )] () Public .true. .true. () ), prini_main__lcompilers: (Function (SymbolTable 4 { entry__lcompilers: (Variable 4 entry__lcompilers [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), messpr: (Function (SymbolTable 5 { }) messpr (FunctionType [] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ) }) prini_main__lcompilers (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 entry__lcompilers)] [(If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 1 1 )] [] ) (If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 2 2 )] [] ) (GoToTarget 1 1 ) (Return) (GoToTarget 2 2 ) (SubroutineCall 4 messpr () [] () .false. ) (Return)] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/run-mre_parameter-15f810f.stderr0000664000175000017500000000065415227365530024573 0ustar alastairalastairsemantic error: arguments of `repeat` intrinsic must be scalar --> tests/errors/mre_parameter.f90:3:38 | 3 | character(3), parameter :: ar1 = repeat(["abc", "#^1", "123"], [1, 2, 3]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Variable 'ar1' is not declared --> tests/errors/mre_parameter.f90:4:14 | 4 | print *, ar1 | ^^^ 'ar1' is undeclared lfortran-0.64.0/tests/reference/llvm-real_dp_01-e53c6fb.json0000664000175000017500000000075315227365530023635 0ustar alastairalastair{ "basename": "llvm-real_dp_01-e53c6fb", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/real_dp_01.f90", "infile_hash": "96dcdc6844b049f189b110b997c4e4f840afa6ff1cd1da7e03f80d79", "outfile": null, "outfile_hash": null, "stdout": "llvm-real_dp_01-e53c6fb.stdout", "stdout_hash": "4bb7f5b8d1af1e7d61aa4c5b021977f25eaf14af5b4f226c1a82d3ce", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-test_backspace_01-cd469a1.stdout0000664000175000017500000003040215227365530025276 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { test_backspace_01: (Program (SymbolTable 2 { lfortran_iomsg: (Variable 2 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lfortran_iomsg1: (Variable 2 lfortran_iomsg1 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lfortran_iomsg2: (Variable 2 lfortran_iomsg2 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), line: (Variable 2 line [] Local () () Default (String 1 (IntegerConstant 80 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local (IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_backspace_01 [] [(FileOpen 0 (IntegerConstant 10 (Integer 4) Decimal) (StringConstant "file_01_data.txt" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "old" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () (StringConstant "read" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () () () () () ) (FileRead 0 (Var 2 u) (StringConstant "(A)" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () [(Var 2 line)] () .true. () () () ) (FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 2 lfortran_iomsg) () () [(StringFormat (StringConstant "(A)" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(Var 2 line)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () ) (FileBackspace 0 (Var 2 u) () () ) (FileRead 0 (Var 2 u) (StringConstant "(A)" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () [(Var 2 line)] () .true. () () () ) (FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 2 lfortran_iomsg1) () () [(StringFormat (StringConstant "(A)" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(StringConstant "Read and printed the same line again:" (String 1 (IntegerConstant 37 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () ) (FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 2 lfortran_iomsg2) () () [(StringFormat (StringConstant "(A)" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(Var 2 line)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () ) (If () (StringCompare (Var 2 line) NotEq (StringConstant "10130" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Logical 4) () ) [(ErrorStop () )] [] ) (FileClose 0 (Var 2 u) () () () () )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-int_01-72c2ff1.json0000664000175000017500000000073415227365530022550 0ustar alastairalastair{ "basename": "asr-int_01-72c2ff1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/int_01.f90", "infile_hash": "766d63f0b9cf518eb398acd6ceff8d8856637959cc0bf1890b03c89d", "outfile": null, "outfile_hash": null, "stdout": "asr-int_01-72c2ff1.stdout", "stdout_hash": "140aad3fe31099a2252f492292b3a5186450df5858b296250d9d0662", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_01-713dbcf.json0000664000175000017500000000074315227365530025701 0ustar alastairalastair{ "basename": "run-array_bounds_check_01-713dbcf", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_01.f90", "infile_hash": "e8570ec720776191802ff5d4d5cd6944a6b2e8730e5bf1bd8458dd83", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_01-713dbcf.stderr", "stderr_hash": "44dd938dd4e8e9ca17d3adcdafffb7e917336578424394a5196943c2", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-matrix_matmul_03-a99cdd1.json0000664000175000017500000000075415227365530024731 0ustar alastairalastair{ "basename": "asr-matrix_matmul_03-a99cdd1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/matrix_matmul_03.f90", "infile_hash": "0127d8b9682c6b1a587f586c811d7be9bd222c3459ce7916cdaa2f5e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-matrix_matmul_03-a99cdd1.stderr", "stderr_hash": "cb247fd3062f2959017c222e0d118b615e5949ddebdf535bba13386a", "returncode": 2 }lfortran-0.64.0/tests/reference/cpp-program3-7ea69db.json0000664000175000017500000000070015227365530023265 0ustar alastairalastair{ "basename": "cpp-program3-7ea69db", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/program3.f90", "infile_hash": "f5e4a3f2a2a6f406171d0aa3895b5d7342c4d87b73ffede073827f34", "outfile": null, "outfile_hash": null, "stdout": "cpp-program3-7ea69db.stdout", "stdout_hash": "c8b8c040cfc07de1aadf3edbe34874ccf76b0eac3f663741f1adab33", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-types_13-76138b5.stdout0000664000175000017500000006037515227365530023354 0ustar alastairalastair(TranslationUnit [(Program types_13 () [(Use [] iso_c_binding [(UseSymbol c_int () ) (UseSymbol c_double () ) (UseSymbol c_char () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Interface (InterfaceHeader) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceProc (Subroutine g [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeCharacter [] () () DoubleAsterisk ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine g2 [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeCharacter [(len () Star)] () () None ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine g3 [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_char] ImportDefault () )] [] [(Declaration (AttrType TypeCharacter [(len () Star) (kind c_char Value)] () () None ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine g4 [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_char] ImportDefault () )] [] [(Declaration (AttrType TypeCharacter [(() () Star) (kind c_char Value)] () () None ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine g5 [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_char] ImportDefault () )] [] [(Declaration (AttrType TypeCharacter [(kind c_char Value) (len () Star)] () () None ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine g6 [(d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeCharacter [(() 5 Value)] () () None ) [] [(d [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function f1 [(a) (b) (c) (d)] [(AttrType TypeInteger [(() c_int Value)] () () None )] r (Bind [c] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_int c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() 4 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [(() 4 Value)] () () None ) [] [(c [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function f2 [(a) (b) (c) (d)] [(AttrType TypeInteger [(() c_int Value)] () () None )] r (Bind [c] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_int c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() 4 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [(() 4 Value)] () () None ) [] [(c [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function f3 [(a) (b) (c) (d)] [] r (Bind [c] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_int c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() c_int Value)] () () None ) [] [(r [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [(() 4 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [(() 4 Value)] () () None ) [] [(c [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function f4 [(a) (b) (c) (d)] [] r (Bind [c] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Import [c_int c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() c_int Value)] () () None ) [] [(r [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [(() 4 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [(() 4 Value)] () () None ) [] [(c [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Subroutine f5 [(a) (b) (c)] [] (Bind [C] [(name (String "_cf5" ()))] ) () [] [(Import [c_int] ImportDefault () ) (Import [c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() c_int Value)] () () None ) [] [(r [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [(() c_int Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() c_double Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(c [] [] () () None ())] () )] [] [] [] ) )] )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-doloop_04-c0ab107.stdout0000664000175000017500000000135615227365530024272 0ustar alastairalastairprogram doloop_04 implicit none integer :: i, j, k j = 0 k = 2 do i = 1, 10, k j = j + i end do if (j /= 25) then error stop end if print *, j j = 0 k = -2 do i = 10, 1, k j = j + i end do if (j /= 30) then error stop end if print *, j j = 0 a: do i = 1, 10 j = j + i if (i == 2) then exit a end if end do a if (j /= 3) then error stop end if j = 0 b: do i = 1, 10, 2 j = j + i if (i == 3) then exit b end if end do b if (j /= 4) then error stop end if j = 0 i = 1 c: do j = j + i if (i == 2) then exit c end if i = i + 1 end do c if (j /= 3) then error stop end if !test-issue 746 k = 2 do i = 1, 10, k 100 continue end do end program doloop_04 lfortran-0.64.0/tests/reference/llvm-class_04-290b898.json0000664000175000017500000000074515227365530023130 0ustar alastairalastair{ "basename": "llvm-class_04-290b898", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/class_04.f90", "infile_hash": "0ddf2718f32dd9cfea8c4f4c9c384902ac023b5792e9fc8ec4a7648f", "outfile": null, "outfile_hash": null, "stdout": "llvm-class_04-290b898.stdout", "stdout_hash": "be71c90d75876f5f3a56a47ce168203150a156c5e6dfda8dfa857107", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_26-f10d0e6.json0000664000175000017500000000076115227365530024145 0ustar alastairalastair{ "basename": "asr-intrinsics_26-f10d0e6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_26.f90", "infile_hash": "6f188062412b32185ec5b7c5db08e46b54f4d9614541bc7e7c7ae271", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_26-f10d0e6.stdout", "stdout_hash": "13b84b258a51f9f578cb02bf6e6bb9ae8aa238db0891fe56501516ba", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-polymorphic_arguments_02-bb6f3e2.stdout0000664000175000017500000005642015227365530027044 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { polymorphic_argument_02: (Program (SymbolTable 2 { c_value: (Variable 2 c_value [] Local (StringConstant "c" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "c" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i_value: (Variable 2 i_value [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l_value: (Variable 2 l_value [] Local (LogicalConstant .true. (Logical 4) ) (LogicalConstant .true. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r_value: (Variable 2 r_value [] Local (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (RealConstant 1.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), str: (GenericProcedure 2 str [2 str_scalar] Public ), str_scalar: (Function (SymbolTable 3 { g1: (Variable 3 g1 [] In () () Default (StructType [] [] .false. .true. ) 2 ~unlimited_polymorphic_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), str_scalar: (Variable 3 str_scalar [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) str_scalar (FunctionType [(StructType [] [] .false. .true. )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 g1)] [(Assignment (Var 3 str_scalar) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 3 str_scalar) Public .true. .true. () ), ~unlimited_polymorphic_type: (Struct (SymbolTable 4 { }) ~unlimited_polymorphic_type (StructType [] [] .false. .true. ) [] [] [] Source Public .false. .true. .false. [] () () [] ) }) polymorphic_argument_02 [] [(Print (StringFormat () [(FunctionCall 2 str_scalar 2 str [((Var 2 i_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar 2 str [((Var 2 i_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar 2 str [((Var 2 r_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar 2 str [((Var 2 r_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar 2 str [((Var 2 c_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar 2 str [((Var 2 c_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar 2 str [((Var 2 l_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar 2 str [((Var 2 l_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar () [((Var 2 i_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar () [((Var 2 i_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar () [((Var 2 r_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar () [((Var 2 r_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar () [((Var 2 c_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar () [((Var 2 c_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 2 str_scalar () [((Var 2 l_value))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 2 str_scalar () [((Var 2 l_value))] (Integer 4) () () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-optional_argument_subroutine_in_type-0d81d24.stdout0000664000175000017500000002304515227365530031500 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 5 { 1_test_type_test_subroutine: (ExternalSymbol 5 1_test_type_test_subroutine 3 test_subroutine test_module [test_type] test_subroutine Public ), test_subroutine: (ExternalSymbol 5 test_subroutine 2 test_subroutine test_module [] test_subroutine Public ), test_type: (ExternalSymbol 5 test_type 2 test_type test_module [] test_type Public ), test_type_instance: (Variable 5 test_type_instance [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 5 test_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [test_module] [(SubroutineCall 5 1_test_type_test_subroutine () [(())] (Var 5 test_type_instance) .false. )] ), test_module: (Module (SymbolTable 2 { test_subroutine: (Function (SymbolTable 4 { x: (Variable 4 x [] In () () Default (Integer 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_subroutine (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 x)] [(Print (StringConstant "Hello World" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), test_type: (Struct (SymbolTable 3 { test_real_value: (Variable 3 test_real_value [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), test_subroutine: (StructMethodDeclaration 3 test_subroutine () test_subroutine 2 test_subroutine Source .false. .true. ) }) test_type (StructType [(Real 4)] [] .true. .false. ) [] [test_real_value] [] Source Public .false. .false. .false. [] () () [] ) }) test_module () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-subroutine6-a3aec97.json0000664000175000017500000000072615227365530024030 0ustar alastairalastair{ "basename": "ast-subroutine6-a3aec97", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subroutine6.f90", "infile_hash": "1987bc648e7f4c6205190248a296d000e0f33cb57a996b6c2a6c4804", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutine6-a3aec97.stdout", "stdout_hash": "0ea363b4d685e5be3f924036ca6eef77b2e4b9d08315acd058fb4e3f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-execute_command_line-0e9cd63.stdout0000664000175000017500000000615615227365530026372 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @string_const_data = private constant [18 x i8] c"echo \22Hello World\22" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([18 x i8], [18 x i8]* @string_const_data, i32 0, i32 0), i64 18 }> @string_const_data.1 = private constant [2 x i8] c"ls" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data.1, i32 0, i32 0), i64 2 }> define void @_lcompilers_execute_command_line_(%string_descriptor* %command, i32* %wait) { .entry: %_lcompilers_exit_status = alloca i32, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 0 %1 = load i8*, i8** %0, align 8 %2 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 0 %3 = load i8*, i8** %2, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 1 %5 = load i64, i64* %4, align 8 %6 = trunc i64 %5 to i32 %7 = call i32 @_lfortran_exec_command(i8* %3, i32 %6) store i32 %7, i32* %_lcompilers_exit_status, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_execute_command_line_ FINALIZE_SYMTABLE__lcompilers_execute_command_line_: ; preds = %return ret void } declare i32 @_lfortran_exec_command(i8*, i32) define void @_lcompilers_execute_command_line_1(%string_descriptor* %command, i32* %wait) { .entry: %_lcompilers_exit_status = alloca i32, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 0 %1 = load i8*, i8** %0, align 8 %2 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 0 %3 = load i8*, i8** %2, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %command, i32 0, i32 1 %5 = load i64, i64* %4, align 8 %6 = trunc i64 %5 to i32 %7 = call i32 @_lfortran_exec_command(i8* %3, i32 %6) store i32 %7, i32* %_lcompilers_exit_status, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_execute_command_line_1 FINALIZE_SYMTABLE__lcompilers_execute_command_line_1: ; preds = %return ret void } define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store i32 1, i32* %call_arg_value, align 4 call void @_lcompilers_execute_command_line_(%string_descriptor* @string_const, i32* %call_arg_value) store i32 1, i32* %call_arg_value, align 4 call void @_lcompilers_execute_command_line_1(%string_descriptor* @string_const.2, i32* %call_arg_value) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_execute_command_line FINALIZE_SYMTABLE_execute_command_line: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast_f90-do_concurrent2-9ec99ee.json0000664000175000017500000000075215227365530025166 0ustar alastairalastair{ "basename": "ast_f90-do_concurrent2-9ec99ee", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/do_concurrent2.f90", "infile_hash": "afe8788676d4b7be4b765236db5d9c60aa267325a08b714b35ba7eb6", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-do_concurrent2-9ec99ee.stdout", "stdout_hash": "d18cfdaa93af3c0230f5f79dcf10d429f0f0b3ac12c1af98c050ff2f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_line_limit-0a3f0f0.json0000664000175000017500000000077715227365530026003 0ustar alastairalastair{ "basename": "ast-fixed_form_line_limit-0a3f0f0", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_line_limit.f", "infile_hash": "474de788602ebc9fe11f04fe1962c667fa1ae3261c04710af3358dc9", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form_line_limit-0a3f0f0.stdout", "stdout_hash": "98d3ac76ca5cd9f5bc59f2fe37b490c60bade2b2284d51dece724258", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-statement_01-00eefc8.stdout0000664000175000017500000001740615227365530024417 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { alnorm: (Function (SymbolTable 2 { alnorm: (Variable 2 alnorm [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zexp: (Function (SymbolTable 4 { z: (Variable 4 z [] In () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zexp_return_var_name: (Variable 4 zexp_return_var_name [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zexp (FunctionType [(Real 8)] (Real 8) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 z)] [(Assignment (Var 4 zexp_return_var_name) (IntrinsicElementalFunction Exp [(Var 4 z)] 0 (Real 8) () ) () .false. .false. )] (Var 4 zexp_return_var_name) Public .false. .true. () ) }) alnorm (FunctionType [] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Return)] (Var 2 alnorm) Public .true. .true. () ), statement_01: (Program (SymbolTable 3 { }) statement_01 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-do_concurrent1-74bde45.stderr0000664000175000017500000000032415227365530024734 0ustar alastairalastairsemantic error: Do concurrent loop variable `j` cannot be part of local expression --> tests/errors/do_concurrent1.f90:5:26 | 5 | do concurrent (j = 1:Ny) local(i, j) | ^^^^^^^^^^^ lfortran-0.64.0/tests/reference/run-array_bounds_check_05-d584fab.stderr0000664000175000017500000000047315227365530026243 0ustar alastairalastairruntime error: Array shape mismatch in subroutine 'my'. Tried to match size 3 of dimension 1 of argument number 1, but expected size is 5 --> tests/errors/array_bounds_check_05.f90:7:13 | 7 | call my(x, 5) | ^ | 7 | call my(x, 5) | ~ Parameter is size 5, argument is size 3 lfortran-0.64.0/tests/reference/asr-maskr_incorrect_bit_size-0d2cb26.stderr0000664000175000017500000000032315227365530027047 0ustar alastairalastairsemantic error: first argument of `maskr` must be less than or equal to the BIT_SIZE of INTEGER(KIND=4) --> tests/errors/maskr_incorrect_bit_size.f90:2:12 | 2 | print*, maskr(63) | ^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-matrix_transpose_01-f8038ce.stderr0000664000175000017500000000031115227365530025707 0ustar alastairalastairsemantic error: `transpose` accepts arrays of rank 2 only, provided an array with rank, 1 --> tests/errors/matrix_transpose_01.f90:4:24 | 4 | print *, transpose(a) | ^ lfortran-0.64.0/tests/reference/asr-bin_op_complex_dp-26e149c.json0000664000175000017500000000077515227365530025066 0ustar alastairalastair{ "basename": "asr-bin_op_complex_dp-26e149c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bin_op_complex_dp.f90", "infile_hash": "9be1b396941b73e1466a46963ee3ade085440ce077b444ce7e2f6baf", "outfile": null, "outfile_hash": null, "stdout": "asr-bin_op_complex_dp-26e149c.stdout", "stdout_hash": "53acfc29b5c34d9e03a2637a5f62eaf9d9cc9c9c1b8c5db9c3823dac", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-cmplx_03-6426707.stdout0000664000175000017500000000054315227365530023237 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { cmplx_03: (Program (SymbolTable 2 { }) cmplx_03 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-matrix_matmul_06-d802f54.stderr0000664000175000017500000000032215227365530025113 0ustar alastairalastairsemantic error: The argument `matrix_b` in `matmul` must be of rank 2, provided an array with rank, 1 --> tests/errors/matrix_matmul_06.f90:5:24 | 5 | print *, matmul(a, b) | ^ lfortran-0.64.0/tests/reference/asr-where_03-a34eed8.json0000664000175000017500000000074215227365530023154 0ustar alastairalastair{ "basename": "asr-where_03-a34eed8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_03.f90", "infile_hash": "987afee1a50b146dbe0bb5ebb0052fdc3bcef478e6a2409f78b5607f", "outfile": null, "outfile_hash": null, "stdout": "asr-where_03-a34eed8.stdout", "stdout_hash": "43b3f5d3b517323e8bfc0c1c2eedc5d995a95dcbba5ba56155daaecc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-intrinsics_03-0771f1b.json0000664000175000017500000000076415227365530024252 0ustar alastairalastair{ "basename": "llvm-intrinsics_03-0771f1b", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_03.f90", "infile_hash": "e7fb61db3237594018e226a4236884f778bd41ae0848c5667da97462", "outfile": null, "outfile_hash": null, "stdout": "llvm-intrinsics_03-0771f1b.stdout", "stdout_hash": "c0a691677b320e98077e06350f60195b3f721682b801200f1ce1a86c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_3-53e9045.stderr0000664000175000017500000000020715227365530024215 0ustar alastairalastairsyntax error: Newline is unexpected here --> tests/errors/fixed_form_3.f:4:21 | 4 | 500 print *, sin(y | ^ lfortran-0.64.0/tests/reference/asr-intrinsics_35-10733ec.json0000664000175000017500000000076115227365530024065 0ustar alastairalastair{ "basename": "asr-intrinsics_35-10733ec", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_35.f90", "infile_hash": "e79df62a924c1199bf5e17b5ca059ae5ee9598aa94091ab14f6c083b", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_35-10733ec.stdout", "stdout_hash": "bc9924c7eda6ffe04684839bfe8f0ea7da1c075b9fe7872c7613d35b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-types_03-e07ce23.stdout0000664000175000017500000001652015227365530023501 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (type (;4;) (func (param f64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 f32) f32.const 1.500000 local.set 1 local.get 1 f64.promote_f32 call 4 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop local.get 1 i32.trunc_f32_s local.set 0 local.get 0 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (func $4 (type 4) (param f64) (result) (local i64 i64 i64) local.get 0 f64.const 0.000000 f64.lt if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 f64.const -1.000000 f64.mul local.set 0 else end local.get 0 i64.trunc_f64_s call 3 i32.const 1 i32.const 40 i32.const 1 i32.const 0 call 1 drop local.get 0 local.get 0 i64.trunc_f64_s f64.convert_i64_s f64.sub f64.const 100000000.000000 f64.mul i64.trunc_f64_s local.set 2 local.get 2 local.set 3 i64.const 0 local.set 1 loop local.get 2 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 2 f64.convert_i64_s i64.const 10 f64.convert_i64_s f64.div i64.trunc_f64_s local.set 2 br 1 else end end loop local.get 1 i64.const 8 i64.lt_s if local.get 1 i64.const 1 i64.add local.set 1 i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop br 1 else end end local.get 3 call 3 return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (export "print_f64" (func 4)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/run-array_bounds_check_15-9f619ed.json0000664000175000017500000000074315227365530025644 0ustar alastairalastair{ "basename": "run-array_bounds_check_15-9f619ed", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_15.f90", "infile_hash": "ae2dee1b53ed7b6e4496aca841d2401fbe69cfcc430f41676ed79607", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_15-9f619ed.stderr", "stderr_hash": "dc92d6b24db94a526144ec328182f49a021bad016b3d41e26e2cb196", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-parameter_03-d4df941.stdout0000664000175000017500000000430015227365530024307 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { parameter_03: (Program (SymbolTable 2 { l_knd: (Variable 2 l_knd [] Local (TypeInquiry Kind (Logical 4) (LogicalConstant .true. (Logical 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) parameter_03 [] [(Print (StringFormat () [(Var 2 l_knd)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/wat-if_04-1d3b97a.stderr0000664000175000017500000000023715227365530022715 0ustar alastairalastairstyle suggestion: Use 'end if' instead of 'endif' --> tests/../integration_tests/if_04.f90:25:1 | 25 | endif name | ^^^^^ help: write this as 'end if' lfortran-0.64.0/tests/reference/asr-derived_types_41-d6b8ce9.json0000664000175000017500000000077215227365530024724 0ustar alastairalastair{ "basename": "asr-derived_types_41-d6b8ce9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_41.f90", "infile_hash": "7159edfcbabeaa6b15ecf1918e77a04e8513664002ea1c2d083daf22", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_41-d6b8ce9.stdout", "stdout_hash": "18a16c523322e17f9ac06b680209c8d1fb7c0568c4be7f08904288f4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kwargs_02-1588831.json0000664000175000017500000000074515227365530023046 0ustar alastairalastair{ "basename": "asr-kwargs_02-1588831", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/kwargs_02.f90", "infile_hash": "b134c269925633b5b9f943802cb7efd683082e7567d4ef0e90d9ed47", "outfile": null, "outfile_hash": null, "stdout": "asr-kwargs_02-1588831.stdout", "stdout_hash": "90d550190917a7b4aae7e95338866d7942839cb878c3bf9d2c958c02", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit12-025d795.stderr0000664000175000017500000000224715227365530023633 0ustar alastairalastairstyle suggestion: Use integer(4) instead of integer*4 --> tests/implicit12.f90:3:17 | 3 | implicit integer*4 (d-e) | ^ help: write this as 'integer(4)' style suggestion: Use integer(8) instead of integer*8 --> tests/implicit12.f90:4:17 | 4 | implicit integer*8 (f-g) | ^ help: write this as 'integer(8)' style suggestion: Use real(4) instead of real*4 --> tests/implicit12.f90:6:14 | 6 | implicit real*4 (i-k) | ^ help: write this as 'real(4)' style suggestion: Use real(8) instead of real*8 --> tests/implicit12.f90:7:14 | 7 | implicit real*8 (l) | ^ help: write this as 'real(8)' style suggestion: Use complex(4) instead of complex*8 --> tests/implicit12.f90:9:17 | 9 | implicit complex*8 (o) | ^ help: write this as 'complex(4)' style suggestion: Use complex(8) instead of complex*16 --> tests/implicit12.f90:10:17 | 10 | implicit complex*16 (p) | ^ help: write this as 'complex(8)' semantic error: Implicit typing is not allowed, enable it by using --implicit-typing --> tests/implicit12.f90:2:1 | 2 | implicit integer (b-c) | ^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/run-format4-aaf60f4.json0000664000175000017500000000066215227365530023126 0ustar alastairalastair{ "basename": "run-format4-aaf60f4", "cmd": "lfortran --no-color {infile}", "infile": "tests/format4.f90", "infile_hash": "3c91cadf1851b5203fa5f2904ef5d6b588f591c535efa7325f1f2e13", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-format4-aaf60f4.stderr", "stderr_hash": "3c4c7e7bc1c826a3726a68d9ad6593d0426e0f2f724d5627ca76dab4", "returncode": 1 }lfortran-0.64.0/tests/reference/cpp-types_03-dc774f0.json0000664000175000017500000000072515227365530023125 0ustar alastairalastair{ "basename": "cpp-types_03-dc774f0", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/types_03.f90", "infile_hash": "388683b8609d91d174ceb8c24787c982bf1ea22d342e94d44457b861", "outfile": null, "outfile_hash": null, "stdout": "cpp-types_03-dc774f0.stdout", "stdout_hash": "1263bc24722b5a28a426bc3b9480c394cc2dbd0ba1ddd406d5176480", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-if2-0c3bb72.json0000664000175000017500000000071115227365530022601 0ustar alastairalastair{ "basename": "ast_f90-if2-0c3bb72", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/if2.f90", "infile_hash": "7e5997e7b3a28044e5c2899900ea795edfd628c1ed4530afdf1aea0d", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-if2-0c3bb72.stdout", "stdout_hash": "d505ab8f9410508730d2bcc0577d768fb7250379d8923bf3769b2cc6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-derived_types_45-ae31b1c.stdout0000664000175000017500000002115315227365530025435 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %derived_types_45_mod.myint.3 = type { i32 } @0 = private unnamed_addr constant [4 x i8] c"ins\00", align 1 @1 = private unnamed_addr constant [48 x i8] c"tests/../integration_tests/derived_types_45.f90\00", align 1 @2 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @3 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %ins = alloca %derived_types_45_mod.myint.3*, align 8 store %derived_types_45_mod.myint.3* null, %derived_types_45_mod.myint.3** %ins, align 8 %temp_struct_var__ = alloca %derived_types_45_mod.myint.3, align 8 %3 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %temp_struct_var__, i32 0, i32 0 %4 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %temp_struct_var__, i32 0, i32 0 store i32 44, i32* %4, align 4 %5 = load %derived_types_45_mod.myint.3*, %derived_types_45_mod.myint.3** %ins, align 8 %6 = icmp eq %derived_types_45_mod.myint.3* %5, null br i1 %6, label %then, label %else then: ; preds = %.entry %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 4) call void @llvm.memset.p0i8.i32(i8* %8, i8 0, i32 4, i1 false) %9 = bitcast i8* %8 to %derived_types_45_mod.myint.3* store %derived_types_45_mod.myint.3* %9, %derived_types_45_mod.myint.3** %ins, align 8 %10 = load %derived_types_45_mod.myint.3*, %derived_types_45_mod.myint.3** %ins, align 8 %11 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %10, i32 0, i32 0 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %12 = load %derived_types_45_mod.myint.3*, %derived_types_45_mod.myint.3** %ins, align 8 %13 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %temp_struct_var__, i32 0, i32 0 %14 = load i32, i32* %13, align 4 %15 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %12, i32 0, i32 0 br i1 true, label %then1, label %else2 then1: ; preds = %ifcont store i32 %14, i32* %15, align 4 br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %16 = load %derived_types_45_mod.myint.3*, %derived_types_45_mod.myint.3** %ins, align 8 %17 = ptrtoint %derived_types_45_mod.myint.3* %16 to i64 %18 = icmp eq i64 %17, 0 br i1 %18, label %then4, label %ifcont5 then4: ; preds = %ifcont3 %19 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %20 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %21 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %20, i32 0, i32 0 %22 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 0 store i8* getelementptr inbounds ([48 x i8], [48 x i8]* @1, i32 0, i32 0), i8** %22, align 8 %23 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 1 store i32 15, i32* %23, align 4 %24 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 2 store i32 9, i32* %24, align 4 %25 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 3 store i32 15, i32* %25, align 4 %26 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %21, i32 0, i32 4 store i32 13, i32* %26, align 4 %27 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) %28 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %19, i32 0, i32 0 %29 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %20, i32 0, i32 0 %30 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 2 %31 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 0 store i1 true, i1* %31, align 1 %32 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 1 store i8* %27, i8** %32, align 8 store { i8*, i32, i32, i32, i32 }* %29, { i8*, i32, i32, i32, i32 }** %30, align 8 %33 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %28, i32 0, i32 3 store i32 1, i32* %33, align 4 %34 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %19, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %34, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont5: ; preds = %ifcont3 %35 = getelementptr %derived_types_45_mod.myint.3, %derived_types_45_mod.myint.3* %16, i32 0, i32 0 %36 = load i32, i32* %35, align 4 %37 = icmp ne i32 %36, 44 br i1 %37, label %then6, label %else7 then6: ; preds = %ifcont5 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont8 else7: ; preds = %ifcont5 br label %ifcont8 ifcont8: ; preds = %else7, %then6 br label %return return: ; preds = %ifcont8 br label %FINALIZE_SYMTABLE_derived_types_45 FINALIZE_SYMTABLE_derived_types_45: ; preds = %return br label %Finalize_Variable_ins Finalize_Variable_ins: ; preds = %FINALIZE_SYMTABLE_derived_types_45 %38 = load %derived_types_45_mod.myint.3*, %derived_types_45_mod.myint.3** %ins, align 8 call void @finalize_allocatable__StructType__myint_3_of_derived_types_45_mod(%derived_types_45_mod.myint.3* %38) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0 declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() define internal void @finalize_allocatable__StructType__myint_3_of_derived_types_45_mod(%derived_types_45_mod.myint.3* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = icmp ne %derived_types_45_mod.myint.3* %0, null br i1 %2, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry %3 = bitcast %derived_types_45_mod.myint.3* %0 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %3) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then ret void } declare void @_lfortran_free_alloc(i8*, i8*) attributes #0 = { argmemonly nounwind willreturn writeonly } lfortran-0.64.0/tests/reference/asr-intrinsics7-d1c02a1.stderr0000664000175000017500000000030415227365530024236 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Hypot must be the same --> tests/errors/intrinsics7.f90:2:14 | 2 | print *, hypot(1.0, 2.7_8) | ^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-transfer_09-a440034.stdout0000664000175000017500000004757215227365530024023 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { transfer_09: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lhs: (Variable 2 lhs [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r1: (Variable 2 r1 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 2 rhs [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) transfer_09 [] [(Assignment (Var 2 rhs) (ArrayConstant 12 [10, 20, 30] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 2 a) (BitCast (ArrayItem (Var 2 rhs) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 2 a) () (Real 4) () ) () .false. .false. ) (Assignment (Var 2 b) (BitCast (ArrayItem (Var 2 rhs) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 2 b) () (Real 4) () ) () .false. .false. ) (Assignment (Var 2 c) (BitCast (ArrayItem (Var 2 rhs) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 2 c) () (Real 4) () ) () .false. .false. ) (Assignment (ArraySection (Var 2 r1) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] (Array (Real 4) [(() ())] DescriptorArray ) () ) (BitCast (Var 2 rhs) (Var 2 r1) () (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () ) () .false. .false. ) (Assignment (ArraySection (Var 2 lhs) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] (Array (Integer 4) [(() ())] DescriptorArray ) () ) (BitCast (Var 2 rhs) (Var 2 lhs) () (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Correct Values" (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 rhs) (Var 2 a) (Var 2 b) (Var 2 c)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Transferred Values" (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 lhs) (Var 2 r1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (LogicalBinOp (LogicalBinOp (IntegerCompare (ArrayItem (Var 2 lhs) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (ArrayItem (Var 2 rhs) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Logical 4) () ) Or (IntegerCompare (ArrayItem (Var 2 lhs) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (ArrayItem (Var 2 rhs) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Logical 4) () ) (Logical 4) () ) Or (IntegerCompare (ArrayItem (Var 2 lhs) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (ArrayItem (Var 2 rhs) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (LogicalBinOp (RealCompare (ArrayItem (Var 2 r1) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) NotEq (Var 2 a) (Logical 4) () ) Or (RealCompare (ArrayItem (Var 2 r1) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) NotEq (Var 2 b) (Logical 4) () ) (Logical 4) () ) Or (RealCompare (ArrayItem (Var 2 r1) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) NotEq (Var 2 c) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-attributes1-25126f0.json0000664000175000017500000000074115227365530024236 0ustar alastairalastair{ "basename": "ast_f90-attributes1-25126f0", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/attributes1.f90", "infile_hash": "895bd51041a1a5b92a95e7ae70f7475a5b305fdd6f8fcd525a30f46a", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-attributes1-25126f0.stdout", "stdout_hash": "b9e16c4afd812d7ebbce72a3da771f01cf60036efb15d7e5e73e9cea", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-end_submodule_name-68b3188.stderr0000664000175000017500000000040415227365530025502 0ustar alastairalastairsyntax error: End submodule name does not match submodule name --> tests/errors/end_submodule_name.f90:17:1 - 24:17 | 17 | submodule (mother) daughter | ^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 24 | end submodule son | ...^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-implicit1-e201262.json0000664000175000017500000000104015227365530023171 0ustar alastairalastair{ "basename": "ast-implicit1-e201262", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/implicit1.f90", "infile_hash": "8f316b7b5813cd7d2f663bd9aac929c0d2fdb42eccdc2ac798b0c3d5", "outfile": null, "outfile_hash": null, "stdout": "ast-implicit1-e201262.stdout", "stdout_hash": "6f8c276efeb3e34064a8bea0f00cf4fe1e86341321e4026c644dec76", "stderr": "ast-implicit1-e201262.stderr", "stderr_hash": "7040f573fd98c40ed1387403ecf33f749ead9159a50668621b3fb8ca", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-expr1-e0e6d6b.json0000664000175000017500000000070415227365530022573 0ustar alastairalastair{ "basename": "asr-expr1-e0e6d6b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr1.f90", "infile_hash": "3c49cb3157ec3feaf0f97156e5c11dca0ffd6481c97bb1a5dffaa14f", "outfile": null, "outfile_hash": null, "stdout": "asr-expr1-e0e6d6b.stdout", "stdout_hash": "87e8c124dc6636b5850e9cb14d78e25a20a1837c2afe9f39fbce1a50", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-automatic_allocation_02-2a7afc4.stdout0000664000175000017500000011305215227365530026763 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %complex_4 = type <{ float, float }> @0 = private unnamed_addr constant [2 x i8] c"i\00", align 1 @1 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @2 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @3 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"r\00", align 1 @5 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @6 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @7 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"c\00", align 1 @9 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @10 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @11 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"l\00", align 1 @13 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @14 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @15 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @16 = private unnamed_addr constant [2 x i8] c"i\00", align 1 @17 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @18 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @19 = private unnamed_addr constant [32 x i8] c"Variable '%s' is not allocated.\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @21 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @22 = private unnamed_addr constant [2 x i8] c"r\00", align 1 @23 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @24 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @25 = private unnamed_addr constant [32 x i8] c"Variable '%s' is not allocated.\00", align 1 @26 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @27 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @28 = private unnamed_addr constant [2 x i8] c"c\00", align 1 @29 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @30 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @31 = private unnamed_addr constant [32 x i8] c"Variable '%s' is not allocated.\00", align 1 @32 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @33 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @34 = private unnamed_addr constant [2 x i8] c"l\00", align 1 @35 = private unnamed_addr constant [55 x i8] c"tests/../integration_tests/automatic_allocation_02.f90\00", align 1 @36 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @37 = private unnamed_addr constant [32 x i8] c"Variable '%s' is not allocated.\00", align 1 @38 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @39 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %c = alloca %complex_4*, align 8 store %complex_4* null, %complex_4** %c, align 8 %i = alloca i32*, align 8 store i32* null, i32** %i, align 8 %l = alloca i32*, align 8 store i32* null, i32** %l, align 8 %r = alloca float*, align 8 store float* null, float** %r, align 8 %3 = load i32*, i32** %i, align 8 %4 = icmp eq i32* %3, null br i1 %4, label %then, label %else then: ; preds = %.entry %5 = load i32*, i32** %i, align 8 %6 = ptrtoint i32* %5 to i64 %7 = icmp ne i64 %6, 0 br i1 %7, label %then1, label %ifcont then1: ; preds = %then %8 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %9 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %10 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %9, i32 0, i32 0 %11 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %10, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @1, i32 0, i32 0), i8** %11, align 8 %12 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %10, i32 0, i32 1 store i32 9, i32* %12, align 4 %13 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %10, i32 0, i32 2 store i32 5, i32* %13, align 4 %14 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %10, i32 0, i32 3 store i32 9, i32* %14, align 4 %15 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %10, i32 0, i32 4 store i32 5, i32* %15, align 4 %16 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) %17 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %8, i32 0, i32 0 %18 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %9, i32 0, i32 0 %19 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %17, i32 0, i32 2 %20 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %17, i32 0, i32 0 store i1 true, i1* %20, align 1 %21 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %17, i32 0, i32 1 store i8* %16, i8** %21, align 8 store { i8*, i32, i32, i32, i32 }* %18, { i8*, i32, i32, i32, i32 }** %19, align 8 %22 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %17, i32 0, i32 3 store i32 1, i32* %22, align 4 %23 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %8, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %23, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont: ; preds = %then %24 = call i8* @_lfortran_get_default_allocator() %25 = call i8* @_lfortran_malloc_alloc(i8* %24, i64 4) call void @llvm.memset.p0i8.i32(i8* %25, i8 0, i32 4, i1 false) %26 = bitcast i8* %25 to i32* store i32* %26, i32** %i, align 8 br label %ifcont2 else: ; preds = %.entry br label %ifcont2 ifcont2: ; preds = %else, %ifcont %27 = load i32*, i32** %i, align 8 store i32 10, i32* %27, align 4 %28 = load float*, float** %r, align 8 %29 = icmp eq float* %28, null br i1 %29, label %then3, label %else6 then3: ; preds = %ifcont2 %30 = load float*, float** %r, align 8 %31 = ptrtoint float* %30 to i64 %32 = icmp ne i64 %31, 0 br i1 %32, label %then4, label %ifcont5 then4: ; preds = %then3 %33 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %34 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %35 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %34, i32 0, i32 0 %36 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %35, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @5, i32 0, i32 0), i8** %36, align 8 %37 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %35, i32 0, i32 1 store i32 10, i32* %37, align 4 %38 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %35, i32 0, i32 2 store i32 5, i32* %38, align 4 %39 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %35, i32 0, i32 3 store i32 10, i32* %39, align 4 %40 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %35, i32 0, i32 4 store i32 5, i32* %40, align 4 %41 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) %42 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %33, i32 0, i32 0 %43 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %34, i32 0, i32 0 %44 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %42, i32 0, i32 2 %45 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %42, i32 0, i32 0 store i1 true, i1* %45, align 1 %46 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %42, i32 0, i32 1 store i8* %41, i8** %46, align 8 store { i8*, i32, i32, i32, i32 }* %43, { i8*, i32, i32, i32, i32 }** %44, align 8 %47 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %42, i32 0, i32 3 store i32 1, i32* %47, align 4 %48 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %33, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %48, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont5: ; preds = %then3 %49 = call i8* @_lfortran_get_default_allocator() %50 = call i8* @_lfortran_malloc_alloc(i8* %49, i64 4) call void @llvm.memset.p0i8.i32(i8* %50, i8 0, i32 4, i1 false) %51 = bitcast i8* %50 to float* store float* %51, float** %r, align 8 br label %ifcont7 else6: ; preds = %ifcont2 br label %ifcont7 ifcont7: ; preds = %else6, %ifcont5 %52 = load float*, float** %r, align 8 store float 0x40119999A0000000, float* %52, align 4 %53 = load %complex_4*, %complex_4** %c, align 8 %54 = icmp eq %complex_4* %53, null br i1 %54, label %then8, label %else11 then8: ; preds = %ifcont7 %55 = load %complex_4*, %complex_4** %c, align 8 %56 = ptrtoint %complex_4* %55 to i64 %57 = icmp ne i64 %56, 0 br i1 %57, label %then9, label %ifcont10 then9: ; preds = %then8 %58 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %59 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %60 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %59, i32 0, i32 0 %61 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %60, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @9, i32 0, i32 0), i8** %61, align 8 %62 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %60, i32 0, i32 1 store i32 11, i32* %62, align 4 %63 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %60, i32 0, i32 2 store i32 5, i32* %63, align 4 %64 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %60, i32 0, i32 3 store i32 11, i32* %64, align 4 %65 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %60, i32 0, i32 4 store i32 5, i32* %65, align 4 %66 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @10, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) %67 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %58, i32 0, i32 0 %68 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %59, i32 0, i32 0 %69 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %67, i32 0, i32 2 %70 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %67, i32 0, i32 0 store i1 true, i1* %70, align 1 %71 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %67, i32 0, i32 1 store i8* %66, i8** %71, align 8 store { i8*, i32, i32, i32, i32 }* %68, { i8*, i32, i32, i32, i32 }** %69, align 8 %72 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %67, i32 0, i32 3 store i32 1, i32* %72, align 4 %73 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %58, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %73, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont10: ; preds = %then8 %74 = call i8* @_lfortran_get_default_allocator() %75 = call i8* @_lfortran_malloc_alloc(i8* %74, i64 8) call void @llvm.memset.p0i8.i32(i8* %75, i8 0, i32 8, i1 false) %76 = bitcast i8* %75 to %complex_4* store %complex_4* %76, %complex_4** %c, align 8 br label %ifcont12 else11: ; preds = %ifcont7 br label %ifcont12 ifcont12: ; preds = %else11, %ifcont10 %77 = load %complex_4*, %complex_4** %c, align 8 store %complex_4 <{ float 1.000000e+00, float 2.000000e+00 }>, %complex_4* %77, align 1 %78 = load i32*, i32** %l, align 8 %79 = icmp eq i32* %78, null br i1 %79, label %then13, label %else16 then13: ; preds = %ifcont12 %80 = load i32*, i32** %l, align 8 %81 = ptrtoint i32* %80 to i64 %82 = icmp ne i64 %81, 0 br i1 %82, label %then14, label %ifcont15 then14: ; preds = %then13 %83 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %84 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %85 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %84, i32 0, i32 0 %86 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %85, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @13, i32 0, i32 0), i8** %86, align 8 %87 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %85, i32 0, i32 1 store i32 12, i32* %87, align 4 %88 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %85, i32 0, i32 2 store i32 5, i32* %88, align 4 %89 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %85, i32 0, i32 3 store i32 12, i32* %89, align 4 %90 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %85, i32 0, i32 4 store i32 5, i32* %90, align 4 %91 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) %92 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %83, i32 0, i32 0 %93 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %84, i32 0, i32 0 %94 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %92, i32 0, i32 2 %95 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %92, i32 0, i32 0 store i1 true, i1* %95, align 1 %96 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %92, i32 0, i32 1 store i8* %91, i8** %96, align 8 store { i8*, i32, i32, i32, i32 }* %93, { i8*, i32, i32, i32, i32 }** %94, align 8 %97 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %92, i32 0, i32 3 store i32 1, i32* %97, align 4 %98 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %83, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %98, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont15: ; preds = %then13 %99 = call i8* @_lfortran_get_default_allocator() %100 = call i8* @_lfortran_malloc_alloc(i8* %99, i64 4) call void @llvm.memset.p0i8.i32(i8* %100, i8 0, i32 4, i1 false) %101 = bitcast i8* %100 to i32* store i32* %101, i32** %l, align 8 br label %ifcont17 else16: ; preds = %ifcont12 br label %ifcont17 ifcont17: ; preds = %else16, %ifcont15 %102 = load i32*, i32** %l, align 8 store i32 1, i32* %102, align 4 %103 = load i32*, i32** %i, align 8 %104 = ptrtoint i32* %103 to i64 %105 = icmp eq i64 %104, 0 br i1 %105, label %then18, label %ifcont19 then18: ; preds = %ifcont17 %106 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %107 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %108 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %107, i32 0, i32 0 %109 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %108, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @17, i32 0, i32 0), i8** %109, align 8 %110 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %108, i32 0, i32 1 store i32 4, i32* %110, align 4 %111 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %108, i32 0, i32 2 store i32 29, i32* %111, align 4 %112 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %108, i32 0, i32 3 store i32 4, i32* %112, align 4 %113 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %108, i32 0, i32 4 store i32 29, i32* %113, align 4 %114 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @18, i32 0, i32 0)) %115 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %106, i32 0, i32 0 %116 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %107, i32 0, i32 0 %117 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %115, i32 0, i32 2 %118 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %115, i32 0, i32 0 store i1 true, i1* %118, align 1 %119 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %115, i32 0, i32 1 store i8* %114, i8** %119, align 8 store { i8*, i32, i32, i32, i32 }* %116, { i8*, i32, i32, i32, i32 }** %117, align 8 %120 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %115, i32 0, i32 3 store i32 1, i32* %120, align 4 %121 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %106, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %121, i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @16, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont19: ; preds = %ifcont17 %122 = load i32*, i32** %i, align 8 %123 = load i32, i32* %122, align 4 %124 = icmp ne i32 %123, 10 br i1 %124, label %then20, label %else21 then20: ; preds = %ifcont19 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont22 else21: ; preds = %ifcont19 br label %ifcont22 ifcont22: ; preds = %else21, %then20 %125 = load float*, float** %r, align 8 %126 = ptrtoint float* %125 to i64 %127 = icmp eq i64 %126, 0 br i1 %127, label %then23, label %ifcont24 then23: ; preds = %ifcont22 %128 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %129 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %130 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %129, i32 0, i32 0 %131 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %130, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @23, i32 0, i32 0), i8** %131, align 8 %132 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %130, i32 0, i32 1 store i32 5, i32* %132, align 4 %133 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %130, i32 0, i32 2 store i32 26, i32* %133, align 4 %134 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %130, i32 0, i32 3 store i32 5, i32* %134, align 4 %135 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %130, i32 0, i32 4 store i32 26, i32* %135, align 4 %136 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @24, i32 0, i32 0)) %137 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %128, i32 0, i32 0 %138 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %129, i32 0, i32 0 %139 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %137, i32 0, i32 2 %140 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %137, i32 0, i32 0 store i1 true, i1* %140, align 1 %141 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %137, i32 0, i32 1 store i8* %136, i8** %141, align 8 store { i8*, i32, i32, i32, i32 }* %138, { i8*, i32, i32, i32, i32 }** %139, align 8 %142 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %137, i32 0, i32 3 store i32 1, i32* %142, align 4 %143 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %128, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %143, i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont24: ; preds = %ifcont22 %144 = load float*, float** %r, align 8 %145 = load float, float* %144, align 4 %146 = fcmp une float %145, 0x40119999A0000000 br i1 %146, label %then25, label %else26 then25: ; preds = %ifcont24 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @26, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont27 else26: ; preds = %ifcont24 br label %ifcont27 ifcont27: ; preds = %else26, %then25 %147 = load %complex_4*, %complex_4** %c, align 8 %148 = ptrtoint %complex_4* %147 to i64 %149 = icmp eq i64 %148, 0 br i1 %149, label %then28, label %ifcont29 then28: ; preds = %ifcont27 %150 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %151 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %152 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %151, i32 0, i32 0 %153 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %152, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @29, i32 0, i32 0), i8** %153, align 8 %154 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %152, i32 0, i32 1 store i32 6, i32* %154, align 4 %155 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %152, i32 0, i32 2 store i32 29, i32* %155, align 4 %156 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %152, i32 0, i32 3 store i32 6, i32* %156, align 4 %157 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %152, i32 0, i32 4 store i32 29, i32* %157, align 4 %158 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @30, i32 0, i32 0)) %159 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %150, i32 0, i32 0 %160 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %151, i32 0, i32 0 %161 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %159, i32 0, i32 2 %162 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %159, i32 0, i32 0 store i1 true, i1* %162, align 1 %163 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %159, i32 0, i32 1 store i8* %158, i8** %163, align 8 store { i8*, i32, i32, i32, i32 }* %160, { i8*, i32, i32, i32, i32 }** %161, align 8 %164 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %159, i32 0, i32 3 store i32 1, i32* %164, align 4 %165 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %150, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %165, i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @31, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont29: ; preds = %ifcont27 %166 = load %complex_4*, %complex_4** %c, align 8 %167 = load %complex_4, %complex_4* %166, align 1 %168 = extractvalue %complex_4 %167, 0 %169 = extractvalue %complex_4 %167, 1 %170 = fcmp one float %168, 1.000000e+00 %171 = fcmp one float %169, 2.000000e+00 %172 = or i1 %170, %171 br i1 %172, label %then30, label %else31 then30: ; preds = %ifcont29 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @32, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont32 else31: ; preds = %ifcont29 br label %ifcont32 ifcont32: ; preds = %else31, %then30 %173 = load i32*, i32** %l, align 8 %174 = ptrtoint i32* %173 to i64 %175 = icmp eq i64 %174, 0 br i1 %175, label %then33, label %ifcont34 then33: ; preds = %ifcont32 %176 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %177 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %178 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %177, i32 0, i32 0 %179 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %178, i32 0, i32 0 store i8* getelementptr inbounds ([55 x i8], [55 x i8]* @35, i32 0, i32 0), i8** %179, align 8 %180 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %178, i32 0, i32 1 store i32 7, i32* %180, align 4 %181 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %178, i32 0, i32 2 store i32 29, i32* %181, align 4 %182 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %178, i32 0, i32 3 store i32 7, i32* %182, align 4 %183 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %178, i32 0, i32 4 store i32 29, i32* %183, align 4 %184 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @36, i32 0, i32 0)) %185 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %176, i32 0, i32 0 %186 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %177, i32 0, i32 0 %187 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %185, i32 0, i32 2 %188 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %185, i32 0, i32 0 store i1 true, i1* %188, align 1 %189 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %185, i32 0, i32 1 store i8* %184, i8** %189, align 8 store { i8*, i32, i32, i32, i32 }* %186, { i8*, i32, i32, i32, i32 }** %187, align 8 %190 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %185, i32 0, i32 3 store i32 1, i32* %190, align 4 %191 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %176, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %191, i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @37, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @34, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont34: ; preds = %ifcont32 %192 = load i32*, i32** %l, align 8 %193 = load i32, i32* %192, align 4 %194 = xor i32 %193, 1 %195 = icmp ne i32 %194, 0 br i1 %195, label %then35, label %else36 then35: ; preds = %ifcont34 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @39, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @38, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont37 else36: ; preds = %ifcont34 br label %ifcont37 ifcont37: ; preds = %else36, %then35 %196 = load i32*, i32** %i, align 8 %197 = ptrtoint i32* %196 to i64 %198 = icmp ne i64 %197, 0 br i1 %198, label %then38, label %else39 then38: ; preds = %ifcont37 %199 = alloca i8*, align 8 %200 = bitcast i32* %196 to i8* store i8* %200, i8** %199, align 8 %201 = load i8*, i8** %199, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %201) store i32* null, i32** %i, align 8 br label %ifcont40 else39: ; preds = %ifcont37 br label %ifcont40 ifcont40: ; preds = %else39, %then38 %202 = load float*, float** %r, align 8 %203 = ptrtoint float* %202 to i64 %204 = icmp ne i64 %203, 0 br i1 %204, label %then41, label %else42 then41: ; preds = %ifcont40 %205 = alloca i8*, align 8 %206 = bitcast float* %202 to i8* store i8* %206, i8** %205, align 8 %207 = load i8*, i8** %205, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %207) store float* null, float** %r, align 8 br label %ifcont43 else42: ; preds = %ifcont40 br label %ifcont43 ifcont43: ; preds = %else42, %then41 %208 = load %complex_4*, %complex_4** %c, align 8 %209 = ptrtoint %complex_4* %208 to i64 %210 = icmp ne i64 %209, 0 br i1 %210, label %then44, label %else45 then44: ; preds = %ifcont43 %211 = alloca i8*, align 8 %212 = bitcast %complex_4* %208 to i8* store i8* %212, i8** %211, align 8 %213 = load i8*, i8** %211, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %213) store %complex_4* null, %complex_4** %c, align 8 br label %ifcont46 else45: ; preds = %ifcont43 br label %ifcont46 ifcont46: ; preds = %else45, %then44 %214 = load i32*, i32** %l, align 8 %215 = ptrtoint i32* %214 to i64 %216 = icmp ne i64 %215, 0 br i1 %216, label %then47, label %else48 then47: ; preds = %ifcont46 %217 = alloca i8*, align 8 %218 = bitcast i32* %214 to i8* store i8* %218, i8** %217, align 8 %219 = load i8*, i8** %217, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %219) store i32* null, i32** %l, align 8 br label %ifcont49 else48: ; preds = %ifcont46 br label %ifcont49 ifcont49: ; preds = %else48, %then47 br label %return return: ; preds = %ifcont49 br label %FINALIZE_SYMTABLE_automatic_allocation_02 FINALIZE_SYMTABLE_automatic_allocation_02: ; preds = %return br label %Finalize_Variable_c Finalize_Variable_c: ; preds = %FINALIZE_SYMTABLE_automatic_allocation_02 %220 = load %complex_4*, %complex_4** %c, align 8 %221 = bitcast %complex_4* %220 to i8* call void @_lfortran_free_alloc(i8* %2, i8* %221) br label %Finalize_Variable_i Finalize_Variable_i: ; preds = %Finalize_Variable_c %222 = load i32*, i32** %i, align 8 %223 = bitcast i32* %222 to i8* call void @_lfortran_free_alloc(i8* %2, i8* %223) br label %Finalize_Variable_l Finalize_Variable_l: ; preds = %Finalize_Variable_i %224 = load i32*, i32** %l, align 8 %225 = bitcast i32* %224 to i8* call void @_lfortran_free_alloc(i8* %2, i8* %225) br label %Finalize_Variable_r Finalize_Variable_r: ; preds = %Finalize_Variable_l %226 = load float*, float** %r, align 8 %227 = bitcast float* %226 to i8* call void @_lfortran_free_alloc(i8* %2, i8* %227) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare i8* @_lfortran_malloc_alloc(i8*, i64) ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0 declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @_lfortran_free_alloc(i8*, i8*) attributes #0 = { argmemonly nounwind willreturn writeonly } lfortran-0.64.0/tests/reference/run-format_29-75ca0a0.stdout0000664000175000017500000000034315227365530023632 0ustar alastairalastair 1.2346 12.3456 123.4560 0.1235 0.0012 x=0.001234 0.001234 1.234000 x=123456.0 123456.00 1234.56 x=-9.876 -9.876 -987.600 0.1235 123.4567 12345.67 9.9999 99.9990 0.000010 0.100000 lfortran-0.64.0/tests/reference/asr-dimension_01-2172e76.json0000664000175000017500000000074015227365530023603 0ustar alastairalastair{ "basename": "asr-dimension_01-2172e76", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dimension_01.f90", "infile_hash": "0a6954d8790d6aca192ed8950554bda2671bec782ab05c87c7a74912", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dimension_01-2172e76.stderr", "stderr_hash": "9b74d99f78462b1b6e613732abfbf556364eb63270d82813b234b3d5", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-submodule_01-198736c.json0000664000175000017500000000074015227365530023624 0ustar alastairalastair{ "basename": "asr-submodule_01-198736c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/submodule_01.f90", "infile_hash": "e2738a16d41b50655f9aadcb09a0752dec5565a2ae749495d540d417", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-submodule_01-198736c.stderr", "stderr_hash": "6275283f1afb119c322a31f2e1fecdaa9a5f46e5070b2be671baba8f", "returncode": 2 }lfortran-0.64.0/tests/reference/cpp-case_05-96724df.json0000664000175000017500000000072215227365530022622 0ustar alastairalastair{ "basename": "cpp-case_05-96724df", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/case_05.f90", "infile_hash": "914477f4a376baf0341e522d2109b6108238cd1d9dfecf969283ab79", "outfile": null, "outfile_hash": null, "stdout": "cpp-case_05-96724df.stdout", "stdout_hash": "a15dd4d337a830a428e125ff53e362f981362b035d9606d9c75979aa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-allocatable_component_unnamed_unallocated_01-9346375.json0000664000175000017500000000106615227365530032175 0ustar alastairalastair{ "basename": "run-allocatable_component_unnamed_unallocated_01-9346375", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/allocatable_component_unnamed_unallocated_01.f90", "infile_hash": "30f5f138e7c36a574f6802a9710c25fce0150b498ad207715f686d9f", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-allocatable_component_unnamed_unallocated_01-9346375.stderr", "stderr_hash": "36bd43e5a0903e0af06a5b9e945f999db819710a97ea2d48c8b51bce", "returncode": 1 }lfortran-0.64.0/tests/reference/ast-line_continuation_01-17bec82.json0000664000175000017500000000100615227365530025473 0ustar alastairalastair{ "basename": "ast-line_continuation_01-17bec82", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/line_continuation_01.f90", "infile_hash": "2a3deedd84166a5c17971c7072fd910ec8e0ef6830db82f44f19a430", "outfile": null, "outfile_hash": null, "stdout": "ast-line_continuation_01-17bec82.stdout", "stdout_hash": "a646d1b0ab9cfa9627568937763dec1602a56de0bd2d945de144bc73", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_nested_vars-nested_namelist_01-c1be094.stdout0000664000175000017500000004204415227365530030260 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { __lcompilers_created__nested_context__outer_: (Module (SymbolTable 6 { i: (Variable 6 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), nml: (Namelist 6 nml [6 i 6 x] ), x: (Variable 6 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __lcompilers_created__nested_context__outer_ () [] .false. .false. .false. ), nested_namelist_01: (Program (SymbolTable 5 { outer: (ExternalSymbol 5 outer 2 outer nested_namelist_01_mod [] outer Public ) }) nested_namelist_01 [nested_namelist_01_mod] [(SubroutineCall 5 outer () [] () .false. )] ), nested_namelist_01_mod: (Module (SymbolTable 2 { outer: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i_nested_ctx: (ExternalSymbol 3 i_nested_ctx 6 i __lcompilers_created__nested_context__outer_ [] i Public ), inner: (Function (SymbolTable 4 { lfortran_iomsg: (Variable 4 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), nml: (ExternalSymbol 4 nml 6 nml __lcompilers_created__nested_context__outer_ [] nml Public ) }) inner (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 4 lfortran_iomsg) () () [] () () () .false. 4 nml () () () )] () Public .true. .true. () ), nml: (Namelist 3 nml [3 i 3 x] ), x: (Variable 3 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x_nested_ctx: (ExternalSymbol 3 x_nested_ctx 6 x __lcompilers_created__nested_context__outer_ [] x Public ) }) outer (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 i) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 x) (RealConstant 3.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 3 i_nested_ctx) (Var 3 i) () .false. .false. ) (Assignment (Var 3 x_nested_ctx) (Var 3 x) () .false. .false. ) (SubroutineCall 3 inner () [] () .false. ) (Assignment (Var 3 i) (Var 3 i_nested_ctx) () .false. .false. ) (Assignment (Var 3 x) (Var 3 x_nested_ctx) () .false. .false. )] () Public .true. .true. () ) }) nested_namelist_01_mod () [] .false. .false. .false. ) }) [] ) ././@LongLink0000644000000000000000000000017000000000000011601 Lustar rootrootlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-modules_39-906d6cb.stdoutlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-module0000664000175000017500000010303015227365530034776 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_39: (Program (SymbolTable 8 { build_model: (ExternalSymbol 8 build_model 2 build_model modules_39_fpm_39 [] build_model Public ), join_path: (ExternalSymbol 8 join_path 4 join_path modules_39_module_fpm_filesystem_39 [] join_path Public ) }) modules_39 [modules_39_fpm_39 modules_39_module_fpm_filesystem_39] [(SubroutineCall 8 build_model () [] () .false. ) (Print (StringConstant "executing modules_39" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ), modules_39_fpm_39: (Module (SymbolTable 2 { build_model: (Function (SymbolTable 7 { __libasr_created_variable_: (Variable 7 __libasr_created_variable_ [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_1: (Variable 7 __libasr_created_variable_1 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_2: (Variable 7 __libasr_created_variable_2 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) build_model (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(SubroutineCall 2 filewrite_string____1 2 filewrite_string____1 [((FunctionCall 2 join_path () [((StringConstant "build" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant ".gitignore" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 7 __libasr_created_variable_)) ((LogicalConstant .false. (Logical 4) )) ((Var 7 __libasr_created_variable_1)) ((LogicalConstant .false. (Logical 4) )) ((Var 7 __libasr_created_variable_2)) ((LogicalConstant .false. (Logical 4) ))] (Allocatable (String 1 () DeferredLength DescriptorString) ) () () )) ((ArrayConstant 1 ["*"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] PointerArray ) ColMajor )) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. )] () Public .true. .true. () ), filewrite_string____1: (ExternalSymbol 2 filewrite_string____1 4 filewrite_string____1 modules_39_module_fpm_filesystem_39 [] filewrite_string____1 Public ), join_path: (ExternalSymbol 2 join_path 4 join_path modules_39_module_fpm_filesystem_39 [] join_path Public ) }) modules_39_fpm_39 () [modules_39_module_fpm_filesystem_39] .false. .false. .false. ), modules_39_module_fpm_filesystem_39: (Module (SymbolTable 4 { filewrite_string____1: (Function (SymbolTable 9 { __1filedata: (Variable 9 __1filedata [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), filedata: (Variable 9 filedata [__1filedata] In () () Default (Array (String 1 () AssumedLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (Var 9 __1filedata))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), filename: (Variable 9 filename [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) filewrite_string____1 (FunctionType [(String 1 () AssumedLength DescriptorString) (Array (String 1 () AssumedLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 2 (Integer 4) () ))] PointerArray ) (Integer 4)] () Source Implementation "" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 filename) (Var 9 filedata) (Var 9 __1filedata)] [] () Public .false. .false. () ), join_path: (Function (SymbolTable 6 { __libasr_is_present_a3: (Variable 6 __libasr_is_present_a3 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_a4: (Variable 6 __libasr_is_present_a4 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_a5: (Variable 6 __libasr_is_present_a5 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a1: (Variable 6 a1 [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a2: (Variable 6 a2 [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a3: (Variable 6 a3 [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a4: (Variable 6 a4 [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a5: (Variable 6 a5 [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 6 path [] ReturnVar () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) join_path (FunctionType [(String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (Logical 4) (String 1 () AssumedLength DescriptorString) (Logical 4) (String 1 () AssumedLength DescriptorString) (Logical 4)] (Allocatable (String 1 () DeferredLength DescriptorString) ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 a1) (Var 6 a2) (Var 6 a3) (Var 6 __libasr_is_present_a3) (Var 6 a4) (Var 6 __libasr_is_present_a4) (Var 6 a5) (Var 6 __libasr_is_present_a5)] [] (Var 6 path) Public .true. .true. () ) }) modules_39_module_fpm_filesystem_39 () [] .true. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form_with_exit-0c669e6.stdout0000664000175000017500000000161715227365530026170 0ustar alastairalastair(TranslationUnit [(Subroutine example [] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(DoLoop 0 () 0 i 2 8 () [(If 0 () (== i 2) [(Exit 0 () () )] [] () () () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-idint_real4-b5321a5.stderr0000664000175000017500000000025015227365530024107 0ustar alastairalastairsemantic error: first argument of `idint` must have kind equal to 8 --> tests/errors/idint_real4.f90:2:14 | 2 | print *, idint(4.5) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-program_without_line_05-1440b57.json0000664000175000017500000000100115227365530026045 0ustar alastairalastair{ "basename": "ast-program_without_line_05-1440b57", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/program_without_line_05.f90", "infile_hash": "808db970dd0ce4b65d56b9efbf2954ddc7f7a1c09417a583b2fce88a", "outfile": null, "outfile_hash": null, "stdout": "ast-program_without_line_05-1440b57.stdout", "stdout_hash": "6ee9a73b40d16d6c1602f39dd4d1d697cb02c3cd8afa0b4285f7824f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_04_func-9f59ad6.stdout0000664000175000017500000005470015227365530024665 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_04_func: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), abs: (Function (SymbolTable 4 { a: (Variable 4 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 4 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) abs (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 a)] [(Print (StringConstant "abs" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (If () (RealCompare (Var 4 a) Gt (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 0.000000 (Real 4) ) () ) (Logical 4) () ) [(Assignment (Var 4 r) (Var 4 a) () .false. .false. )] [(Assignment (Var 4 r) (RealUnaryMinus (Var 4 a) (Real 4) () ) () .false. .false. )] )] (Var 4 r) Public .false. .false. () ), b: (Variable 2 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sum: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 3 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sum (FunctionType [(Array (Real 4) [(() ())] DescriptorArray )] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a)] [(Print (StringConstant "sum" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Assignment (Var 3 r) (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 0.000000 (Real 4) ) () ) () .false. .false. ) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 3 a) () (Integer 4) () ) ()) [(Assignment (Var 3 r) (RealBinOp (Var 3 r) Add (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Real 4) ColMajor () ) (Real 4) () ) () .false. .false. )] [] )] (Var 3 r) Public .false. .false. () ) }) arrays_04_func [] [(Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 3.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 b) (FunctionCall 2 sum () [((ArrayPhysicalCast (Var 2 a) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] DescriptorArray ) () ))] (Real 4) () () ) () .false. .false. ) (If () (RealCompare (FunctionCall 2 abs () [((RealBinOp (Var 2 b) Sub (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 6.000000 (Real 4) ) () ) (Real 4) () ))] (Real 4) () () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_03-ef06d46.json0000664000175000017500000000076115227365530024151 0ustar alastairalastair{ "basename": "asr-intrinsics_03-ef06d46", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_03.f90", "infile_hash": "e7fb61db3237594018e226a4236884f778bd41ae0848c5667da97462", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_03-ef06d46.stdout", "stdout_hash": "7389e319d03fc3fbff40890332b13348eeb55bdba536017e1101f1f5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dlgama_arg-bfbc025.stderr0000664000175000017500000000026015227365530024131 0ustar alastairalastairsemantic error: Argument 1 of dlgama must be of double precision real type --> tests/errors/dlgama_arg.f90:2:14 | 2 | print *, dlgama(2.7) | ^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast_f90-flush1-1eb6a16.json0000664000175000017500000000072215227365530023330 0ustar alastairalastair{ "basename": "ast_f90-flush1-1eb6a16", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/flush1.f90", "infile_hash": "d0c80e1628d5fabcef4bf73ec7d228e08c9d37462c1a3bd0f08481d8", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-flush1-1eb6a16.stdout", "stdout_hash": "a40a28bcf97c7b1f6b2fa764363a1ce06bdcccead4f89d7ecab10aaf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dependency_test_02-6d588ae.json0000664000175000017500000000075315227365530025147 0ustar alastairalastair{ "basename": "asr-dependency_test_02-6d588ae", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/dependency_test_02.f90", "infile_hash": "90fabf0105e9eee8d7001500b590bff2970e15d4abc43074d77349f1", "outfile": null, "outfile_hash": null, "stdout": "asr-dependency_test_02-6d588ae.stdout", "stdout_hash": "6b1d8596624a0593609ca23446dfe686f916a45ebac377449f81fef6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-auxiliary_IO_1-36af6ad.stdout0000664000175000017500000000240215227365530024721 0ustar alastairalastair(TranslationUnit [(Subroutine xub [(nunit)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(nunit [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(DoLoop 0 () 0 i 1 5 () [(Backspace 0 [nunit] [] () ) (Rewind 0 [nunit] [] () )] () () )] [] [] ) (Program main () [] [] [] [] [] )] ) lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope3-a36d20b.json0000664000175000017500000000101415227365530027104 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope3-a36d20b", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope3.f90", "infile_hash": "60cea65abfbb2228d16f175ea192462ae2379d7a9da1601cb3de9f3a", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope3-a36d20b.stdout", "stdout_hash": "baaf51c3a08267784186cb005c1037a2a16cc2c2500388ceb23dc1e9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-use_statement-bb26ff2.stdout0000664000175000017500000001236215227365530024770 0ustar alastairalastair(TranslationUnit [(Program use_statement (TriviaNode [(EndOfLine) (Comment "! AST" ) (Comment "! Syntax check only" )] [] ) [(Use [(SimpleAttribute AttrIntrinsic )] example [(UseSymbol rename name ) (UseSymbol RENAME NAME )] .true. () ) (Use [(SimpleAttribute AttrIntrinsic )] example [(IntrinsicOperator POW )] .true. () ) (Use [(SimpleAttribute AttrIntrinsic )] example [(IntrinsicOperator NOT )] .true. () ) (Use [(SimpleAttribute AttrIntrinsic )] example [(DefinedOperator "in" )] .true. () ) (Use [(SimpleAttribute AttrIntrinsic )] example [(RenameOperator "plus" "add" )] .true. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] example [] .false. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] EXAMPLE [] .false. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] example [(UseAssignment)] .true. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] example [(IntrinsicOperator EQ )] .true. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] example [(IntrinsicOperator OR )] .true. () ) (Use [(SimpleAttribute AttrNon_Intrinsic )] example [(DefinedOperator "definedoperator" )] .true. () ) (Use [] example [(IntrinsicOperator PLUS )] .true. () ) (Use [] example [(UseSymbol sample () )] .true. () ) (Use [] example [(UseSymbol rename sample )] .true. () ) (Use [] example [(IntrinsicOperator STAR )] .true. () ) (Use [] example [(IntrinsicOperator DIV )] .true. () ) (Use [] example [(IntrinsicOperator DIV )] .true. () ) (Use [] example [(IntrinsicOperator NOTEQ )] .true. () ) (Use [] example [(IntrinsicOperator GT )] .true. () ) (Use [] example [(IntrinsicOperator LTE )] .true. () ) (Use [] example [(IntrinsicOperator AND )] .true. () ) (Use [] example [(IntrinsicOperator EQV )] .true. () ) (Use [] example [(DefinedOperator "dot" )] .true. () ) (Use [] example [(UseWrite formatted )] .true. () ) (Use [] example [(UseRead unformatted )] .true. () ) (Use [] example [] .true. () ) (Use [] example [(RenameOperator "localDefop" "useDefop" ) (UseSymbol b a )] .false. () )] [] [] [] [] )] ) lfortran-0.64.0/tests/reference/pass_global_stmts-expr4-eea496b.stdout0000664000175000017500000002732315227365530026114 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] Local () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f2: (Variable 2 f2 [] Local () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f3: (Variable 2 f3 [] Local () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f4: (Variable 2 f4 [] Local () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f5: (Variable 2 f5 [] Local () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f6: (Variable 2 f6 [] ReturnVar () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Real 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (RealConstant 5.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 f2) (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 8.000000 (Real 4) ) ) () .false. .false. ) (Assignment (Var 2 f3) (RealBinOp (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 8.000000 (Real 4) ) ) Mul (RealConstant 2.000000 (Real 4) ) (Real 4) (RealConstant 16.000000 (Real 4) ) ) () .false. .false. ) (Assignment (Var 2 f4) (RealBinOp (RealConstant 5.000000 (Real 4) ) Add (RealBinOp (RealConstant 3.000000 (Real 4) ) Mul (RealConstant 2.000000 (Real 4) ) (Real 4) (RealConstant 6.000000 (Real 4) ) ) (Real 4) (RealConstant 11.000000 (Real 4) ) ) () .false. .false. ) (Assignment (Var 2 f5) (RealBinOp (RealConstant 5.000000 (Real 4) ) Sub (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 2.000000 (Real 4) ) ) () .false. .false. ) (Assignment (Var 2 f6) (RealBinOp (RealConstant 4.000000 (Real 4) ) Pow (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant 64.000000 (Real 4) ) ) () .false. .false. )] (Var 2 f6) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_struct_01-c320d7d.stdout0000664000175000017500000024470515227365530025552 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_struct_01: (Program (SymbolTable 15 { r: (ExternalSymbol 15 r 2 r template_struct_01_m [] r Public ), struct_t: (ExternalSymbol 15 struct_t 2 struct_t template_struct_01_m [] struct_t Public ), test_template: (ExternalSymbol 15 test_template 2 test_template template_struct_01_m [] test_template Public ) }) template_struct_01 [template_struct_01_m] [(SubroutineCall 15 test_template () [] () .false. )] ), template_struct_01_m: (Module (SymbolTable 2 { r: (Requirement (SymbolTable 3 { t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) r [t] [] ), struct_t: (Template (SymbolTable 4 { get_fst: (Function (SymbolTable 6 { 1_tuple_fst: (ExternalSymbol 6 1_tuple_fst 5 fst tuple [] fst Public ), p: (Variable 6 p [] In () () Default (StructType [(TypeParameter t ) (TypeParameter t )] [] .true. .false. ) 4 tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 6 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_fst (FunctionType [(StructType [(TypeParameter t ) (TypeParameter t )] [] .true. .false. )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 p)] [(Assignment (Var 6 r) (StructInstanceMember (Var 6 p) 6 1_tuple_fst (TypeParameter t ) () ) () .false. .false. )] (Var 6 r) Private .true. .true. () ), get_snd: (Function (SymbolTable 7 { 1_tuple_snd: (ExternalSymbol 7 1_tuple_snd 5 snd tuple [] snd Public ), p: (Variable 7 p [] In () () Default (StructType [(TypeParameter t ) (TypeParameter t )] [] .true. .false. ) 4 tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 7 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_snd (FunctionType [(StructType [(TypeParameter t ) (TypeParameter t )] [] .true. .false. )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 p)] [(Assignment (Var 7 r) (StructInstanceMember (Var 7 p) 7 1_tuple_snd (TypeParameter t ) () ) () .false. .false. )] (Var 7 r) Private .true. .true. () ), t: (Variable 4 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tuple: (Struct (SymbolTable 5 { fst: (Variable 5 fst [] Local () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), snd: (Variable 5 snd [] Local () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) tuple (StructType [(TypeParameter t ) (TypeParameter t )] [] .true. .false. ) [] [fst snd] [] Source Private .false. .false. .false. [] () () [] ) }) struct_t [t] [(Require r [t] )] ), test_template: (Function (SymbolTable 8 { 1_int_tuple_fst: (ExternalSymbol 8 1_int_tuple_fst 9 fst int_tuple [] fst Public ), 1_int_tuple_snd: (ExternalSymbol 8 1_int_tuple_snd 9 snd int_tuple [] snd Public ), 1_real_tuple_fst: (ExternalSymbol 8 1_real_tuple_fst 12 fst real_tuple [] fst Public ), 1_real_tuple_snd: (ExternalSymbol 8 1_real_tuple_snd 12 snd real_tuple [] snd Public ), get_int_fst: (Function (SymbolTable 10 { 1_int_tuple_fst: (ExternalSymbol 10 1_int_tuple_fst 9 fst int_tuple [] fst Public ), p: (Variable 10 p [] In () () Default (StructType [] [] .true. .false. ) 8 int_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 10 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_int_fst (FunctionType [(StructType [] [] .true. .false. )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 p)] [(Assignment (Var 10 r) (StructInstanceMember (Var 10 p) 10 1_int_tuple_fst (Integer 4) () ) () .false. .false. )] (Var 10 r) Private .true. .true. () ), get_int_snd: (Function (SymbolTable 11 { 1_int_tuple_snd: (ExternalSymbol 11 1_int_tuple_snd 9 snd int_tuple [] snd Public ), p: (Variable 11 p [] In () () Default (StructType [] [] .true. .false. ) 8 int_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 11 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_int_snd (FunctionType [(StructType [] [] .true. .false. )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 11 p)] [(Assignment (Var 11 r) (StructInstanceMember (Var 11 p) 11 1_int_tuple_snd (Integer 4) () ) () .false. .false. )] (Var 11 r) Private .true. .true. () ), get_real_fst: (Function (SymbolTable 13 { 1_real_tuple_fst: (ExternalSymbol 13 1_real_tuple_fst 12 fst real_tuple [] fst Public ), p: (Variable 13 p [] In () () Default (StructType [] [] .true. .false. ) 8 real_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 13 r [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_real_fst (FunctionType [(StructType [] [] .true. .false. )] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 p)] [(Assignment (Var 13 r) (StructInstanceMember (Var 13 p) 13 1_real_tuple_fst (Real 4) () ) () .false. .false. )] (Var 13 r) Private .true. .true. () ), get_real_snd: (Function (SymbolTable 14 { 1_real_tuple_snd: (ExternalSymbol 14 1_real_tuple_snd 12 snd real_tuple [] snd Public ), p: (Variable 14 p [] In () () Default (StructType [] [] .true. .false. ) 8 real_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 14 r [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_real_snd (FunctionType [(StructType [] [] .true. .false. )] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 14 p)] [(Assignment (Var 14 r) (StructInstanceMember (Var 14 p) 14 1_real_tuple_snd (Real 4) () ) () .false. .false. )] (Var 14 r) Private .true. .true. () ), int_tuple: (Struct (SymbolTable 9 { fst: (Variable 9 fst [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), snd: (Variable 9 snd [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_tuple (StructType [] [] .true. .false. ) [] [fst snd] [] Source Private .false. .false. .false. [] () () [] ), real_tuple: (Struct (SymbolTable 12 { fst: (Variable 12 fst [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), snd: (Variable 12 snd [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) real_tuple (StructType [] [] .true. .false. ) [] [fst snd] [] Source Private .false. .false. .false. [] () () [] ), ti: (Variable 8 ti [] Local () () Default (StructType [] [] .true. .false. ) 8 int_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tr: (Variable 8 tr [] Local () () Default (StructType [] [] .true. .false. ) 8 real_tuple Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (StructInstanceMember (Var 8 ti) 8 1_int_tuple_fst (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(StringConstant "First element: " (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 8 get_int_fst () [((Var 8 ti))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (StructInstanceMember (Var 8 ti) 8 1_int_tuple_snd (Integer 4) () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(StringConstant "Second element: " (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 8 get_int_snd () [((Var 8 ti))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (StructInstanceMember (Var 8 tr) 8 1_real_tuple_fst (Real 4) () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "First element: " (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 8 get_real_fst () [((Var 8 tr))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (StructInstanceMember (Var 8 tr) 8 1_real_tuple_snd (Real 4) () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Second element: " (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 8 get_real_snd () [((Var 8 tr))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_struct_01_m () [template_struct_01_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-exit2-f1f3b2c.stdout0000664000175000017500000000001215227365530023142 0ustar alastairalastair1 2 3 4 5 lfortran-0.64.0/tests/reference/asr-arrays_02_size-ab6ee62.stdout0000664000175000017500000002644015227365530024745 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), size_a4: (Variable 2 size_a4 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), size_a8: (Variable 2 size_a8 [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), size_b4: (Variable 2 size_b4 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), size_b8: (Variable 2 size_b8 [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_01 [] [(Assignment (Var 2 size_a4) (ArraySize (Var 2 a) () (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 size_b4) (ArraySize (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 size_a8) (ArraySize (Var 2 a) () (Integer 8) (IntegerConstant 3 (Integer 8) Decimal) ) () .false. .false. ) (Assignment (Var 2 size_b8) (ArraySize (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 8) (IntegerConstant 4 (Integer 8) Decimal) ) () .false. .false. ) (If () (IntegerCompare (Var 2 size_a4) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 size_b4) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 size_a8) NotEq (IntegerConstant 3 (Integer 8) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 size_b8) NotEq (IntegerConstant 4 (Integer 8) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-subroutine7-58db221.json0000664000175000017500000000072615227365530023662 0ustar alastairalastair{ "basename": "asr-subroutine7-58db221", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/subroutine7.f90", "infile_hash": "3a15750c9d608f1988e0dd13f8d956be28a72297be5ef3137777cf2f", "outfile": null, "outfile_hash": null, "stdout": "asr-subroutine7-58db221.stdout", "stdout_hash": "1d9888822ab427012800b7c5cf782487819bb660d2cdff87f9d3928f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutines_04-a817e0c.json0000664000175000017500000000076415227365530024344 0ustar alastairalastair{ "basename": "asr-subroutines_04-a817e0c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_04.f90", "infile_hash": "c7f14f3cfe8c42ebbf006f4e20a30b517c9e2775e5af0f8853ae05e1", "outfile": null, "outfile_hash": null, "stdout": "asr-subroutines_04-a817e0c.stdout", "stdout_hash": "2b824de54763ff5eefbb250ca3e8c83d686f57542e11941273524243", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character_03-a7476e8.json0000664000175000017500000000106515227365530023645 0ustar alastairalastair{ "basename": "asr-character_03-a7476e8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/warnings/character_03.f90", "infile_hash": "9aebb511b0914d6e70395b36170f563c3388431dde62d3b371aea47f", "outfile": null, "outfile_hash": null, "stdout": "asr-character_03-a7476e8.stdout", "stdout_hash": "fb91e9bca4f475f32936809cc8a48b847c12addac4d86816d355721e", "stderr": "asr-character_03-a7476e8.stderr", "stderr_hash": "87a0cbd848901a22fd44c9062f5c50b8c0ad5d98cfd40bbb1b98ca0c", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incompatible_ranks_allocatable_arr1-5e5233d.json0000664000175000017500000000104515227365530030506 0ustar alastairalastair{ "basename": "asr-incompatible_ranks_allocatable_arr1-5e5233d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incompatible_ranks_allocatable_arr1.f90", "infile_hash": "4a722df84efd62e9189918fa08cc3c83b07a5e0212279b928445e50f", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incompatible_ranks_allocatable_arr1-5e5233d.stderr", "stderr_hash": "79c08e23704f47177db0d6beec0f93b54006a5567f44b3424dc148be", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-defop1-f87dd80.json0000664000175000017500000000070715227365530022650 0ustar alastairalastair{ "basename": "ast-defop1-f87dd80", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/defop1.f90", "infile_hash": "78b29077fdb7303bc8002ba7f16a36ffa13a981527f87df53bf268e3", "outfile": null, "outfile_hash": null, "stdout": "ast-defop1-f87dd80.stdout", "stdout_hash": "a407b773da29a71a0f9991ffecdf946ecee8d8126b3a17d7407ea861", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-derived_types_03-2ad875a.stdout0000664000175000017500000000105615227365530025656 0ustar alastairalastairprogram derived_types_03 ! AST only do nn = 1, ndiag ing = diag(nn)%len allocate(diag(nn)%cell_id(ing), STAT=ierr) if (ierr /= 0) then return end if ndpwds = ndpwds + SIZE(diag(nn)%cell_id) end do do k = 1, nz do j = 1, ny do i = 1, ichunk nn = i + j + k - 2 indx(nn) = indx(nn) + 1 ing = indx(nn) diag(nn)%cell_id(ing)%ic = i diag(nn)%cell_id(ing)%j = j diag(nn)%cell_id(ing)%k = k end do end do end do end program derived_types_03 lfortran-0.64.0/tests/reference/asr-intrinsics_29-d4080f2.json0000664000175000017500000000076115227365530024072 0ustar alastairalastair{ "basename": "asr-intrinsics_29-d4080f2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_29.f90", "infile_hash": "16c52115980fa652cd9e0ade7a55786421b6801d678964a37095afbb", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_29-d4080f2.stdout", "stdout_hash": "113d6412cc6c70cacbf9b9e4cd9f624cb3944b5f7394ed6430c81048", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kind_star_of_int-3ed778d.stderr0000664000175000017500000000022415227365530025331 0ustar alastairalastairsemantic error: Expected initialization expression for kind --> tests/errors/kind_star_of_int.f90:3:13 | 3 | integer(*) a | ^ lfortran-0.64.0/tests/reference/pass_flip_sign-flip_sign-16b288c.stdout0000664000175000017500000002224115227365530026134 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { flip_sign: (Program (SymbolTable 2 { eps: (Variable 2 eps [] Local (RealConstant 0.000001 (Real 4) ) (RealConstant 0.000001 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), number: (Variable 2 number [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) flip_sign [] [(Assignment (Var 2 number) (IntegerConstant 123 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 x) (RealConstant 5.500000 (Real 4) ) () .false. .false. ) (If () (IntegerCompare (IntrinsicElementalFunction Modulo [(Var 2 number) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) () ) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 x) (RealUnaryMinus (Var 2 x) (Real 4) () ) () .false. .false. )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealUnaryMinus (RealConstant 5.500000 (Real 4) ) (Real 4) (RealConstant -5.500000 (Real 4) ) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 eps) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 number) (IntegerConstant 124 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 x) (RealConstant 5.500000 (Real 4) ) () .false. .false. ) (If () (IntegerCompare (IntrinsicElementalFunction Modulo [(Var 2 number) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) () ) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 x) (RealUnaryMinus (Var 2 x) (Real 4) () ) () .false. .false. )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealConstant 5.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 eps) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/fortran-expr5-3a279bb.f900000664000175000017500000000017015227365530023025 0ustar alastairalastairprogram expr_05 implicit none integer(4) :: x x = (2 + 3)*5 if (x == 25) then error stop end if end program expr_05 lfortran-0.64.0/tests/reference/llvm-recursion_01-95eb32d.stdout0000664000175000017500000001447115227365530024533 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__sub1__x = global i32 0 @__module_recursion_01_n = global i32 0 @__module_recursion_01_x = global i32 0 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1 @string_const_data = private constant [4 x i8] c"x = " @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_recursion_01_sub1(i32* %x) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = load i32, i32* %x, align 4 %2 = load i32, i32* @__module_recursion_01_n, align 4 %3 = icmp slt i32 %1, %2 br i1 %3, label %then, label %else then: ; preds = %.entry %4 = load i32, i32* %x, align 4 %5 = add i32 %4, 1 store i32 %5, i32* %x, align 4 %6 = alloca i64, align 8 %7 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.1, i32 0, i32 0), i64* %6, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* %x) %8 = load i64, i64* %6, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %7, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %8, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %14 = load i64, i64* %13, align 8 %15 = trunc i64 %14 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %12, i32 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %16 = icmp eq i8* %7, null br i1 %16, label %free_done, label %free_nonnull free_nonnull: ; preds = %then call void @_lfortran_free_alloc(i8* %0, i8* %7) br label %free_done free_done: ; preds = %free_nonnull, %then %17 = load i32, i32* %x, align 4 store i32 %17, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 call void @sub1.__module_recursion_01_sub2() %18 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %18, i32* %x, align 4 call void @__module_recursion_01_sub1(i32* %x) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %free_done br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_sub1 FINALIZE_SYMTABLE_sub1: ; preds = %return ret void } define void @sub1.__module_recursion_01_sub2() { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %2 = add i32 %1, 1 store i32 %2, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @__module___lcompilers_created__nested_context__sub1__x) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry call void @__module_recursion_01_sub1(i32* @__module___lcompilers_created__nested_context__sub1__x) br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_sub2 FINALIZE_SYMTABLE_sub2: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) store i32 10, i32* @__module_recursion_01_n, align 4 call void @__module_recursion_01_sub1(i32* @__module_recursion_01_x) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast_f90-nullify1-b3931cb.stdout0000664000175000017500000000014415227365530024241 0ustar alastairalastairprogram nullify1 ! Tests for syntax (AST) only: nullify(a) nullify(a, b, c, d) end program nullify1 lfortran-0.64.0/tests/reference/run-format_28-d8cdd42.stdout0000664000175000017500000000065415227365530023732 0ustar alastairalastair 0.100E+00 0.200E+00 0.300E+00 0.400E+00 (A,ES6.2E1) ****** (A,ES7.2E1) ******* (A,ES8.2E1) ******** (A,ES9.2E1) ********* ****** ******* 3.00E+20 ********* ********** *********** 0.E+0 1.E+1 3.E+0 3.E+5 1.E+10 -1.E+10 ******* ******* 1.230E-40 -1.230E-40 1.23E+2 1.23E+02 1.23E+002 1.00E+02 1.00E+00 9.99E+00 +1.23E+2 1.23E+2 **** ***** 0.0E+0 0.E+0 .29E+03 .29E+03 0.29E+03 .29E+00 0.12E+13 ******* lfortran-0.64.0/tests/reference/asr-loop_unroll_large-c6b628b.stdout0000664000175000017500000001547415227365530025556 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { loop_unroll_large: (Program (SymbolTable 2 { array: (Variable 2 array [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), first: (Variable 2 first [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 2 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) loop_unroll_large [] [(Allocate [((Var 2 array) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 35 (Integer 4) Decimal))] () () ())] () () () ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 35 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 35 (Integer 4) Decimal) ()) [(Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-forall1-88e2780.stderr0000664000175000017500000000057615227365530023707 0ustar alastairalastairstyle suggestion: Use '/=' instead of '.ne.' --> tests/forall1.f90:9:33 | 9 | forall (i=1:n, j=1:m, A(i,j).NE.0) & | ^^^^ help: write this as '/=' style suggestion: Use '/=' instead of '.ne.' --> tests/forall1.f90:36:34 | 36 | inner: forall (j=1:100, i.NE.j) | ^^^^ help: write this as '/=' lfortran-0.64.0/tests/reference/llvm-intent_01-6d96ec5.stdout0000664000175000017500000000732415227365530024032 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_dflt_intent_foo(float* %c, float* %d) { .entry: %e = alloca float, align 4 %g = alloca float, align 4 %0 = call float @foo.__module_dflt_intent_f(float* %c) store float %0, float* %e, align 4 %1 = call float @foo.__module_dflt_intent_f(float* %d) store float %1, float* %g, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_foo FINALIZE_SYMTABLE_foo: ; preds = %return ret void } define float @foo.__module_dflt_intent_f(float* %x) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %f = alloca float, align 4 %1 = load float, float* %x, align 4 %2 = fmul float 2.000000e+00, %1 store float %2, float* %f, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* %f) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return %14 = load float, float* %f, align 4 ret float %14 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value1 = alloca float, align 4 %call_arg_value = alloca float, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store float 0.000000e+00, float* %call_arg_value, align 4 store float 2.000000e+00, float* %call_arg_value1, align 4 call void @__module_dflt_intent_foo(float* %call_arg_value, float* %call_arg_value1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-arrays_10-2bab681.json0000664000175000017500000000074515227365530023254 0ustar alastairalastair{ "basename": "asr-arrays_10-2bab681", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_10.f90", "infile_hash": "b3c01631350539e1272452b14a2768c4f8473cddd5c40b7fed0905ad", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_10-2bab681.stdout", "stdout_hash": "80603ffb0a8003ec526950c7cc1a4f4d9643142af06eed0c5ea33f63", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-continue_compilation_walrus-f3d9bd0.stderr0000664000175000017500000000061015227365530027701 0ustar alastairalastairsemantic error: Variable 'x' is already declared; use `=` for assignment to existing variables --> tests/errors/continue_compilation_walrus.f90:4:5 | 4 | x := 5 | ^ already declared semantic error: Variable 'y' is already declared; use `=` for assignment to existing variables --> tests/errors/continue_compilation_walrus.f90:6:5 | 6 | y := 10 | ^ already declared lfortran-0.64.0/tests/reference/run-array_bounds_check_09-afed6c8.stderr0000664000175000017500000000074115227365530026330 0ustar alastairalastairruntime error: Array shape mismatch in binary operation with operands '__libasr_created__integer_binop_' and '__libasr_created_integer_binop_right_'. Tried to match size 3 of dimension 1 of '__libasr_created__integer_binop_' with size 2 of dimension 1 of '__libasr_created_integer_binop_right_'. --> tests/errors/array_bounds_check_09.f90:12:9 | 12 | e = a + b + f(a) | ^^^^^ LHS size is 3 | 12 | e = a + b + f(a) | ^^^^ RHS size is 2 lfortran-0.64.0/tests/reference/ast-string_01-9625208.stdout0000664000175000017500000000171515227365530023424 0ustar alastairalastair(TranslationUnit [(Program print_01 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeCharacter [(len 7 Value)] () () None ) [] [(my_name [] [] () (String "Dominic" ()) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Print 0 () [(String "My name is " ()) my_name] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-global_scope8-67fff8d.json0000664000175000017500000000073415227365530024277 0ustar alastairalastair{ "basename": "asr-global_scope8-67fff8d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope8.f90", "infile_hash": "899df30dee274279a699110fb9af2afad0b826c0abc886f9e2460627", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope8-67fff8d.stdout", "stdout_hash": "a8b3f6017aff3f646d9724319749cb67e8926ef438aadaddff087a0d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit9-b56b139.stderr0000664000175000017500000000176015227365530023634 0ustar alastairalastairstyle suggestion: Use integer(4) instead of integer*4 --> tests/implicit9.f90:3:17 | 3 | implicit integer*4 (d-e) | ^ help: write this as 'integer(4)' style suggestion: Use integer(8) instead of integer*8 --> tests/implicit9.f90:4:17 | 4 | implicit integer*8 (f-g) | ^ help: write this as 'integer(8)' style suggestion: Use real(4) instead of real*4 --> tests/implicit9.f90:6:14 | 6 | implicit real*4 (i-k) | ^ help: write this as 'real(4)' style suggestion: Use real(8) instead of real*8 --> tests/implicit9.f90:7:14 | 7 | implicit real*8 (l) | ^ help: write this as 'real(8)' style suggestion: Use complex(4) instead of complex*8 --> tests/implicit9.f90:9:17 | 9 | implicit complex*8 (o) | ^ help: write this as 'complex(4)' style suggestion: Use complex(8) instead of complex*16 --> tests/implicit9.f90:10:17 | 10 | implicit complex*16 (p) | ^ help: write this as 'complex(8)' lfortran-0.64.0/tests/reference/asr-where_01-c45f2da.json0000664000175000017500000000074215227365530023145 0ustar alastairalastair{ "basename": "asr-where_01-c45f2da", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_01.f90", "infile_hash": "b3e2251e4cd263f14db0266759a9af716dce48521dcd2f1e6eadce17", "outfile": null, "outfile_hash": null, "stdout": "asr-where_01-c45f2da.stdout", "stdout_hash": "e961098f0a0fef6a878b9951c83dbcb0f946444400bef37f47f6e4f3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-namelist_02-5bdbd75.json0000664000175000017500000000075315227365530023656 0ustar alastairalastair{ "basename": "asr-namelist_02-5bdbd75", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/namelist_02.f90", "infile_hash": "676c2a3a920ec86c6b8bc131b75e1c30f569d36d9777674a7e196b62", "outfile": null, "outfile_hash": null, "stdout": "asr-namelist_02-5bdbd75.stdout", "stdout_hash": "1245a1868d8b25d2e13d98666ca90edc107c4bf92c3668bedaf2dde9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allow_implicit_interface-68156ec.json0000664000175000017500000000102215227365530026424 0ustar alastairalastair{ "basename": "asr-allow_implicit_interface-68156ec", "cmd": "lfortran --show-asr --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/allow_implicit_interface.f90", "infile_hash": "3d73fa8cc6b2a34329665b09295d1469f049597c7ab7f0c1039e4370", "outfile": null, "outfile_hash": null, "stdout": "asr-allow_implicit_interface-68156ec.stdout", "stdout_hash": "adac2c154a5cbae043e6aa70b5dcf31fea5f19756372c136a4ed4f22", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-boz_01-dedad59.stderr0000664000175000017500000000037715227365530023252 0ustar alastairalastairwarning: BOZ literal constant with 'Z' prefix truncated to maximum 16 characters from left to fit data type --> tests/../integration_tests/boz_01.f90:12:13 | 12 | boz_5 = int(Z'2234567890abcdef1') | ^^^^^^^^^^^^^^^^^^^^ BOZ truncation lfortran-0.64.0/tests/reference/asr-modules_29-dc71c55.json0000664000175000017500000000075015227365530023437 0ustar alastairalastair{ "basename": "asr-modules_29-dc71c55", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_29.f90", "infile_hash": "2a9083651faf952ebe886324158cd55b4361b02439b525dd54c1935c", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_29-dc71c55.stdout", "stdout_hash": "a586030acd0a3042756f6b9e5e5db3293b4acff5b320ee2f2be9d6b0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_19-26385d4.stdout0000664000175000017500000005770515227365530025065 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_module_19: (Module (SymbolTable 4 { check_proc: (Function (SymbolTable 7 { array: (Variable 7 array [] Local () () Default (Pointer (StructType [(Logical 4)] [] .true. .false. ) ) 4 child_value Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ptr: (Variable 7 ptr [] Local () () Default (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) ) 4 toml_value Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~select_type_block_: (Block (SymbolTable 8 { 1_child_value_ok: (ExternalSymbol 8 1_child_value_ok 5 ok derived_types_module_19 [child_value] ok Public ) }) ~select_type_block_ [(If () (StructInstanceMember (Cast (Var 7 ptr) ClassToStruct (Pointer (StructType [(Logical 4)] [] .true. .false. ) ) () (Var 4 child_value) ) 8 1_child_value_ok (Logical 4) () ) [(Associate (Var 7 array) (Cast (Var 7 ptr) ClassToStruct (Pointer (StructType [(Logical 4)] [] .true. .false. ) ) () (Var 4 child_value) ) )] [(SubroutineCall 4 not_ok () [] () .false. ) (Return)] )] ), ~select_type_block_1: (Block (SymbolTable 9 { }) ~select_type_block_1 [(SubroutineCall 4 default_class () [] () .false. ) (Return)] ) }) check_proc (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [not_ok default_class] [] [(If () (PointerAssociated (Var 7 ptr) () (Logical 4) () ) [(SelectType (Var 7 ptr) () [(TypeStmtName 4 child_value [(BlockCall -1 7 ~select_type_block_ )] )] [(BlockCall -1 7 ~select_type_block_1 )] )] [] )] () Public .true. .true. () ), child_value: (Struct (SymbolTable 5 { ok: (Variable 5 ok [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) child_value (StructType [(Logical 4)] [] .true. .false. ) [] [ok] [] Source Public .false. .false. .false. [] () 4 toml_value [] ), default_class: (Function (SymbolTable 10 { }) default_class (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "default class" (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), new: (GenericProcedure 4 new [4 check_proc] Public ), not_ok: (Function (SymbolTable 11 { }) not_ok (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "not ok" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), toml_value: (Struct (SymbolTable 6 { key: (Variable 6 key [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) toml_value (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [key] [] Source Public .false. .true. .false. [] () () [] ) }) derived_types_module_19 () [] .true. .false. .false. ), derived_types_module_19_1: (Module (SymbolTable 2 { check_here: (Function (SymbolTable 12 { }) check_here (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(SubroutineCall 2 check_proc () [] () .false. )] () Public .true. .true. () ), check_proc: (ExternalSymbol 2 check_proc 4 check_proc derived_types_module_19 [] check_proc Public ) }) derived_types_module_19_1 () [derived_types_module_19] .false. .false. .false. ), main: (Program (SymbolTable 13 { }) main [] [(Print (StringConstant "running derived_types_19 main program" (String 1 (IntegerConstant 37 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics1-8ebce32.stderr0000664000175000017500000000027615227365530024340 0ustar alastairalastairsemantic error: Unexpected args, Radix expects (int) or (real) as arguments --> tests/errors/intrinsics1.f90:3:14 | 3 | print *, radix((2.4, 1.0)) | ^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-character_03-a7476e8.stderr0000664000175000017500000000031415227365530024173 0ustar alastairalastairstyle suggestion: Use character() instead of character*() --> tests/warnings/character_03.f90:3:5 | 3 | character*(2+3) str | ^^^^^^^^^^^^^^^ help: write this as 'character()' lfortran-0.64.0/tests/reference/ast-subroutines_10-c3e0d28.stdout0000664000175000017500000000666615227365530024723 0ustar alastairalastair(TranslationUnit [(Program subroutines_10 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeReal [] () () None ) [] [(x [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(SubroutineCall 0 subroutines_10_sub [] [(() x () 0) (() 3 () 0) (() () () 100) (() () () 200)] [] [] () ) (If 0 () (BoolOp (< x 0) And (> x 10) ) [(ErrorStop 0 () () () )] [] () () () ) (Stop 0 () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 100 () [(String "Negative input value" ())] () ) (ErrorStop 0 () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 200 () [(String "Input value too large" ())] () ) (ErrorStop 0 () () () )] [] ) (Subroutine subroutines_10_sub [(x) (i) (()) (())] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(i [] [] () () None ())] () )] [(If 0 () (< i 0) [(Return 0 1 () )] [] () () () ) (If 0 () (> i 10) [(Return 0 2 () )] [] () () () ) (Assignment 0 x i () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr_preprocess-unterminated_comment_01-a351b61.json0000664000175000017500000000103515227365530030347 0ustar alastairalastair{ "basename": "asr_preprocess-unterminated_comment_01-a351b61", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/unterminated_comment_01.f90", "infile_hash": "e5e7342c0979e8c39e8c08bc57ecf06531f4805499dd5907b1e8a624", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-unterminated_comment_01-a351b61.stderr", "stderr_hash": "dfdd308020e62292d3bb7aee51486f999e21edf5a2376e9c4fb0308f", "returncode": 2 }lfortran-0.64.0/tests/reference/wat-logical4-64da104.stdout0000664000175000017500000001340015227365530023436 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 i32 i32) i32.const 2 i32.eqz i32.eqz local.set 0 i32.const -1 i32.eqz i32.eqz local.set 1 i32.const 0 i32.eqz i32.eqz local.set 2 local.get 0 i64.extend_i32_s call 3 i32.const 1 i32.const 4 i32.const 1 i32.const 0 call 1 drop local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 4 i32.const 1 i32.const 0 call 1 drop local.get 2 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/pass_do_loops-doloop_01-f2f0442.stdout0000664000175000017500000011773115227365530025625 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { doloop_01: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) doloop_01 [] [(Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 55 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 10 (Integer 4) Decimal) Sub (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 55 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 9 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 25 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 9 (Integer 4) Decimal) Sub (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 25 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 25 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 22 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 10 (Integer 4) Decimal) Sub (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 22 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 0 (Integer 4) Decimal) Sub (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-fixed_form_call2-28c0b82.stdout0000664000175000017500000002100015227365530025131 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { idd_frm: (Function (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prinf: (Function (SymbolTable 3 { prinf_arg_0: (Variable 3 prinf_arg_0 [] Unspecified () () Default (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prinf_arg_1: (Variable 3 prinf_arg_1 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) prinf (FunctionType [(String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 prinf_arg_0) (Var 3 prinf_arg_1)] [] () Public .false. .false. () ) }) idd_frm (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 m)] [(Assignment (Var 2 a) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (SubroutineCall 2 prinf () [((StringConstant "lw = *" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) (SubroutineCall 2 prinf () [((StringConstant "16m+70 = *" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) (Assignment (Var 2 m) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Return)] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-program_without_line_01-96f2648.json0000664000175000017500000000100115227365530026063 0ustar alastairalastair{ "basename": "ast-program_without_line_01-96f2648", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/program_without_line_01.f90", "infile_hash": "516860f9855615c6727a984cf5f5ac39055860c9659a3dc0a17b814b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-program_without_line_01-96f2648.stderr", "stderr_hash": "58d3c9474a5ef269a382a3679ad492f6e66bd22f092ed9d04b945f16", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-nullify_02-3c7ee61.json0000664000175000017500000000075315227365530023632 0ustar alastairalastair{ "basename": "llvm-nullify_02-3c7ee61", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_02.f90", "infile_hash": "8603bbfc07290d14f0828e12a8b04c3521c007c844a4c901b4bb7483", "outfile": null, "outfile_hash": null, "stdout": "llvm-nullify_02-3c7ee61.stdout", "stdout_hash": "959785ce821d576c3d9dca04193993ccbd089dfc97b1a907d770b500", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-array2-9a93c4d.stdout0000664000175000017500000000642115227365530023231 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } struct dimension_descriptor { int32_t lower_bound, length, stride; }; struct f32_5_1 { Kokkos::View* data; dimension_descriptor dims[1]; bool is_allocated; f32_5_1(Kokkos::View* data_): data{data_} {}; }; struct i32_3_1 { Kokkos::View* data; dimension_descriptor dims[1]; bool is_allocated; i32_3_1(Kokkos::View* data_): data{data_} {}; }; struct f32_2_3_2 { Kokkos::View* data; dimension_descriptor dims[2]; bool is_allocated; f32_2_3_2(Kokkos::View* data_): data{data_} {}; }; struct i32_3_4_2 { Kokkos::View* data; dimension_descriptor dims[2]; bool is_allocated; i32_3_4_2(Kokkos::View* data_): data{data_} {}; }; struct f32_2_3_4_3 { Kokkos::View* data; dimension_descriptor dims[3]; bool is_allocated; f32_2_3_4_3(Kokkos::View* data_): data{data_} {}; }; struct i32_3_4_3_3 { Kokkos::View* data; dimension_descriptor dims[3]; bool is_allocated; i32_3_4_3_3(Kokkos::View* data_): data{data_} {}; }; // Forward declarations namespace { } // Implementations namespace { void main2() { Kokkos::View a_data("a_data", 5); f32_5_1 a_value(&a_data); f32_5_1* a = &a_value; a->dims[0].lower_bound = 1; a->dims[0].length = 5; Kokkos::View b_data("b_data", 5); f32_5_1 b_value(&b_data); f32_5_1* b = &b_value; b->dims[0].lower_bound = 1; b->dims[0].length = 5; Kokkos::View c_data("c_data", 3); i32_3_1 c_value(&c_data); i32_3_1* c = &c_value; c->dims[0].lower_bound = 1; c->dims[0].length = 3; Kokkos::View& d; Kokkos::View e_data("e_data", 6); f32_2_3_2 e_value(&e_data); f32_2_3_2* e = &e_value; e->dims[0].lower_bound = 1; e->dims[0].length = 2; e->dims[1].lower_bound = 1; e->dims[1].length = 3; Kokkos::View f_data("f_data", 12); i32_3_4_2 f_value(&f_data); i32_3_4_2* f = &f_value; f->dims[0].lower_bound = 1; f->dims[0].length = 3; f->dims[1].lower_bound = 1; f->dims[1].length = 4; Kokkos::View& g; Kokkos::View h_data("h_data", 24); f32_2_3_4_3 h_value(&h_data); f32_2_3_4_3* h = &h_value; h->dims[0].lower_bound = 1; h->dims[0].length = 2; h->dims[1].lower_bound = 1; h->dims[1].length = 3; h->dims[2].lower_bound = 1; h->dims[2].length = 4; Kokkos::View i_data("i_data", 36); i32_3_4_3_3 i_value(&i_data); i32_3_4_3_3* i = &i_value; i->dims[0].lower_bound = 1; i->dims[0].length = 3; i->dims[1].lower_bound = 1; i->dims[1].length = 4; i->dims[2].lower_bound = 1; i->dims[2].length = 3; Kokkos::View& j; } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/asr-array12-cb81afc.json0000664000175000017500000000071215227365530023070 0ustar alastairalastair{ "basename": "asr-array12-cb81afc", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array12.f90", "infile_hash": "b9b95dd8f4cf55a5f7617a1df8fcf515fb405c1cd64c198005f33617", "outfile": null, "outfile_hash": null, "stdout": "asr-array12-cb81afc.stdout", "stdout_hash": "232c47222f1c6cdbbc6d1d8669c4acfa190cedb3f430f9a907522ce1", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_08-7f7acdd.json0000664000175000017500000000074315227365530025776 0ustar alastairalastair{ "basename": "run-array_bounds_check_08-7f7acdd", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_08.f90", "infile_hash": "5b4ee4c8e59df328ecfe694741c18176b47b4000ad17c194947834c4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_08-7f7acdd.stderr", "stderr_hash": "7fb62960dade1600e1cf0acd5b662e743ff3a0fd12ae711d0286a5f8", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-implied_do_loops3-1dce8fd.json0000664000175000017500000000077515227365530025233 0ustar alastairalastair{ "basename": "asr-implied_do_loops3-1dce8fd", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/implied_do_loops3.f90", "infile_hash": "77a6a1521629dd10e76d0ea911c82c418bdf86f5c4f6d7b45e9e7d23", "outfile": null, "outfile_hash": null, "stdout": "asr-implied_do_loops3-1dce8fd.stdout", "stdout_hash": "5ac56dc3a9ae966f61544b116f3be6615647ffe290cb72b6fcee50e4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_02-f2b519f.json0000664000175000017500000000072415227365530023100 0ustar alastairalastair{ "basename": "asr-array_02-f2b519f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_02.f90", "infile_hash": "8a51160d53f16bf9016e09ee1d74a1b589515e57b37d097c26e52b1a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_02-f2b519f.stderr", "stderr_hash": "5b69fda59876bd0f57004f8ef6e27919bcdc33b5f3ca35c01fdad382", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-block_02-82f9e5f.json0000664000175000017500000000106115227365530023063 0ustar alastairalastair{ "basename": "ast-block_02-82f9e5f", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/block_02.f90", "infile_hash": "454b633240fa00d44de1b5374429d3d7edc1c37ccd92b8b93394d639", "outfile": null, "outfile_hash": null, "stdout": "ast-block_02-82f9e5f.stdout", "stdout_hash": "45b1d45576c28eacf2c4b9ef1ae02297750db8b8b742647b258304bf", "stderr": "ast-block_02-82f9e5f.stderr", "stderr_hash": "60488b7fcd202fd28a9fb7045091257667eed65fe1dec8040b9c2871", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-nested_struct_proc_01-3b9017b.stdout0000664000175000017500000026622715227365530026170 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { gftl2_integer32complex32orderedmap: (Module (SymbolTable 2 { atomic_int_kind: (ExternalSymbol 2 atomic_int_kind 4 atomic_int_kind lfortran_intrinsic_iso_fortran_env [] atomic_int_kind Public ), atomic_logical_kind: (ExternalSymbol 2 atomic_logical_kind 4 atomic_logical_kind lfortran_intrinsic_iso_fortran_env [] atomic_logical_kind Public ), character_kinds: (ExternalSymbol 2 character_kinds 4 character_kinds lfortran_intrinsic_iso_fortran_env [] character_kinds Public ), character_storage_size: (ExternalSymbol 2 character_storage_size 4 character_storage_size lfortran_intrinsic_iso_fortran_env [] character_storage_size Public ), compiler_options: (ExternalSymbol 2 compiler_options 4 compiler_options lfortran_intrinsic_iso_fortran_env [] compiler_options Public ), compiler_version: (ExternalSymbol 2 compiler_version 4 compiler_version lfortran_intrinsic_iso_fortran_env [] compiler_version Public ), current_team: (ExternalSymbol 2 current_team 4 current_team lfortran_intrinsic_iso_fortran_env [] current_team Public ), error_unit: (ExternalSymbol 2 error_unit 4 error_unit lfortran_intrinsic_iso_fortran_env [] error_unit Public ), file_storage_size: (ExternalSymbol 2 file_storage_size 4 file_storage_size lfortran_intrinsic_iso_fortran_env [] file_storage_size Public ), i32: (Variable 2 i32 [int32] Local (Var 2 int32) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), initial_team: (ExternalSymbol 2 initial_team 4 initial_team lfortran_intrinsic_iso_fortran_env [] initial_team Public ), input_unit: (ExternalSymbol 2 input_unit 4 input_unit lfortran_intrinsic_iso_fortran_env [] input_unit Public ), int16: (ExternalSymbol 2 int16 4 int16 lfortran_intrinsic_iso_fortran_env [] int16 Public ), int32: (ExternalSymbol 2 int32 4 int32 lfortran_intrinsic_iso_fortran_env [] int32 Public ), int64: (ExternalSymbol 2 int64 4 int64 lfortran_intrinsic_iso_fortran_env [] int64 Public ), int8: (ExternalSymbol 2 int8 4 int8 lfortran_intrinsic_iso_fortran_env [] int8 Public ), integer32complex32orderedmap: (Struct (SymbolTable 9 { insert: (GenericProcedure 9 insert [9 insert_key_value] Public ), insert_key_value: (StructMethodDeclaration 9 insert_key_value () omap_insert_key_value 2 omap_insert_key_value Source .false. .false. ), map: (Variable 9 map [] Local () () Default (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. ) 2 omap_map Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) integer32complex32orderedmap (StructType [(StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. )] [] .true. .false. ) [omap_map] [map] [] Source Private .false. .false. .false. [] () () [] ), integer_kinds: (ExternalSymbol 2 integer_kinds 4 integer_kinds lfortran_intrinsic_iso_fortran_env [] integer_kinds Public ), iostat_end: (ExternalSymbol 2 iostat_end 4 iostat_end lfortran_intrinsic_iso_fortran_env [] iostat_end Public ), iostat_eor: (ExternalSymbol 2 iostat_eor 4 iostat_eor lfortran_intrinsic_iso_fortran_env [] iostat_eor Public ), iostat_inquire_internal_unit: (ExternalSymbol 2 iostat_inquire_internal_unit 4 iostat_inquire_internal_unit lfortran_intrinsic_iso_fortran_env [] iostat_inquire_internal_unit Public ), logical16: (ExternalSymbol 2 logical16 4 logical16 lfortran_intrinsic_iso_fortran_env [] logical16 Public ), logical32: (ExternalSymbol 2 logical32 4 logical32 lfortran_intrinsic_iso_fortran_env [] logical32 Public ), logical64: (ExternalSymbol 2 logical64 4 logical64 lfortran_intrinsic_iso_fortran_env [] logical64 Public ), logical8: (ExternalSymbol 2 logical8 4 logical8 lfortran_intrinsic_iso_fortran_env [] logical8 Public ), logical_kinds: (ExternalSymbol 2 logical_kinds 4 logical_kinds lfortran_intrinsic_iso_fortran_env [] logical_kinds Public ), numeric_storage_size: (ExternalSymbol 2 numeric_storage_size 4 numeric_storage_size lfortran_intrinsic_iso_fortran_env [] numeric_storage_size Public ), omap_i_at_rc: (Function (SymbolTable 10 { 1_omap_map_stored_value: (ExternalSymbol 10 1_omap_map_stored_value 8 stored_value gftl2_integer32complex32orderedmap [omap_map] stored_value Public ), key: (Variable 10 key [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rc: (Variable 10 rc [] Out () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 10 res [] ReturnVar () () Default (Pointer (Complex 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 10 this [] In () () Default (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .false. .false. ) 2 omap_map Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) omap_i_at_rc (FunctionType [(StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .false. .false. ) (Integer 4) (Integer 4)] (Pointer (Complex 4) ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 this) (Var 10 key) (Var 10 rc)] [(Associate (Var 10 res) (StructInstanceMember (Var 10 this) 10 1_omap_map_stored_value (Complex 4) () ) ) (Assignment (Var 10 rc) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 10 res) Public .true. .true. () ), omap_i_set: (Struct (SymbolTable 7 { }) omap_i_set (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () () [] ), omap_insert_key_value: (Function (SymbolTable 11 { 1_integer32complex32orderedmap_map: (ExternalSymbol 11 1_integer32complex32orderedmap_map 9 map gftl2_integer32complex32orderedmap [integer32complex32orderedmap] map Public ), 1_omap_map_at_rc: (ExternalSymbol 11 1_omap_map_at_rc 8 at_rc gftl2_integer32complex32orderedmap [omap_map] at_rc Public ), 1_omap_map_stored_value: (ExternalSymbol 11 1_omap_map_stored_value 8 stored_value gftl2_integer32complex32orderedmap [omap_map] stored_value Public ), key: (Variable 11 key [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), status: (Variable 11 status [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 11 this [] InOut () () Default (StructType [(StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. )] [] .false. .false. ) 2 integer32complex32orderedmap Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 11 tmp [] Local () () Default (Pointer (Complex 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tol: (Variable 11 tol [] Local (RealConstant 0.000001 (Real 4) ) (RealConstant 0.000001 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), value: (Variable 11 value [] In () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omap_insert_key_value (FunctionType [(StructType [(StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. )] [] .false. .false. ) (Integer 4) (Complex 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 11 this) (Var 11 key) (Var 11 value)] [(Assignment (StructInstanceMember (StructInstanceMember (Var 11 this) 11 1_integer32complex32orderedmap_map (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. ) () ) 11 1_omap_map_stored_value (Complex 4) () ) (Var 11 value) () .false. .false. ) (Associate (Var 11 tmp) (FunctionCall 11 1_omap_map_at_rc () [((StructInstanceMember (Var 11 this) 11 1_integer32complex32orderedmap_map (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. ) () )) ((Var 11 key)) ((Var 11 status))] (Pointer (Complex 4) ) () (StructInstanceMember (Var 11 this) 11 1_integer32complex32orderedmap_map (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. ) () ) ) ) (If () (LogicalBinOp (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Real [(Var 11 tmp)] 0 (Real 4) () ) Sub (IntrinsicElementalFunction Real [(Var 11 value)] 0 (Real 4) () ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 11 tol) (Logical 4) () ) Or (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Aimag [(Var 11 tmp)] 0 (Real 4) () ) Sub (IntrinsicElementalFunction Aimag [(Var 11 value)] 0 (Real 4) () ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 11 tol) (Logical 4) () ) (Logical 4) () ) [(Print (StringConstant "Test failed: tmp does not match value" (String 1 (IntegerConstant 37 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] [] )] () Public .false. .false. () ), omap_map: (Struct (SymbolTable 8 { at: (GenericProcedure 8 at [8 at_rc] Public ), at_rc: (StructMethodDeclaration 8 at_rc () omap_i_at_rc 2 omap_i_at_rc Source .false. .false. ), stored_value: (Variable 8 stored_value [] Local () () Default (Complex 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tree: (Variable 8 tree [] Local () () Default (StructType [] [] .true. .false. ) 2 omap_i_set Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omap_map (StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. ) [omap_i_set] [tree stored_value] [] Source Private .false. .false. .false. [] () () [] ), output_unit: (ExternalSymbol 2 output_unit 4 output_unit lfortran_intrinsic_iso_fortran_env [] output_unit Public ), parent_team: (ExternalSymbol 2 parent_team 4 parent_team lfortran_intrinsic_iso_fortran_env [] parent_team Public ), r32: (Variable 2 r32 [real32] Local (Var 2 real32) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real128: (ExternalSymbol 2 real128 4 real128 lfortran_intrinsic_iso_fortran_env [] real128 Public ), real16: (ExternalSymbol 2 real16 4 real16 lfortran_intrinsic_iso_fortran_env [] real16 Public ), real32: (ExternalSymbol 2 real32 4 real32 lfortran_intrinsic_iso_fortran_env [] real32 Public ), real64: (ExternalSymbol 2 real64 4 real64 lfortran_intrinsic_iso_fortran_env [] real64 Public ), real_kinds: (ExternalSymbol 2 real_kinds 4 real_kinds lfortran_intrinsic_iso_fortran_env [] real_kinds Public ), stat_failed_image: (ExternalSymbol 2 stat_failed_image 4 stat_failed_image lfortran_intrinsic_iso_fortran_env [] stat_failed_image Public ), stat_locked: (ExternalSymbol 2 stat_locked 4 stat_locked lfortran_intrinsic_iso_fortran_env [] stat_locked Public ), stat_locked_other_image: (ExternalSymbol 2 stat_locked_other_image 4 stat_locked_other_image lfortran_intrinsic_iso_fortran_env [] stat_locked_other_image Public ), stat_stopped_image: (ExternalSymbol 2 stat_stopped_image 4 stat_stopped_image lfortran_intrinsic_iso_fortran_env [] stat_stopped_image Public ), stat_unlocked: (ExternalSymbol 2 stat_unlocked 4 stat_unlocked lfortran_intrinsic_iso_fortran_env [] stat_unlocked Public ), stat_unlocked_failed_image: (ExternalSymbol 2 stat_unlocked_failed_image 4 stat_unlocked_failed_image lfortran_intrinsic_iso_fortran_env [] stat_unlocked_failed_image Public ) }) gftl2_integer32complex32orderedmap () [iso_fortran_env gftl2_integer32complex32orderedmap] .false. .false. .false. ), iso_fortran_env: (IntrinsicModule lfortran_intrinsic_iso_fortran_env), nested_struct_proc_01: (Program (SymbolTable 12 { 1_insert: (ExternalSymbol 12 1_insert 9 insert integer32complex32orderedmap [] insert Private ), 1_integer32complex32orderedmap_insert_key_value: (ExternalSymbol 12 1_integer32complex32orderedmap_insert_key_value 9 insert_key_value gftl2_integer32complex32orderedmap [integer32complex32orderedmap] insert_key_value Public ), atomic_int_kind: (ExternalSymbol 12 atomic_int_kind 4 atomic_int_kind lfortran_intrinsic_iso_fortran_env [] atomic_int_kind Public ), atomic_logical_kind: (ExternalSymbol 12 atomic_logical_kind 4 atomic_logical_kind lfortran_intrinsic_iso_fortran_env [] atomic_logical_kind Public ), character_kinds: (ExternalSymbol 12 character_kinds 4 character_kinds lfortran_intrinsic_iso_fortran_env [] character_kinds Public ), character_storage_size: (ExternalSymbol 12 character_storage_size 4 character_storage_size lfortran_intrinsic_iso_fortran_env [] character_storage_size Public ), compiler_options: (ExternalSymbol 12 compiler_options 4 compiler_options lfortran_intrinsic_iso_fortran_env [] compiler_options Public ), compiler_version: (ExternalSymbol 12 compiler_version 4 compiler_version lfortran_intrinsic_iso_fortran_env [] compiler_version Public ), current_team: (ExternalSymbol 12 current_team 4 current_team lfortran_intrinsic_iso_fortran_env [] current_team Public ), error_unit: (ExternalSymbol 12 error_unit 4 error_unit lfortran_intrinsic_iso_fortran_env [] error_unit Public ), file_storage_size: (ExternalSymbol 12 file_storage_size 4 file_storage_size lfortran_intrinsic_iso_fortran_env [] file_storage_size Public ), i32: (ExternalSymbol 12 i32 2 i32 gftl2_integer32complex32orderedmap [] i32 Public ), initial_team: (ExternalSymbol 12 initial_team 4 initial_team lfortran_intrinsic_iso_fortran_env [] initial_team Public ), input_unit: (ExternalSymbol 12 input_unit 4 input_unit lfortran_intrinsic_iso_fortran_env [] input_unit Public ), int16: (ExternalSymbol 12 int16 4 int16 lfortran_intrinsic_iso_fortran_env [] int16 Public ), int32: (ExternalSymbol 12 int32 4 int32 lfortran_intrinsic_iso_fortran_env [] int32 Public ), int64: (ExternalSymbol 12 int64 4 int64 lfortran_intrinsic_iso_fortran_env [] int64 Public ), int8: (ExternalSymbol 12 int8 4 int8 lfortran_intrinsic_iso_fortran_env [] int8 Public ), integer32complex32orderedmap: (ExternalSymbol 12 integer32complex32orderedmap 2 integer32complex32orderedmap gftl2_integer32complex32orderedmap [] integer32complex32orderedmap Public ), integer_kinds: (ExternalSymbol 12 integer_kinds 4 integer_kinds lfortran_intrinsic_iso_fortran_env [] integer_kinds Public ), iostat_end: (ExternalSymbol 12 iostat_end 4 iostat_end lfortran_intrinsic_iso_fortran_env [] iostat_end Public ), iostat_eor: (ExternalSymbol 12 iostat_eor 4 iostat_eor lfortran_intrinsic_iso_fortran_env [] iostat_eor Public ), iostat_inquire_internal_unit: (ExternalSymbol 12 iostat_inquire_internal_unit 4 iostat_inquire_internal_unit lfortran_intrinsic_iso_fortran_env [] iostat_inquire_internal_unit Public ), key: (Variable 12 key [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), logical16: (ExternalSymbol 12 logical16 4 logical16 lfortran_intrinsic_iso_fortran_env [] logical16 Public ), logical32: (ExternalSymbol 12 logical32 4 logical32 lfortran_intrinsic_iso_fortran_env [] logical32 Public ), logical64: (ExternalSymbol 12 logical64 4 logical64 lfortran_intrinsic_iso_fortran_env [] logical64 Public ), logical8: (ExternalSymbol 12 logical8 4 logical8 lfortran_intrinsic_iso_fortran_env [] logical8 Public ), logical_kinds: (ExternalSymbol 12 logical_kinds 4 logical_kinds lfortran_intrinsic_iso_fortran_env [] logical_kinds Public ), my_map: (Variable 12 my_map [] Local () () Default (StructType [(StructType [(StructType [] [] .true. .false. ) (Complex 4)] [] .true. .false. )] [] .true. .false. ) 12 integer32complex32orderedmap Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), numeric_storage_size: (ExternalSymbol 12 numeric_storage_size 4 numeric_storage_size lfortran_intrinsic_iso_fortran_env [] numeric_storage_size Public ), omap_i_at_rc: (ExternalSymbol 12 omap_i_at_rc 2 omap_i_at_rc gftl2_integer32complex32orderedmap [] omap_i_at_rc Public ), omap_i_set: (ExternalSymbol 12 omap_i_set 2 omap_i_set gftl2_integer32complex32orderedmap [] omap_i_set Public ), omap_insert_key_value: (ExternalSymbol 12 omap_insert_key_value 2 omap_insert_key_value gftl2_integer32complex32orderedmap [] omap_insert_key_value Public ), omap_map: (ExternalSymbol 12 omap_map 2 omap_map gftl2_integer32complex32orderedmap [] omap_map Public ), output_unit: (ExternalSymbol 12 output_unit 4 output_unit lfortran_intrinsic_iso_fortran_env [] output_unit Public ), parent_team: (ExternalSymbol 12 parent_team 4 parent_team lfortran_intrinsic_iso_fortran_env [] parent_team Public ), r32: (ExternalSymbol 12 r32 2 r32 gftl2_integer32complex32orderedmap [] r32 Public ), real128: (ExternalSymbol 12 real128 4 real128 lfortran_intrinsic_iso_fortran_env [] real128 Public ), real16: (ExternalSymbol 12 real16 4 real16 lfortran_intrinsic_iso_fortran_env [] real16 Public ), real32: (ExternalSymbol 12 real32 4 real32 lfortran_intrinsic_iso_fortran_env [] real32 Public ), real64: (ExternalSymbol 12 real64 4 real64 lfortran_intrinsic_iso_fortran_env [] real64 Public ), real_kinds: (ExternalSymbol 12 real_kinds 4 real_kinds lfortran_intrinsic_iso_fortran_env [] real_kinds Public ), stat_failed_image: (ExternalSymbol 12 stat_failed_image 4 stat_failed_image lfortran_intrinsic_iso_fortran_env [] stat_failed_image Public ), stat_locked: (ExternalSymbol 12 stat_locked 4 stat_locked lfortran_intrinsic_iso_fortran_env [] stat_locked Public ), stat_locked_other_image: (ExternalSymbol 12 stat_locked_other_image 4 stat_locked_other_image lfortran_intrinsic_iso_fortran_env [] stat_locked_other_image Public ), stat_stopped_image: (ExternalSymbol 12 stat_stopped_image 4 stat_stopped_image lfortran_intrinsic_iso_fortran_env [] stat_stopped_image Public ), stat_unlocked: (ExternalSymbol 12 stat_unlocked 4 stat_unlocked lfortran_intrinsic_iso_fortran_env [] stat_unlocked Public ), stat_unlocked_failed_image: (ExternalSymbol 12 stat_unlocked_failed_image 4 stat_unlocked_failed_image lfortran_intrinsic_iso_fortran_env [] stat_unlocked_failed_image Public ), value: (Variable 12 value [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nested_struct_proc_01 [gftl2_integer32complex32orderedmap] [(Assignment (Var 12 key) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 12 value) (ComplexConstructor (RealConstant 2.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) (Complex 4) (ComplexConstant 2.000000 4.000000 (Complex 4) ) ) () .false. .false. ) (SubroutineCall 12 1_integer32complex32orderedmap_insert_key_value 12 1_insert [((Var 12 my_map)) ((Var 12 key)) ((Var 12 value))] (Var 12 my_map) .false. ) (Print (StringConstant "Test passed" (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-do_concurrent2-80c03e1.stdout0000664000175000017500000001106215227365530024664 0ustar alastairalastair(TranslationUnit [(Subroutine do_concurrent2 [(a) (b)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent InOut )] [(a [(() () DimensionExpr)] [] () () None ()) (b [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(x [] [] () () None ())] () )] [(Assignment 0 x (Real "1.0") () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 10 () )] () [(ConcurrentShared [i] ) (ConcurrentLocal [x] ) (ConcurrentDefault)] [(If 0 () (> (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) 0) [(Assignment 0 x (FuncCallOrArray sqrt [] [(() (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) () 0)] [] [] [] ) () ) (Assignment 0 (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) (- (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) (** x 2)) () )] [] () () () ) (Assignment 0 (FuncCallOrArray b [] [(() i () 0)] [] [] [] ) (- (FuncCallOrArray b [] [(() i () 0)] [] [] [] ) (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () () ) (Print 0 () [x] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-scopes1-502009a.json0000664000175000017500000000071215227365530022655 0ustar alastairalastair{ "basename": "asr-scopes1-502009a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/scopes1.f90", "infile_hash": "48ffe7d9bb1021077b7bec62634ec2682cbfc211123626d338ba0c9e", "outfile": null, "outfile_hash": null, "stdout": "asr-scopes1-502009a.stdout", "stdout_hash": "bc6115b3c8116af48d1661fb2c730c0da846f4b225e8c8b1b02bdada", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-complex_01-e4954b1.json0000664000175000017500000000076315227365530024032 0ustar alastairalastair{ "basename": "ast_f90-complex_01-e4954b1", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/complex_01.f90", "infile_hash": "e94aebc987a1655b49e1e31229a6c24ccdbed83af0ebf6a0fb4684f2", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-complex_01-e4954b1.stdout", "stdout_hash": "9b5ef2a8f61a2e9ab570290bdd332045b33d0222f0b927bdf95114d7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_without_line_01-9cd45b3.stdout0000664000175000017500000000032715227365530026573 0ustar alastairalastair(TranslationUnit [(Program __xx_main () [] [] [] [(Print 0 () [(String "OK" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/run-integerStringInput_64-3a7e5be.json0000664000175000017500000000074315227365530025733 0ustar alastairalastair{ "basename": "run-integerStringInput_64-3a7e5be", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/integerStringInput_64.f90", "infile_hash": "f64bda10179c74236d1e5aed88b279a5fa1d47231c976efa21b29044", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-integerStringInput_64-3a7e5be.stderr", "stderr_hash": "824fb237130e006fccf3f995a873aedd78fade3d45b2e6515b6470be", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-loop_test2-82d82ea.json0000664000175000017500000000073615227365530023555 0ustar alastairalastair{ "basename": "asr-loop_test2-82d82ea", "cmd": "lfortran --fixed-form --show-asr --no-color {infile} -o {outfile}", "infile": "tests/loop_test2.f", "infile_hash": "b0c94f235f33da51d9037d0833df0c1ca4aaef4f3a3a29c9426ba51b", "outfile": null, "outfile_hash": null, "stdout": "asr-loop_test2-82d82ea.stdout", "stdout_hash": "1361751a113123118f6852124c71c8941e47ba5c65a752c3ef6a79fe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-external_03-c3442bb.stdout0000664000175000017500000000641215227365530024330 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @a(float (float*)* %f) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %call_arg_value = alloca float, align 4 %r = alloca float, align 4 store float 2.000000e+00, float* %call_arg_value, align 4 %1 = call float %f(float* %call_arg_value) store float %1, float* %r, align 4 %2 = alloca i64, align 8 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %2, i32 0, i32 0, i32 0, i32 0, i32 0, float* %r) %4 = load i64, i64* %2, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_a FINALIZE_SYMTABLE_a: ; preds = %return ret void } declare float @f(float*) define void @b() { .entry: call void @a(float (float*)* @f.1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return ret void } declare float @f.1(float*) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) call void @b() br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_external_03 FINALIZE_SYMTABLE_external_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast-data_02-fe19614.json0000664000175000017500000000073715227365530022622 0ustar alastairalastair{ "basename": "ast-data_02-fe19614", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/data_02.f90", "infile_hash": "7e7b33c3da45ab7833ef6e631bd33ad056d787d8dffe159d891b400a", "outfile": null, "outfile_hash": null, "stdout": "ast-data_02-fe19614.stdout", "stdout_hash": "3896815f83d6b3c685602a66b6611ab7f13c0096ed628b2c45111a60", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp1-515bcd9.stderr0000664000175000017500000000024015227365530025112 0ustar alastairalastairsemantic error: Variable 'z12345678' is not declared --> tests/errors/cpp1.f90:7:13 | 7 | print *, x, X123, y | ^^^^ 'z12345678' is undeclared lfortran-0.64.0/tests/reference/llvm-print_01-63a0480.json0000664000175000017500000000074515227365530023134 0ustar alastairalastair{ "basename": "llvm-print_01-63a0480", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/print_01.f90", "infile_hash": "060acad8d292efd077defbe08288b2a97e3c32803df2e0d62edd5654", "outfile": null, "outfile_hash": null, "stdout": "llvm-print_01-63a0480.stdout", "stdout_hash": "bca6cea51335c5187634d6e542f0a229bad230ee8efda6c99b9b1591", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_1-3be6d43.json0000664000175000017500000000075315227365530024023 0ustar alastairalastair{ "basename": "ast-fixed_form_1-3be6d43", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/fixed_form_1.f", "infile_hash": "20f5de5731f83348f8c0c349bd114289e4a854a74f41d0a9a0d35903", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-fixed_form_1-3be6d43.stderr", "stderr_hash": "5e8f3c9a30fc2cf296386482a81ce2b336d5efbd98ead7d9521cfd2b", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_where-where_04-2ee4397.json0000664000175000017500000000077515227365530024403 0ustar alastairalastair{ "basename": "pass_where-where_04-2ee4397", "cmd": "lfortran --pass=where --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_04.f90", "infile_hash": "48449a9af8d215a5a118d0776d25e23b7b310df89b1775164ddfde5e", "outfile": null, "outfile_hash": null, "stdout": "pass_where-where_04-2ee4397.stdout", "stdout_hash": "77a21688c2b5e06acb1e2ee4d640c1b4c8ccd1919b2378b54d051678", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-complex_mul_test-562260f.json0000664000175000017500000000077215227365530024703 0ustar alastairalastair{ "basename": "asr-complex_mul_test-562260f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_mul_test.f90", "infile_hash": "908ba75c567d6ff4ba0e42cba3e974999d00e5d24710f4649ac212d6", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_mul_test-562260f.stdout", "stdout_hash": "6096c01cce8e6f1481cb68b4c09e5fe9869e270eb5c46344f1d58f68", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/obj-program_cmake_01-17bdeab.json0000664000175000017500000000063215227365530024702 0ustar alastairalastair{ "basename": "obj-program_cmake_01-17bdeab", "cmd": "lfortran --no-color -c {infile} -o output.o", "infile": "tests/../integration_tests/program_cmake_01.f90", "infile_hash": "0e854d9b2ed613d6193d78290dc20a45ec66f60ab17e1c0229c3febe", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-expr_09-838f740.json0000664000175000017500000000073015227365530023130 0ustar alastairalastair{ "basename": "julia-expr_09-838f740", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/expr_09.f90", "infile_hash": "3b99f849ef5412d7fbc16bc164307d14964150e05dd203596a3e6dd8", "outfile": null, "outfile_hash": null, "stdout": "julia-expr_09-838f740.stdout", "stdout_hash": "dfc8fad1ddd91697f4084288a8ab590e5ca80090ec727762d13c7977", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-wasm1-8a138d6.stdout0000664000175000017500000001653415227365530023016 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param i32 i32) (result i32))) (type (;3;) (func (param i64 i64) (result i64))) (type (;4;) (func (param i32) (result i32))) (type (;5;) (func (param i32 i32) (result i32))) (type (;6;) (func (param i32) (result i32))) (type (;7;) (func (param) (result))) (type (;8;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param i32 i32) (result i32) (local i32) local.get 0 local.get 1 i32.add local.set 2 local.get 2 return ) (func $3 (type 3) (param i64 i64) (result i64) (local i64) local.get 0 local.get 1 i64.add local.set 2 local.get 2 return ) (func $4 (type 4) (param i32) (result i32) (local i32 i32) i32.const 3 local.set 2 local.get 2 local.get 0 call 6 i32.mul local.set 1 local.get 1 return ) (func $5 (type 5) (param i32 i32) (result i32) (local i32) local.get 0 local.get 1 i32.add local.set 2 local.get 2 return ) (func $6 (type 6) (param i32) (result i32) (local i32) local.get 0 local.get 0 i32.mul local.set 1 local.get 1 return ) (func $7 (type 7) (param) (result) (local) i32.const 5 call 6 i64.extend_i32_s call 8 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 5 i32.const 4 call 2 i64.extend_i32_s call 8 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i64.const 4 i64.const 5 call 3 call 8 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 5 call 4 i64.extend_i32_s call 8 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 5 i32.const 4 call 5 i64.extend_i32_s call 8 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $8 (type 8) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "add" (func 2)) (export "add64" (func 3)) (export "computecirclearea" (func 4)) (export "my_add" (func 5)) (export "sqr" (func 6)) (export "_start" (func 7)) (export "print_i64" (func 8)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/asr-external_03-fe60427.json0000664000175000017500000000077515227365530023532 0ustar alastairalastair{ "basename": "asr-external_03-fe60427", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/external_03.f90", "infile_hash": "82ee198be6d031398277671c0c2f48a832124a1458e94c3317d080ba", "outfile": null, "outfile_hash": null, "stdout": "asr-external_03-fe60427.stdout", "stdout_hash": "a53a72676f794cf481a8a3528d08a465e8dd1dd9c51c14568d9dbabf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_18-e69cac3.json0000664000175000017500000000077215227365530024721 0ustar alastairalastair{ "basename": "asr-derived_types_18-e69cac3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_18.f90", "infile_hash": "fe7b84ad65fd65a338c06a92b43e05adbdbc69fa945465295f9aefb7", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_18-e69cac3.stdout", "stdout_hash": "9174dded3639753574af46692b4e6b90b75f21c8fc333f9a1c57e8c4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-type_casting_01-4e8a892.json0000664000175000017500000000075115227365530024400 0ustar alastairalastair{ "basename": "asr-type_casting_01-4e8a892", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/type_casting_01.f90", "infile_hash": "9385ba3715f01c20aaa23ba05b0a20383ed149344bc72e7ede478970", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-type_casting_01-4e8a892.stderr", "stderr_hash": "372b13217c84710fd3f0d667e77c8a2f2516da635a765fedc1858a4d", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-real_dp_param-3adbc5b.stdout0000664000175000017500000001675315227365530024756 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { real_dp_param: (Program (SymbolTable 2 { prec1: (Variable 2 prec1 [] Local (IntegerConstant 4 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prec2: (Variable 2 prec2 [] Local (IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local (RealConstant 1.050000 (Real 4) ) (RealConstant 1.050000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 2 v [] Local (Cast (RealConstant 1.050000 (Real 4) ) RealToReal (Real 8) (RealConstant 1.050000 (Real 8) ) () ) (RealConstant 1.050000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zero: (Variable 2 zero [] Local (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (RealConstant 0.000000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) real_dp_param [] [(Print (StringFormat () [(Var 2 u) (Var 2 v) (Var 2 zero)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err5-38d12de.json0000664000175000017500000000076015227365530025441 0ustar alastairalastair{ "basename": "asr_preprocess-cpp_err5-38d12de", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp_err5.f90", "infile_hash": "01035d3623d53c8ebd4bc5480285bb86e44a0f1e138bea7619972dd4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp_err5-38d12de.stderr", "stderr_hash": "3966919982985df5bd5b492228a58d90a23ef0333b6d22b176851c3a", "returncode": 2 }lfortran-0.64.0/tests/reference/run-format_24-257ddde.json0000664000175000017500000000071515227365530023355 0ustar alastairalastair{ "basename": "run-format_24-257ddde", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_24.f90", "infile_hash": "99034e6786ee2c33055ce1a71b2d06c850dded80ec23526fd1c8f163", "outfile": null, "outfile_hash": null, "stdout": "run-format_24-257ddde.stdout", "stdout_hash": "e995d2eab8e696ac156366747893a7db81c0757b25fac494d292f07f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-real_dp_param-bac42bc.stdout0000664000175000017500000000556315227365530025135 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @real_dp_param.u = internal global float 0x3FF0CCCCC0000000 @real_dp_param.v = internal global double 0x3FF0CCCCC0000000 @real_dp_param.zero = internal global double 0.000000e+00 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [9 x i8] c"R4,R8,R8\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %prec1 = alloca i32, align 4 store i32 4, i32* %prec1, align 4 %prec2 = alloca i32, align 4 store i32 8, i32* %prec2, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* @real_dp_param.u, double* @real_dp_param.v, double* @real_dp_param.zero) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_real_dp_param FINALIZE_SYMTABLE_real_dp_param: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/run-format_40-9ce331f.stdout0000664000175000017500000000007615227365530023643 0ustar alastairalastair3.E+0 0.E+0 1.E+1 3.E+3 3.E+1 4.E+2 3.E+4 -5.E+0 1.E-5 1.E+11 lfortran-0.64.0/tests/reference/run-write_01-c968b4a.stderr0000664000175000017500000000012715227365530023463 0ustar alastairalastairRuntime Error: Format mismatch between OPEN statement and WRITE statement on unit -10. lfortran-0.64.0/tests/reference/llvm-operator_overloading_03-d9fd880.stdout0000664000175000017500000004664015227365530026764 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data = private constant [4 x i8] c"T>T:" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.2 = private constant [4 x i8] c"T>F:" @string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.2, i32 0, i32 0), i64 4 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.5 = private constant [4 x i8] c"F>T:" @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.5, i32 0, i32 0), i64 4 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.7 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.8 = private constant [4 x i8] c"F>F:" @string_const.9 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.8, i32 0, i32 0), i64 4 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.10 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.11 = private constant [4 x i8] c"T @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.13 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.14 = private constant [4 x i8] c"T @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.16 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.17 = private constant [4 x i8] c"F @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.19 = private unnamed_addr constant [13 x i8] c"S-DESC-4,L32\00", align 1 @string_const_data.20 = private constant [4 x i8] c"F @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_operator_overloading_01_overload_comp_m_greater_than_inverse(i32* %log1, i32* %log2) { .entry: %greater_than_inverse = alloca i32, align 4 %0 = load i32, i32* %log1, align 4 %1 = load i32, i32* %log2, align 4 %2 = and i32 1, %1 %3 = xor i32 %0, %2 %4 = xor i32 %3, 1 %5 = xor i32 %4, 0 %6 = xor i32 %5, 1 %7 = icmp ne i32 %6, 0 br i1 %7, label %then, label %else then: ; preds = %.entry store i32 1, i32* %greater_than_inverse, align 4 br label %ifcont else: ; preds = %.entry store i32 0, i32* %greater_than_inverse, align 4 br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_greater_than_inverse FINALIZE_SYMTABLE_greater_than_inverse: ; preds = %return %8 = load i32, i32* %greater_than_inverse, align 4 ret i32 %8 } define i32 @__module_operator_overloading_01_overload_comp_m_less_than_inverse(i32* %log1, i32* %log2) { .entry: %less_than_inverse = alloca i32, align 4 %0 = load i32, i32* %log1, align 4 %1 = load i32, i32* %log2, align 4 %2 = and i32 0, %1 %3 = xor i32 %0, %2 %4 = xor i32 %3, 1 %5 = xor i32 %4, 1 %6 = xor i32 %5, 1 %7 = icmp ne i32 %6, 0 br i1 %7, label %then, label %else then: ; preds = %.entry store i32 1, i32* %less_than_inverse, align 4 br label %ifcont else: ; preds = %.entry store i32 0, i32* %less_than_inverse, align 4 br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_less_than_inverse FINALIZE_SYMTABLE_less_than_inverse: ; preds = %return %8 = load i32, i32* %less_than_inverse, align 4 ret i32 %8 } define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc19 = alloca %string_descriptor, align 8 %stringFormat_desc16 = alloca %string_descriptor, align 8 %stringFormat_desc13 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %f = alloca i32, align 4 store i32 0, i32* %f, align 4 %t = alloca i32, align 4 store i32 1, i32* %t, align 4 %3 = alloca i64, align 8 %4 = call i32 @__module_operator_overloading_01_overload_comp_m_greater_than_inverse(i32* %t, i32* %t) %5 = alloca i32, align 4 store i32 %4, i32* %5, align 4 %6 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* %5) %7 = load i64, i64* %3, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %6, i8** %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %7, i64* %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %11 = load i8*, i8** %10, align 8 %12 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %13 = load i64, i64* %12, align 8 %14 = trunc i64 %13 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %11, i32 %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %15 = icmp eq i8* %6, null br i1 %15, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %6) br label %free_done free_done: ; preds = %free_nonnull, %.entry %16 = alloca i64, align 8 %17 = call i32 @__module_operator_overloading_01_overload_comp_m_greater_than_inverse(i32* %t, i32* %f) %18 = alloca i32, align 4 store i32 %17, i32* %18, align 4 %19 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.1, i32 0, i32 0), i64* %16, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.3, i32* %18) %20 = load i64, i64* %16, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %19, i8** %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %20, i64* %22, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %24 = load i8*, i8** %23, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %26 = load i64, i64* %25, align 8 %27 = trunc i64 %26 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %24, i32 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %28 = icmp eq i8* %19, null br i1 %28, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %19) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %29 = alloca i64, align 8 %30 = call i32 @__module_operator_overloading_01_overload_comp_m_greater_than_inverse(i32* %f, i32* %t) %31 = alloca i32, align 4 store i32 %30, i32* %31, align 4 %32 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.4, i32 0, i32 0), i64* %29, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.6, i32* %31) %33 = load i64, i64* %29, align 8 %34 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %32, i8** %34, align 8 %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %33, i64* %35, align 8 %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %37 = load i8*, i8** %36, align 8 %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %39 = load i64, i64* %38, align 8 %40 = trunc i64 %39 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %37, i32 %40, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %41 = icmp eq i8* %32, null br i1 %41, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %32) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %42 = alloca i64, align 8 %43 = call i32 @__module_operator_overloading_01_overload_comp_m_greater_than_inverse(i32* %f, i32* %f) %44 = alloca i32, align 4 store i32 %43, i32* %44, align 4 %45 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.7, i32 0, i32 0), i64* %42, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.9, i32* %44) %46 = load i64, i64* %42, align 8 %47 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %45, i8** %47, align 8 %48 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %46, i64* %48, align 8 %49 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %50 = load i8*, i8** %49, align 8 %51 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %52 = load i64, i64* %51, align 8 %53 = trunc i64 %52 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %50, i32 %53, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %54 = icmp eq i8* %45, null br i1 %54, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %free_done6 call void @_lfortran_free_alloc(i8* %2, i8* %45) br label %free_done9 free_done9: ; preds = %free_nonnull8, %free_done6 %55 = alloca i64, align 8 %56 = call i32 @__module_operator_overloading_01_overload_comp_m_less_than_inverse(i32* %t, i32* %t) %57 = alloca i32, align 4 store i32 %56, i32* %57, align 4 %58 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.10, i32 0, i32 0), i64* %55, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.12, i32* %57) %59 = load i64, i64* %55, align 8 %60 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %58, i8** %60, align 8 %61 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %59, i64* %61, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %63 = load i8*, i8** %62, align 8 %64 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %65 = load i64, i64* %64, align 8 %66 = trunc i64 %65 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %63, i32 %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %67 = icmp eq i8* %58, null br i1 %67, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %free_done9 call void @_lfortran_free_alloc(i8* %2, i8* %58) br label %free_done12 free_done12: ; preds = %free_nonnull11, %free_done9 %68 = alloca i64, align 8 %69 = call i32 @__module_operator_overloading_01_overload_comp_m_less_than_inverse(i32* %t, i32* %f) %70 = alloca i32, align 4 store i32 %69, i32* %70, align 4 %71 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.13, i32 0, i32 0), i64* %68, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.15, i32* %70) %72 = load i64, i64* %68, align 8 %73 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 store i8* %71, i8** %73, align 8 %74 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 store i64 %72, i64* %74, align 8 %75 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 %76 = load i8*, i8** %75, align 8 %77 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 %78 = load i64, i64* %77, align 8 %79 = trunc i64 %78 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %76, i32 %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %80 = icmp eq i8* %71, null br i1 %80, label %free_done15, label %free_nonnull14 free_nonnull14: ; preds = %free_done12 call void @_lfortran_free_alloc(i8* %2, i8* %71) br label %free_done15 free_done15: ; preds = %free_nonnull14, %free_done12 %81 = alloca i64, align 8 %82 = call i32 @__module_operator_overloading_01_overload_comp_m_less_than_inverse(i32* %f, i32* %t) %83 = alloca i32, align 4 store i32 %82, i32* %83, align 4 %84 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.16, i32 0, i32 0), i64* %81, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.18, i32* %83) %85 = load i64, i64* %81, align 8 %86 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 store i8* %84, i8** %86, align 8 %87 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 store i64 %85, i64* %87, align 8 %88 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 %89 = load i8*, i8** %88, align 8 %90 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 %91 = load i64, i64* %90, align 8 %92 = trunc i64 %91 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %89, i32 %92, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %93 = icmp eq i8* %84, null br i1 %93, label %free_done18, label %free_nonnull17 free_nonnull17: ; preds = %free_done15 call void @_lfortran_free_alloc(i8* %2, i8* %84) br label %free_done18 free_done18: ; preds = %free_nonnull17, %free_done15 %94 = alloca i64, align 8 %95 = call i32 @__module_operator_overloading_01_overload_comp_m_less_than_inverse(i32* %f, i32* %f) %96 = alloca i32, align 4 store i32 %95, i32* %96, align 4 %97 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.19, i32 0, i32 0), i64* %94, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.21, i32* %96) %98 = load i64, i64* %94, align 8 %99 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 store i8* %97, i8** %99, align 8 %100 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 store i64 %98, i64* %100, align 8 %101 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 %102 = load i8*, i8** %101, align 8 %103 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 %104 = load i64, i64* %103, align 8 %105 = trunc i64 %104 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* %102, i32 %105, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0), i32 1) %106 = icmp eq i8* %97, null br i1 %106, label %free_done21, label %free_nonnull20 free_nonnull20: ; preds = %free_done18 call void @_lfortran_free_alloc(i8* %2, i8* %97) br label %free_done21 free_done21: ; preds = %free_nonnull20, %free_done18 br label %return return: ; preds = %free_done21 br label %FINALIZE_SYMTABLE_operator_overloading_01 FINALIZE_SYMTABLE_operator_overloading_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-global_scope7-69a167f.json0000664000175000017500000000073715227365530024317 0ustar alastairalastair{ "basename": "llvm-global_scope7-69a167f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/global_scope7.f90", "infile_hash": "b3d005db52f7a57b335928fc6d884d6fdee0654c64fc98c2e797e242", "outfile": null, "outfile_hash": null, "stdout": "llvm-global_scope7-69a167f.stdout", "stdout_hash": "3fff9b0cb1b64310f41a8590519bbf98c87a3b33c6472c43a7cb47fb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-save_03-1103dd0.stdout0000664000175000017500000032245415227365530023177 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { save_03: (Program (SymbolTable 13 { i: (Variable 13 i [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 13 j [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 13 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 13 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 13 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 13 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 13 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_03 [] [] ), save_func: (Function (SymbolTable 6 { i: (Variable 6 i [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 6 j [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 6 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 6 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 6 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 6 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 6 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func: (Variable 6 save_func [] ReturnVar () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_func (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 6 save_func) Public .true. .true. () ), save_module_03: (Module (SymbolTable 10 { i: (Variable 10 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 10 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 10 k [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 10 l [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func_mod: (Function (SymbolTable 12 { i: (Variable 12 i [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 12 j [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 12 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 12 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 12 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 12 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 12 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func_mod: (Variable 12 save_func_mod [] ReturnVar () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_func_mod (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 12 save_func_mod) Public .true. .true. () ), save_sub_mod: (Function (SymbolTable 11 { i: (Variable 11 i [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 11 j [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 11 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 11 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 11 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 11 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 11 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_sub_mod (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ) }) save_module_03 () [] .false. .false. .false. ), save_nested_func: (Function (SymbolTable 7 { i: (Variable 7 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 7 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func: (Function (SymbolTable 8 { k: (Variable 8 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 8 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 8 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 8 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 8 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func: (Variable 8 save_func [] ReturnVar () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_func (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 8 save_func) Public .true. .true. () ), save_nested_func: (Variable 7 save_nested_func [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_sub: (Function (SymbolTable 9 { k: (Variable 9 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 9 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 9 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 9 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 9 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ) }) save_nested_func (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 7 save_nested_func) Public .true. .true. () ), save_nested_sub: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 3 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func: (Function (SymbolTable 5 { k: (Variable 5 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 5 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 5 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 5 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 5 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_func: (Variable 5 save_func [] ReturnVar () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_func (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 5 save_func) Public .true. .true. () ), save_sub: (Function (SymbolTable 4 { k: (Variable 4 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 4 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 4 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 4 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 4 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ) }) save_nested_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ), save_sub: (Function (SymbolTable 2 { i: (Variable 2 i [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 2 l [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 2 o [] Local () () Save (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-string_12-e72e066.stdout0000664000175000017500000005001415227365530023557 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { string_12: (Program (SymbolTable 2 { digits: (Variable 2 digits [hex_digits] Local (StringSection (Var 2 hex_digits) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "0123456789" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "0123456789" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fullhex_digits: (Variable 2 fullhex_digits [] Local (StringConstant "0123456789ABCDEFabcdef" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "0123456789ABCDEFabcdef" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), hex_digits: (Variable 2 hex_digits [fullhex_digits] Local (StringSection (Var 2 fullhex_digits) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 16 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "0123456789ABCDEF" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "0123456789ABCDEF" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), letters: (Variable 2 letters [] Local (StringConstant "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" (String 1 (IntegerConstant 52 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" (String 1 (IntegerConstant 52 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 52 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lowercase: (Variable 2 lowercase [letters] Local (StringSection (Var 2 letters) (IntegerConstant 27 (Integer 4) Decimal) (StringLen (Var 2 letters) (Integer 4) (IntegerConstant 52 (Integer 4) Decimal) ) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "abcdefghijklmnopqrstuvwxyz" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "abcdefghijklmnopqrstuvwxyz" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lowerhex_digits: (Variable 2 lowerhex_digits [] Local (StringConstant "0123456789abcdef" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "0123456789abcdef" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), octal_digits: (Variable 2 octal_digits [digits] Local (StringSection (Var 2 digits) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "01234567" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "01234567" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 2 string [letters] Local (IntrinsicElementalFunction Char [(StringLen (Var 2 letters) (Integer 4) (IntegerConstant 52 (Integer 4) Decimal) )] 0 (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "4" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "4" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), uppercase: (Variable 2 uppercase [letters] Local (StringSection (Var 2 letters) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 26 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_12 [] [(Print (Var 2 fullhex_digits) ) (Print (Var 2 hex_digits) ) (Print (Var 2 lowerhex_digits) ) (Print (Var 2 digits) ) (Print (Var 2 octal_digits) ) (Print (Var 2 letters) ) (Print (Var 2 uppercase) ) (Print (Var 2 lowercase) ) (Print (StringFormat () [(StringConstant "char(" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringLen (Var 2 letters) (Integer 4) (IntegerConstant 52 (Integer 4) Decimal) ) (StringConstant ") = " (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 string)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (StringCompare (Var 2 string) NotEq (StringConstant "4" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_58-475e064.json0000664000175000017500000000071515227365530023144 0ustar alastairalastair{ "basename": "run-format_58-475e064", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_58.f90", "infile_hash": "f2170db3134d59fbefa690522bab88fc5f052e8a29518b7ef3814a2c", "outfile": null, "outfile_hash": null, "stdout": "run-format_58-475e064.stdout", "stdout_hash": "01411717970a71554dc0f09da55c75313b0232b0051bb64cd1ea4a53", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_where-where_01-94e4416.json0000664000175000017500000000077515227365530024316 0ustar alastairalastair{ "basename": "pass_where-where_01-94e4416", "cmd": "lfortran --pass=where --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/where_01.f90", "infile_hash": "b3e2251e4cd263f14db0266759a9af716dce48521dcd2f1e6eadce17", "outfile": null, "outfile_hash": null, "stdout": "pass_where-where_01-94e4416.stdout", "stdout_hash": "1fac10b807ff118d43114c7fdf29d552551996dc09eb60056f4413b5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dimension_attr-1c00ad6.stdout0000664000175000017500000002057215227365530025034 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { a: (Variable 2 a [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 a)] [(Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), main: (Program (SymbolTable 3 { a: (Variable 3 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 3 d [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 3 z [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(SubroutineCall 1 f () [((IntegerConstant 1 (Integer 4) Decimal))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-substring-73a0b8e.json0000664000175000017500000000073315227365530024154 0ustar alastairalastair{ "basename": "ast_f90-substring-73a0b8e", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/substring.f90", "infile_hash": "c8a378c73c450c69e6694f02f51b2e1706ee25ae2e9645c28fd98788", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-substring-73a0b8e.stdout", "stdout_hash": "12af24b0dac9f8a696bebaf4ff8b5fa0298864c7a410609252ed8a52", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_module-3f800f0.json0000664000175000017500000000076015227365530024723 0ustar alastairalastair{ "basename": "ast-fixedform_module-3f800f0", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_module.f", "infile_hash": "032fb00debb25bd84eafae8de804901f317da59470d4206d18b7fad0", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_module-3f800f0.stdout", "stdout_hash": "2dc542642992285eb91bbfb115fcac0fdfbced5aa5f5e9fda8f7de40", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-expr_08-74f99b7.json0000664000175000017500000000072215227365530022707 0ustar alastairalastair{ "basename": "wat-expr_08-74f99b7", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/expr_08.f90", "infile_hash": "f460199051316c12de52e28e19545464f7a017f68a9a9db6a590a328", "outfile": null, "outfile_hash": null, "stdout": "wat-expr_08-74f99b7.stdout", "stdout_hash": "57b3bcf972234bcd4dc79435b60a32707804678200403c8bbe8aaebe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-fn4-83c4d1a.stdout0000664000175000017500000000125515227365530023172 0ustar alastairalastairfunction conform(mold, val, dim) type(*), intent(in) :: mold(..) type(*), intent(in), optional :: val(..) integer, intent(in), optional :: dim logical :: conform if (present(val)) then if (present(dim)) then if (dim > 0 .and. dim <= rank(mold) .and. dim <= rank(val)) then conform = size(mold, dim=dim) == size(val, dim=dim) else error stop "Runtime error: Illegal dim argument provided in conform" end if else if (rank(val) == rank(mold)) then conform = all(shape(mold) == shape(val)) else conform = .false. end if end if else conform = .true. end if end function conform lfortran-0.64.0/tests/reference/asr-cmd_02-ba58262.json0000664000175000017500000000073415227365530022441 0ustar alastairalastair{ "basename": "asr-cmd_02-ba58262", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/cmd_02.f90", "infile_hash": "fc31fcafc39673c2cf4b192ea1cca649f864901bbc9b910f442cb5f9", "outfile": null, "outfile_hash": null, "stdout": "asr-cmd_02-ba58262.stdout", "stdout_hash": "32c8ff81691f0510172a22998b10bacafc686b13b3bf7b0f0106d0a2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-if_05-865c1b8.json0000664000175000017500000000071415227365530022312 0ustar alastairalastair{ "basename": "wat-if_05-865c1b8", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/if_05.f90", "infile_hash": "e17354307d88b9239319cbfd5ce6b117fd24e4aa2998deee3d8fe695", "outfile": null, "outfile_hash": null, "stdout": "wat-if_05-865c1b8.stdout", "stdout_hash": "5a6e95799d5aae339443d63295d7be6721472c9cdfaef1be882b86d4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_31-cd9bfef.json0000664000175000017500000000075015227365530023657 0ustar alastairalastair{ "basename": "asr-modules_31-cd9bfef", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_31.f90", "infile_hash": "871002e4224f4001cd7df45deab32b4ac08b22d4f6358d4965afddfe", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_31-cd9bfef.stdout", "stdout_hash": "a6f03793892d6892dd8817a73711b0d332cea800983b4178fd7ce0c1", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-int_dp_param-19bf015.json0000664000175000017500000000075615227365530024034 0ustar alastairalastair{ "basename": "asr-int_dp_param-19bf015", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/int_dp_param.f90", "infile_hash": "bb7549fda78172a3f68b883fd1423773bf823a71a4dd2f89476886b5", "outfile": null, "outfile_hash": null, "stdout": "asr-int_dp_param-19bf015.stdout", "stdout_hash": "759f9215726ef9b746ce42e9d70effdc4034d89ed6b51fcf78b647ab", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/tokens-boz1-719113d.json0000664000175000017500000000071215227365530022702 0ustar alastairalastair{ "basename": "tokens-boz1-719113d", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/boz1.f90", "infile_hash": "5bb9dc97e57fb92acadcdcfd70ffe99dfcfd6d1be490f4c6766a2543", "outfile": null, "outfile_hash": null, "stdout": "tokens-boz1-719113d.stdout", "stdout_hash": "963956fa5618ed087ff96ab6c55004d1eeba847628743783a5c8898b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-coarrays_01-9ca4565.stdout0000664000175000017500000000331315227365530024554 0ustar alastairalastairprogram coarrays_01 ! This test should test most of coarray syntax: ! * declarations ! * allocations ! * coarray operations ! ! You can test the syntax manually with GFortran by: ! gfortran -fcoarray=lib -c coarrays_01.f90 -o a.o ! use iso_fortran_env, only: event_type implicit none ! Coarray Declarations real, dimension(100), codimension[*] :: A integer :: B[3,*] integer :: c[*] real :: D(100,2)[3,*] real :: E(1,2,3)[1,2,-1:3,*] real, allocatable :: F(:)[:] real, allocatable :: g(:,:,:)[:,:,:] real, dimension(20), codimension[20,*] :: h real, codimension[:], allocatable :: z(:,:) character :: r(20)[20,0:*] type(event_type) :: ok_to_overwrite[*] type(event_type), allocatable :: greeting_ready(:)[:] integer :: i, n ! Allocation n = 5 allocate(F(n)[*]) allocate(greeting_ready(num_images())[*]) allocate(g(50, 50, 50)[1:2, 1:2, *]) ! Array access, events, teams if (this_image() == 1) then do i = 2, num_images() c = c + c[i] event post (ok_to_overwrite[i]) end do else event wait (ok_to_overwrite) event post (greeting_ready(this_image())[1]) end if sync all sync all () sync all (stat = status) sync all (errmsg = status) event wait (variable, until_count = status) event wait (variable, until_count = status, errmsg = status) event wait (variable, errmsg = status) event wait (variable, stat = status) event post (done(sub(i))[parent(i)], stat = status) event post (variable, stat = status) event post (variable, errmsg = status) s%a(3)(4) = "S" s%b[3] = c[4] s%c(3)[4] = f(3)[4] c[3] = c[4] B[1, 2] = B[3, 4] D(99, 1)[3, 4] = D(1, 2)[1, 2] D(99, 1)[3, 3] = 5 D(:, 1)[3, 3] = 5 D(:, 1)[3, 3, team=3] = 5 D(:, 1)[3, 3, team=3, stat=i] = 5 D(:, 1)[3, 3, stat=i] = 5 end program coarrays_01 lfortran-0.64.0/tests/reference/llvm-associate_03-68dfbc7.stdout0000664000175000017500000001374515227365530024570 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @associate_03.t1 = internal global i32 2 @associate_03.t2 = internal global i32 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %p1 = alloca i32*, align 8 store i32* null, i32** %p1, align 8 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @associate_03.t1, i32* @associate_03.t2) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry %14 = load i32, i32* @associate_03.t1, align 4 %15 = load i32, i32* @associate_03.t2, align 4 %16 = icmp sgt i32 %14, %15 br i1 %16, label %then, label %else then: ; preds = %free_done store i32* @associate_03.t1, i32** %p1, align 8 br label %ifcont else: ; preds = %free_done store i32* @associate_03.t2, i32** %p1, align 8 br label %ifcont ifcont: ; preds = %else, %then %17 = alloca i64, align 8 %18 = load i32*, i32** %p1, align 8 %19 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %18) %20 = load i64, i64* %17, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %19, i8** %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %20, i64* %22, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %24 = load i8*, i8** %23, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %26 = load i64, i64* %25, align 8 %27 = trunc i64 %26 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %24, i32 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %28 = icmp eq i8* %19, null br i1 %28, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %2, i8* %19) br label %free_done3 free_done3: ; preds = %free_nonnull2, %ifcont %29 = load i32*, i32** %p1, align 8 %30 = load i32, i32* %29, align 4 store i32 %30, i32* %i, align 4 %31 = load i32, i32* %i, align 4 %32 = load i32, i32* @associate_03.t2, align 4 %33 = icmp eq i32 %31, %32 br i1 %33, label %then4, label %else5 then4: ; preds = %free_done3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %free_done3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 br label %return return: ; preds = %ifcont6 br label %FINALIZE_SYMTABLE_associate_03 FINALIZE_SYMTABLE_associate_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/asr-subroutines_09-83ddd2b.json0000664000175000017500000000076415227365530024433 0ustar alastairalastair{ "basename": "asr-subroutines_09-83ddd2b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_09.f90", "infile_hash": "3f6ea6213db107e0cec3cc74bd308164cc52607efc6f85e7a7a389aa", "outfile": null, "outfile_hash": null, "stdout": "asr-subroutines_09-83ddd2b.stdout", "stdout_hash": "860eef79af07842847d50623c1ee990743752d90787cf0c861e5eb95", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character_02-56bfff3.stdout0000664000175000017500000000651515227365530024356 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { character_02: (Program (SymbolTable 2 { toml_base: (Variable 2 toml_base [] Local (ArrayConstant 4 ["1", "2", "3", "$"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] PointerArray ) ColMajor ) (ArrayConstant 4 ["1", "2", "3", "$"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] PointerArray ) ColMajor ) Parameter (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) character_02 [] [(Print (StringFormat () [(Var 2 toml_base)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-issue532-4bdd3b3.json0000664000175000017500000000071515227365530023112 0ustar alastairalastair{ "basename": "asr-issue532-4bdd3b3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/issue532.f90", "infile_hash": "75f4785bea0a877f7a902640ffcc5d276bd955349ff3df1639d6e6b7", "outfile": null, "outfile_hash": null, "stdout": "asr-issue532-4bdd3b3.stdout", "stdout_hash": "ab64a1467df9eea8b7a197af490881138721a2df5f294a70a6b9bd45", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-arrays_01-81f01a2.json0000664000175000017500000000073615227365530023510 0ustar alastairalastair{ "basename": "julia-arrays_01-81f01a2", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/arrays_01.f90", "infile_hash": "f7df4142feb383f836dfa072a60673922e8873b5695f893be8329b89", "outfile": null, "outfile_hash": null, "stdout": "julia-arrays_01-81f01a2.stdout", "stdout_hash": "bc2771e2dedd62f7531756913234c46ef6e75d6392e397abdb3df43f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-show_errors1-cc473c3.json0000664000175000017500000000075515227365530024115 0ustar alastairalastair{ "basename": "asr-show_errors1-cc473c3", "cmd": "lfortran --show-errors --continue-compilation --no-color {infile}", "infile": "tests/errors/show_errors1.f90", "infile_hash": "8170b98a784b460b9353a740f0f117160e3070b0f88fd4d9c98ebcaf", "outfile": null, "outfile_hash": null, "stdout": "asr-show_errors1-cc473c3.stdout", "stdout_hash": "50cedac153912dd18ac3a537a71a116e7a0d5281129eb7a670fa62b7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-do7-8069d7a.stdout0000664000175000017500000000320415227365530022630 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %a = alloca i32, align 4 %i = alloca i32, align 4 store i32 0, i32* %i, align 4 br label %loop.head loop.head: ; preds = %loop.body, %.entry %2 = load i32, i32* %i, align 4 %3 = add i32 %2, 1 %4 = icmp sle i32 %3, 10 br i1 %4, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %5 = load i32, i32* %i, align 4 %6 = add i32 %5, 1 store i32 %6, i32* %i, align 4 store i32 5, i32* %call_arg_value, align 4 %7 = call i32 @f(i32* %call_arg_value) store i32 %7, i32* %a, align 4 br label %loop.head loop.end: ; preds = %loop.head br label %return return: ; preds = %loop.end br label %FINALIZE_SYMTABLE_do7 FINALIZE_SYMTABLE_do7: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } define i32 @f(i32* %a) { .entry: %f = alloca i32, align 4 %0 = load i32, i32* %a, align 4 %1 = add i32 %0, 1 store i32 %1, i32* %f, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return %2 = load i32, i32* %f, align 4 ret i32 %2 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/run-implicit_typing1-40bb07b.json0000664000175000017500000000077115227365530024751 0ustar alastairalastair{ "basename": "run-implicit_typing1-40bb07b", "cmd": "lfortran --implicit-typing --disable-implicit-typing --no-color {infile}", "infile": "tests/implicit_typing1.f90", "infile_hash": "e6d1a0c4cb70b6dec80c447e80d4567c3a25f29c7164e956ddfba662", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-implicit_typing1-40bb07b.stderr", "stderr_hash": "fb96f08b2d0e268a7652c10ceee84208546b1e2f786812f42c656613", "returncode": 1 }lfortran-0.64.0/tests/reference/ast-common2-1811464.json0000664000175000017500000000072515227365530022610 0ustar alastairalastair{ "basename": "ast-common2-1811464", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/common2.f", "infile_hash": "761ba9bcb69efc19ad1828c9ebc8deab710d02f98f6722736d6a4dd2", "outfile": null, "outfile_hash": null, "stdout": "ast-common2-1811464.stdout", "stdout_hash": "a4c08f6f4de3cee96ae4ee89d420bdeeaf16a21bb8a2d807bc848206", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-fixed_form_call3-8c7b642.json0000664000175000017500000000100515227365530024573 0ustar alastairalastair{ "basename": "asr-fixed_form_call3-8c7b642", "cmd": "lfortran --fixed-form --implicit-interface --show-asr --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_call3.f", "infile_hash": "d0980dc66f3d039f2f11de3b1dbb87c3c5e2db5a8ddcdcb480adfb6e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-fixed_form_call3-8c7b642.stderr", "stderr_hash": "ab1a497605476706e39b3a5cf0f850464574fd18ca9b34c4e74c999b", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-matmul_01-7b0b0c2.stdout0000664000175000017500000102641515227365530023620 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { matmul_01: (Program (SymbolTable 6 { a: (Variable 6 a [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 6 b [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 6 c [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c2: (Variable 6 c2 [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 6 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), err: (Variable 6 err [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fma_clock: (Variable 6 fma_clock [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), freq: (Variable 6 freq [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ghz: (Variable 6 ghz [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 6 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iter: (Variable 6 iter [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), matmul1: (ExternalSymbol 6 matmul1 2 matmul1 matmul_01_cpu [] matmul1 Public ), matmul2: (ExternalSymbol 6 matmul2 2 matmul2 matmul_01_cpu [] matmul2 Public ), measured: (Variable 6 measured [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 6 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), percent_peak: (Variable 6 percent_peak [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 6 t [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 6 t1 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 6 t2 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) matmul_01 [matmul_01_cpu] [(Assignment (Var 6 n) (IntegerConstant 96 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 6 iter) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(StringConstant "Size (n x n): n =" (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 n)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Iter =" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 iter)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Size MB:" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (RealBinOp (RealBinOp (RealBinOp (RealConstant 4.000000 (Real 8) ) Mul (Cast (Var 6 n) IntegerToReal (Real 8) () () ) (Real 8) () ) Mul (Cast (Var 6 n) IntegerToReal (Real 8) () () ) (Real 8) () ) Div (Cast (IntegerBinOp (IntegerConstant 1024 (Integer 4) Decimal) Pow (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 1048576 (Integer 4) Decimal) ) IntegerToReal (Real 8) (RealConstant 1048576.000000 (Real 8) ) () ) (Real 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Allocate [((Var 6 a) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ()) ((Var 6 b) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ()) ((Var 6 c) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ()) ((Var 6 c2) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ())] () () () ) (IntrinsicImpureSubroutine RandomNumber [(Var 6 a)] 0 ) (IntrinsicImpureSubroutine RandomNumber [(Var 6 b)] 0 ) (Print (StringConstant "Fortran intrinsic matmul:" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t1)] 0 ) (DoLoop () ((Var 6 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 6 iter) ()) [(Assignment (Var 6 c) (IntrinsicArrayFunction MatMul [(Var 6 a) (Var 6 b)] 3 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) () .false. .false. )] [] ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t2)] 0 ) (Assignment (Var 6 t) (RealBinOp (RealBinOp (Var 6 t2) Sub (Var 6 t1) (Real 8) () ) Div (Cast (Var 6 iter) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 ghz) (RealConstant 1000000000.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 6 fma_clock) (RealConstant 0.062500 (Real 8) ) () .false. .false. ) (Assignment (Var 6 freq) (RealBinOp (RealConstant 3.200000 (Real 8) ) Mul (Var 6 ghz) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 measured) (RealBinOp (RealBinOp (Var 6 t) Mul (Var 6 freq) (Real 8) () ) Div (Cast (IntegerBinOp (Var 6 n) Pow (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 percent_peak) (RealBinOp (RealBinOp (Var 6 fma_clock) Div (Var 6 measured) (Real 8) () ) Mul (Cast (IntegerConstant 100 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 100.000000 (Real 8) ) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Time: " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 t)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Clock cycles per element:" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(StringConstant "Theoretical performance peak:" (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 fma_clock) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Measured: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 measured) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Percent peak: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 percent_peak) (StringConstant "%" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "matmul2:" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t1)] 0 ) (DoLoop () ((Var 6 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 6 iter) ()) [(SubroutineCall 6 matmul2 () [((Var 6 a)) ((Var 6 b)) ((Var 6 c2))] () .false. )] [] ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t2)] 0 ) (Assignment (Var 6 err) (IntrinsicArrayFunction MaxVal [(IntrinsicElementalFunction Abs [(RealBinOp (Var 6 c) Sub (Var 6 c2) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )] 0 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )] 0 (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Error:" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 err)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 6 t) (RealBinOp (RealBinOp (Var 6 t2) Sub (Var 6 t1) (Real 8) () ) Div (Cast (Var 6 iter) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 ghz) (RealConstant 1000000000.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 6 fma_clock) (RealConstant 0.062500 (Real 8) ) () .false. .false. ) (Assignment (Var 6 freq) (RealBinOp (RealConstant 3.200000 (Real 8) ) Mul (Var 6 ghz) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 measured) (RealBinOp (RealBinOp (Var 6 t) Mul (Var 6 freq) (Real 8) () ) Div (Cast (IntegerBinOp (Var 6 n) Pow (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 percent_peak) (RealBinOp (RealBinOp (Var 6 fma_clock) Div (Var 6 measured) (Real 8) () ) Mul (Cast (IntegerConstant 100 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 100.000000 (Real 8) ) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Time: " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 t)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Clock cycles per element:" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(StringConstant "Theoretical performance peak:" (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 fma_clock) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Measured: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 measured) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Percent peak: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 percent_peak) (StringConstant "%" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (Var 6 err) Gt (RealConstant 0.001000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "matmul1:" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t1)] 0 ) (DoLoop () ((Var 6 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 6 iter) ()) [(SubroutineCall 6 matmul1 () [((Var 6 a)) ((Var 6 b)) ((Var 6 c2))] () .false. )] [] ) (IntrinsicImpureSubroutine CpuTime [(Var 6 t2)] 0 ) (Assignment (Var 6 err) (IntrinsicArrayFunction MaxVal [(IntrinsicElementalFunction Abs [(RealBinOp (Var 6 c) Sub (Var 6 c2) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )] 0 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )] 0 (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Error:" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 err)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 6 t) (RealBinOp (RealBinOp (Var 6 t2) Sub (Var 6 t1) (Real 8) () ) Div (Cast (Var 6 iter) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 ghz) (RealConstant 1000000000.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 6 fma_clock) (RealConstant 0.062500 (Real 8) ) () .false. .false. ) (Assignment (Var 6 freq) (RealBinOp (RealConstant 3.200000 (Real 8) ) Mul (Var 6 ghz) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 measured) (RealBinOp (RealBinOp (Var 6 t) Mul (Var 6 freq) (Real 8) () ) Div (Cast (IntegerBinOp (Var 6 n) Pow (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 8) () () ) (Real 8) () ) () .false. .false. ) (Assignment (Var 6 percent_peak) (RealBinOp (RealBinOp (Var 6 fma_clock) Div (Var 6 measured) (Real 8) () ) Mul (Cast (IntegerConstant 100 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 100.000000 (Real 8) ) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Time: " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 t)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Clock cycles per element:" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(StringConstant "Theoretical performance peak:" (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 fma_clock) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Measured: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 measured) (StringConstant "cycles" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "Percent peak: " (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 6 percent_peak) (StringConstant "%" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (Var 6 err) Gt (RealConstant 0.001000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ), matmul_01_cpu: (Module (SymbolTable 2 { kernel2: (Function (SymbolTable 4 { a: (Variable 4 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a0: (Variable 4 a0 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a1: (Variable 4 a1 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a2: (Variable 4 a2 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a3: (Variable 4 a3 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a4: (Variable 4 a4 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a5: (Variable 4 a5 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [] Out () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i1: (Variable 4 i1 [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 4 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 4 s1 [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u00: (Variable 4 u00 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u01: (Variable 4 u01 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u10: (Variable 4 u10 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u11: (Variable 4 u11 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u20: (Variable 4 u20 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u21: (Variable 4 u21 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u30: (Variable 4 u30 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u31: (Variable 4 u31 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u40: (Variable 4 u40 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u41: (Variable 4 u41 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u50: (Variable 4 u50 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u51: (Variable 4 u51 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) kernel2 (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 b) (Var 4 a) (Var 4 c) (Var 4 x) (Var 4 y) (Var 4 i1) (Var 4 s1)] [(Assignment (Var 4 u00) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u01) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u10) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u11) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u20) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u21) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u30) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u31) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u40) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u41) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u50) (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (Assignment (Var 4 u51) (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. ) (DoLoop () ((Var 4 k) (Var 4 i1) (IntegerBinOp (IntegerBinOp (Var 4 i1) Add (Var 4 s1) (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ()) [(Assignment (Var 4 a0) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u00) (RealBinOp (Var 4 u00) Add (RealBinOp (Var 4 a0) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u01) (RealBinOp (Var 4 u01) Add (RealBinOp (Var 4 a0) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 a1) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u10) (RealBinOp (Var 4 u10) Add (RealBinOp (Var 4 a1) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u11) (RealBinOp (Var 4 u11) Add (RealBinOp (Var 4 a1) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 a2) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u20) (RealBinOp (Var 4 u20) Add (RealBinOp (Var 4 a2) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u21) (RealBinOp (Var 4 u21) Add (RealBinOp (Var 4 a2) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 a3) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u30) (RealBinOp (Var 4 u30) Add (RealBinOp (Var 4 a3) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u31) (RealBinOp (Var 4 u31) Add (RealBinOp (Var 4 a3) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 a4) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u40) (RealBinOp (Var 4 u40) Add (RealBinOp (Var 4 a4) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u41) (RealBinOp (Var 4 u41) Add (RealBinOp (Var 4 a4) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 a5) (ArrayPhysicalCast (ArrayBroadcast (ArrayItem (Var 4 a) [(() (Var 4 k) ()) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u50) (RealBinOp (Var 4 u50) Add (RealBinOp (Var 4 a5) Mul (ArraySection (Var 4 b) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. ) (Assignment (Var 4 u51) (RealBinOp (Var 4 u51) Add (RealBinOp (Var 4 a5) Mul (ArraySection (Var 4 b) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (Var 4 k) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. )] [] ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u00) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u01) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u10) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u11) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u20) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u21) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u30) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u31) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u40) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u41) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((Var 4 y) (IntegerBinOp (Var 4 y) Add (IntegerConstant 7 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u50) () .false. .false. ) (Assignment (ArraySection (Var 4 c) [((IntegerBinOp (Var 4 y) Add (IntegerConstant 8 (Integer 4) Decimal) (Integer 4) () ) (IntegerBinOp (Var 4 y) Add (IntegerConstant 15 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal)) (() (IntegerBinOp (Var 4 x) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) ())] (Array (Real 4) [(() ())] DescriptorArray ) () ) (Var 4 u51) () .false. .false. )] () Public .true. .true. () ), matmul1: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Out () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 3 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 3 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) matmul1 (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c)] [(Assignment (Var 3 n) (ArraySize (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 3 c) (ArrayBroadcast (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 0.000000 (Real 4) ) () ) (IntrinsicArrayFunction Shape [(Var 3 c)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) () .false. .false. ) (DoLoop () ((Var 3 j) (IntegerConstant 1 (Integer 4) Decimal) (Var 3 n) ()) [(DoLoop () ((Var 3 k) (IntegerConstant 1 (Integer 4) Decimal) (Var 3 n) ()) [(DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 3 n) ()) [(Assignment (ArrayItem (Var 3 c) [(() (Var 3 i) ()) (() (Var 3 j) ())] (Real 4) ColMajor () ) (RealBinOp (ArrayItem (Var 3 c) [(() (Var 3 i) ()) (() (Var 3 j) ())] (Real 4) ColMajor () ) Add (RealBinOp (ArrayItem (Var 3 a) [(() (Var 3 i) ()) (() (Var 3 k) ())] (Real 4) ColMajor () ) Mul (ArrayItem (Var 3 b) [(() (Var 3 k) ()) (() (Var 3 j) ())] (Real 4) ColMajor () ) (Real 4) () ) (Real 4) () ) () .false. .false. )] [] )] [] )] [] )] () Public .true. .true. () ), matmul2: (Function (SymbolTable 5 { a: (Variable 5 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 5 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 5 c [] Out () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i1: (Variable 5 i1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i2: (Variable 5 i2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i3: (Variable 5 i3 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 5 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 5 s1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 5 s2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s3: (Variable 5 s3 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) matmul2 (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [kernel2] [(Var 5 a) (Var 5 b) (Var 5 c)] [(Assignment (Var 5 n) (ArraySize (Var 5 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 5 s3) (IntegerConstant 48 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 s2) (IntegerConstant 12 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 s1) (IntegerConstant 24 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 c) (ArrayBroadcast (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 0.000000 (Real 4) ) () ) (IntrinsicArrayFunction Shape [(Var 5 c)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) () .false. .false. ) (DoLoop () ((Var 5 i3) (IntegerConstant 1 (Integer 4) Decimal) (Var 5 n) (Var 5 s3)) [(DoLoop () ((Var 5 i2) (IntegerConstant 1 (Integer 4) Decimal) (Var 5 n) (Var 5 s2)) [(DoLoop () ((Var 5 i1) (IntegerConstant 1 (Integer 4) Decimal) (Var 5 n) (Var 5 s1)) [(DoLoop () ((Var 5 x) (Var 5 i2) (IntegerBinOp (IntegerBinOp (Var 5 i2) Add (Var 5 s2) (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 6 (Integer 4) Decimal)) [(DoLoop () ((Var 5 y) (Var 5 i3) (IntegerBinOp (IntegerBinOp (Var 5 i3) Add (Var 5 s3) (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (IntegerConstant 16 (Integer 4) Decimal)) [(SubroutineCall 2 kernel2 () [((ArrayPhysicalCast (Var 5 a) DescriptorArray DescriptorArray (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 5 b) DescriptorArray DescriptorArray (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 5 c) DescriptorArray DescriptorArray (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () )) ((Var 5 x)) ((Var 5 y)) ((Var 5 i1)) ((Var 5 s1))] () .false. )] [] )] [] )] [] )] [] )] [] )] () Public .true. .true. () ) }) matmul_01_cpu () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-func_arg_array-609769c.stderr0000664000175000017500000000027015227365530024642 0ustar alastairalastairsemantic error: Array passed into function has `6` elements but function expects `8`. --> tests/errors/func_arg_array.f90:4:14 | 4 | i = temp(myArray) | ^^^^^^^ lfortran-0.64.0/tests/reference/ast_disable_style_suggestion-implicit10-c95f35e.json0000664000175000017500000000103415227365530030610 0ustar alastairalastair{ "basename": "ast_disable_style_suggestion-implicit10-c95f35e", "cmd": "lfortran --show-ast --no-style-suggestions --no-color {infile} -o {outfile}", "infile": "tests/implicit10.f90", "infile_hash": "f0dec4633ec4724235e11ed6642f34f24f69c6f4dc41aab5ae903cfa", "outfile": null, "outfile_hash": null, "stdout": "ast_disable_style_suggestion-implicit10-c95f35e.stdout", "stdout_hash": "e766eabc3b601ac842b0fcd05655fbf683b50e15864c4e269840b3e6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-array2-456cd99.json0000664000175000017500000000070015227365530023123 0ustar alastairalastair{ "basename": "julia-array2-456cd99", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/array2.f90", "infile_hash": "ec67f153c5f506f6a12ef94b06d43c7e9e86b9fc33c9c196029183f0", "outfile": null, "outfile_hash": null, "stdout": "julia-array2-456cd99.stdout", "stdout_hash": "6626798dc1eb32ee609e58817932e55510893cdb5750ea30de9b8c7d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-block2-b06d9e1.stdout0000664000175000017500000001502015227365530023175 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { hybrd: (Function (SymbolTable 2 { delta: (Variable 2 delta [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fcn: (Function (SymbolTable 3 { n: (Variable 3 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fcn (FunctionType [(Integer 4)] () Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 n)] [] () Public .false. .false. () ), main: (Block (SymbolTable 4 { }) main [(Assignment (Var 2 delta) (IntrinsicElementalFunction Abs [(Var 2 ratio)] 0 (Real 4) () ) () .false. .false. )] ), ratio: (Variable 2 ratio [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) hybrd (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(BlockCall -1 2 main )] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/llvm-string_02-c37e098.json0000664000175000017500000000075015227365530023400 0ustar alastairalastair{ "basename": "llvm-string_02-c37e098", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/string_02.f90", "infile_hash": "249fc849c605e3aad0bd2c8a33e00523fdc2270b95caa69737801caa", "outfile": null, "outfile_hash": null, "stdout": "llvm-string_02-c37e098.stdout", "stdout_hash": "e29e488f2a412c845036e395fa46229fe5f6f377def3887f570e195f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-subroutines_03-9a95e25.json0000664000175000017500000000076415227365530024300 0ustar alastairalastair{ "basename": "ast-subroutines_03-9a95e25", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_03.f90", "infile_hash": "432c4d3eb84ddddcc76b5371ed559a4688bf1e31676bb7e14c2aa3cf", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutines_03-9a95e25.stdout", "stdout_hash": "5e7f70a6ebdee01f46f90d984e09f330fe85044ed5d493cab4365d98", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-read_97-ddfad35.json0000664000175000017500000000073715227365530023053 0ustar alastairalastair{ "basename": "asr-read_97-ddfad35", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/read_97.f90", "infile_hash": "22cc3a753dc92752da556dde074cb121a2e26263ae8290d34b6ff6f0", "outfile": null, "outfile_hash": null, "stdout": "asr-read_97-ddfad35.stdout", "stdout_hash": "c60a7293de0130872a332b85c7f8da3280469bb46e4ae51154a86bd5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-program1-29eca93.json0000664000175000017500000000072015227365530023373 0ustar alastairalastair{ "basename": "llvm-program1-29eca93", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/program1.f90", "infile_hash": "ec4ccdfed01d45648718ca57a9ceb3e5aa82e55e57d8906636902e7b", "outfile": null, "outfile_hash": null, "stdout": "llvm-program1-29eca93.stdout", "stdout_hash": "b890f45e1f991f70324ab531ea19d85370f161fc04d44a7ca2b4b813", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-functions_15-ce4c4bb.stdout0000664000175000017500000007661515227365530024513 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_15: (Program (SymbolTable 4 { a: (Variable 4 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 5 { f: (Variable 5 f [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] In () () Default (Integer 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4)] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 x)] [(Assignment (Var 5 f) (IntrinsicElementalFunction Present [(Var 5 x)] 0 (Logical 4) () ) () .false. .false. )] (Var 5 f) Public .true. .true. () ), sub_1: (ExternalSymbol 4 sub_1 2 sub_1 functions_15_module_1 [] sub_1 Public ) }) functions_15 [functions_15_module_1] [(Assignment (Var 4 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 4 b) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .true. (Logical 4) )) ((RealConstant 12.000000 (Real 4) )) ((IntegerConstant 5 (Integer 4) Decimal)) ((RealConstant 6.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .false. (Logical 4) )) (()) (()) ((RealConstant 6.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .true. (Logical 4) )) (()) ((IntegerConstant 78 (Integer 4) Decimal)) ((RealConstant 117.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .false. (Logical 4) )) ((RealConstant 58.000000 (Real 4) )) (()) ((RealConstant 123.000000 (Real 4) ))] () .false. ) (Print (StringFormat () [(Var 4 a) (Var 4 b)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 4 a) NotEq (IntegerConstant 144288208 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 4 b) NotEq (RealConstant 1477476.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 4 f () [(())] (Logical 4) () () ) (FunctionCall 4 f () [((IntegerConstant 42 (Integer 4) Decimal))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), functions_15_module_1: (Module (SymbolTable 2 { sub_1: (Function (SymbolTable 3 { a: (Variable 3 a [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 3 d [] In () () Default (Real 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 3 e [] In () () Default (Integer 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 3 f [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub_1 (FunctionType [(Integer 4) (Real 4) (Logical 4) (Real 4) (Integer 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c) (Var 3 d) (Var 3 e) (Var 3 f)] [(If () (IntrinsicElementalFunction Present [(Var 3 d)] 0 (Logical 4) () ) [(Assignment (Var 3 a) (Cast (RealBinOp (RealBinOp (Var 3 b) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) Add (Var 3 d) (Real 4) () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (If () (IntrinsicElementalFunction Present [(Var 3 e)] 0 (Logical 4) () ) [(Assignment (Var 3 b) (RealBinOp (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) Add (Cast (Var 3 e) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. )] [(Assignment (Var 3 b) (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) () .false. .false. )] )] [(Assignment (Var 3 a) (Cast (RealBinOp (Var 3 b) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (If () (IntrinsicElementalFunction Present [(Var 3 e)] 0 (Logical 4) () ) [(Assignment (Var 3 b) (RealBinOp (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) Add (Cast (Var 3 e) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. )] [(Assignment (Var 3 b) (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) () .false. .false. )] )] )] () Public .true. .true. () ) }) functions_15_module_1 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-operator_overloading_02-adb886e.stdout0000664000175000017500000001256515227365530027035 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [13 x i8] c"S-DESC-5,L32\00", align 1 @string_const_data = private constant [5 x i8] c"tf=0:" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([5 x i8], [5 x i8]* @string_const_data, i32 0, i32 0), i64 5 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [13 x i8] c"S-DESC-5,L32\00", align 1 @string_const_data.2 = private constant [5 x i8] c"tf=1:" @string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([5 x i8], [5 x i8]* @string_const_data.2, i32 0, i32 0), i64 5 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_overload_assignment_m_logical_gets_integer(i32* %tf, i32* %i) { .entry: %0 = load i32, i32* %i, align 4 %1 = icmp eq i32 %0, 0 %2 = zext i1 %1 to i32 store i32 %2, i32* %tf, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_logical_gets_integer FINALIZE_SYMTABLE_logical_gets_integer: ; preds = %return ret void } define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %tf = alloca i32, align 4 store i32 0, i32* %call_arg_value, align 4 call void @__module_overload_assignment_m_logical_gets_integer(i32* %tf, i32* %call_arg_value) %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* %tf) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry store i32 1, i32* %call_arg_value, align 4 call void @__module_overload_assignment_m_logical_gets_integer(i32* %tf, i32* %call_arg_value) %14 = alloca i64, align 8 %15 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info.1, i32 0, i32 0), i64* %14, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.3, i32* %tf) %16 = load i64, i64* %14, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %15, i8** %17, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %16, i64* %18, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %20 = load i8*, i8** %19, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %22 = load i64, i64* %21, align 8 %23 = trunc i64 %22 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %20, i32 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %24 = icmp eq i8* %15, null br i1 %24, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %15) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast-interface1-1906de3.stdout0000664000175000017500000000231515227365530023770 0ustar alastairalastair(TranslationUnit [(Module interface1 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Interface (InterfaceHeaderName randn ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [randn_scalar] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_vector] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_matrix] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [randn_vector_n] [(SimpleAttribute AttrModule )] () )] )] [] [] )] ) lfortran-0.64.0/tests/reference/run-file_open_06-cc72219.stdout0000664000175000017500000000001315227365530024221 0ustar alastairalastair +1.0 PASS lfortran-0.64.0/tests/reference/asr-cmd_01-e172099.stdout0000664000175000017500000001262715227365530022744 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { test_get_command_argument: (Program (SymbolTable 2 { arg: (Variable 2 arg [] Local () () Default (String 1 (IntegerConstant 32 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), count: (Variable 2 count [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_get_command_argument [] [(Assignment (Var 2 count) (IntrinsicElementalFunction CommandArgumentCount [] 0 (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "count: " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 count)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (IntrinsicImpureSubroutine GetCommandArgument [(Var 2 i) (Var 2 arg)] 1 ) (Print (StringFormat () [(IntrinsicElementalFunction StringTrim [(Var 2 arg)] 0 (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-format_01-b8a6dbf.stdout0000664000175000017500000001521415227365530023762 0ustar alastairalastair(TranslationUnit [(Program format_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(y [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(z [] [] () () None ())] () )] [(Format 1 "/,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5" () ) (Format 2 "/ ,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5" () ) (Format 3 " /,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5" () ) (Format 4 "2x,'Preconditioner update FAILED at T=',es12.5,', ETAH=',es12.5" () ) (Format 5 "/" () ) (Format 6 "/ " () ) (Format 7 " /" () ) (Format 8 "i6, /" () ) (Format 9 "i6,/" () ) (Format 10 "/ , /" () ) (Format 121 " /, 80A, / " () ) (Format 122 " /, 80A, /" () ) (Format 123 "/, 80A, /" () ) (Format 124 "/, 80A, / " () ) (Format 130 " 10X, 'keyword Input Echo - Values from input or default', / ,80A, / " () ) (Format 131 " 10X, 'keyword Input Echo - Values from input or default', / ,80A, /" () ) (Format 158 " 4X, 'epsi = ', ES11.4, /, 4X, 'iitm = ', I3, /, 4X, 'oitm = ', I4, /, 4X, 'timedep = ', I1, /, 4X, 'swp_typ = ', I1, /, 4X, 'multiswp = ', I1, /, 4X, 'angcpy = ', I1, /, 4X, 'it_det = ', I1, /, 4X, 'soloutp = ', I1, /, 4X, 'kplane = ', I4, /, 4X, 'popout = ', I1, /, 4X, 'fluxp = ', I1, /, 4X, 'fixup = ', I1, / " () ) (Format 161 " 'slgg(nmat,nmom,ng,ng) echo', /, 'Column-order loops:',' Mats (fastest ), Moments, Groups, Groups (slowest)' " () ) (Format 162 " 2X, ES15.8, 2X, ES15.8, 2X, ES15.8, 2X, ES15.8 " () ) (Format 221 " 4X, 'Group ', I3, 4X, ' Inner ', I5, 4X, ' Dfmxi ', ES11.4, ' Fixup x/y/z/t ', 4(ES9.2,1x) " () ) (Format 306 " 2X, I4, 6(1X, ES11.4) " () ) (Format 324 " 4(2X, ES17.10) " () ) (Format 422 " /, 4X, 'Manufactured/Computed Solutions Max Diff=', ES13.6 " () ) (Format 500 " \"IARRAY =\", *( I0, :, \",\")" () ) (Format 501 "*( I0, :, \",\")" () ) (Format 510 "1X, F10.3, I5, F10.3, I5/F10.3, I5, F10.3, I5" () ) (Format 511 "3/,I5" () ) (Format 512 "3/" () ) (Format 513 "1x, A, 3/ 1x, 2(I10,F10.2) // 1x, 2E15.7" () ) (Format 520 "1X, I1, 1X, 'ISN''T', 1X, I1" () ) (Format 530 "1PE12.4, I10" () ) (Format 540 "I12, /, ' Dates: ', 2 (2I3, I5)" () ) (Format 550 "ES12.3, ES12.3E3, G3.4, G3.4E100" () ) (Format 600 "//,63x,'Internal',/, 1x,'Cell',3(5x,'Temp '), 7x,'P',8x,'Density',6x,'Energy', /,2x,'Num',6x,'(K)',7x,'(C)',7x,'(F)',6x,'(Pa)',6x, '(kg/m**3)',5x,'(J/kg)' " () ) (Format 610 "71('-'),/,(1x,i4,0p,3f10.1,1p,3e12.3)" () ) (Format 620 "(1x,i4,0p,3(2x,'|',2x,f5.1),1p, 3(1x,'|',1x,e9.3))" () ) (Format 630 " //,' Format Number ',i4" () ) (Format 631 "//,' Format Number ',i4" () ) (Format 640 "\"Table form of A\"/(2F8.2)" () ) (Format 650 " 5X, 'ng= ', I4, / 5X, 'mat_opt= ', I2, / 5X, 'src_opt= ', I2, / 5X, 'scatp= ', I2 " () ) (Format 660 "' Format Number ',0PF17.8,' Ry' " () ) (Format 670 "/'xx'" () ) (Format 680 "/\"xx\"" () ) (Format 690 "/ \"xx\"" () ) (Format 700 "/ 'xx'" () ) (Format 710 "/ i5, 'x'" () ) (Format 720 "// i5, 'x'" () ) (Format 730 "//" () ) (Assignment 0 x 5 () ) (Format 740 "/1X'(',I2,')', X, A" () )] [] )] ) lfortran-0.64.0/tests/reference/ast-fixedform_doloop2-16b2c78.json0000664000175000017500000000076315227365530025025 0ustar alastairalastair{ "basename": "ast-fixedform_doloop2-16b2c78", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_doloop2.f", "infile_hash": "1e901265b799422661c4ababbb8e255b94fd6cbcfd34827ccecd54d8", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_doloop2-16b2c78.stdout", "stdout_hash": "e7ed9271d94aa738f63d04c76b1d21f2af86bf5c3c03e5601ea33809", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-int_02-e7de6a7.stdout0000664000175000017500000001331715227365530023213 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_15: (Program (SymbolTable 2 { x1: (Variable 2 x1 [] Local (RealConstant 3.300000 (Real 4) ) (RealConstant 3.300000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x2: (Variable 2 x2 [] Local (IntegerConstant 7 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y1: (Variable 2 y1 [x1] Local (IntrinsicElementalFunction Int [(Var 2 x1)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y2: (Variable 2 y2 [x2] Local (IntrinsicElementalFunction Int [(Var 2 x2)] 0 (Integer 4) (IntegerConstant 7 (Integer 4) Decimal) ) (IntegerConstant 7 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_15 [] [(Print (StringFormat () [(Var 2 y1) (Var 2 y2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-fn_call1-fcd6b9c.json0000664000175000017500000000073015227365530023757 0ustar alastairalastair{ "basename": "ast_f90-fn_call1-fcd6b9c", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/fn_call1.f90", "infile_hash": "fd319232dcd65e8f2c7722a5f8da034557658cb0a081224347fd1de6", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-fn_call1-fcd6b9c.stdout", "stdout_hash": "5f339fc44ee209b660588ca293bd90211b6797a86f69eada7ae5ef71", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_type_03-a9e3c15.stderr0000664000175000017500000000037415227365530024775 0ustar alastairalastairsemantic error: Passed object dummy argument does not match function argument --> tests/errors/derived_type_03.f90:7:9 | 7 | procedure(testing_interface), deferred :: testing | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-global_scope4-1af6ab9.json0000664000175000017500000000073415227365530024252 0ustar alastairalastair{ "basename": "asr-global_scope4-1af6ab9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope4.f90", "infile_hash": "da0256e95ad866af376d9ded3cd439463cb1e47dffac6aa88c0bbadf", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope4-1af6ab9.stdout", "stdout_hash": "add918302bc1abd8556ab02db92519b1353e8ee46ff1abadfaee9803", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_typing3-c82e537.json0000664000175000017500000000077615227365530024701 0ustar alastairalastair{ "basename": "asr-implicit_typing3-c82e537", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/errors/implicit_typing3.f90", "infile_hash": "52031ab41770ad4bad18b3bb531777da6ece1a5be640043d6a1605d4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_typing3-c82e537.stderr", "stderr_hash": "515c19327a17d5b2120b4d1677df5f90ccc9eab0b82be69c50a5f1fc", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-ifix_01-ed76fb2.stderr0000664000175000017500000000024715227365530023333 0ustar alastairalastairsemantic error: first argument of `ifix` must have kind equal to 4 --> tests/errors/ifix_01.f90:2:14 | 2 | print *, ifix(4.23_8) | ^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-error_stop1-ccc2415.json0000664000175000017500000000075415227365530023733 0ustar alastairalastair{ "basename": "ast-error_stop1-ccc2415", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/error_stop1.f", "infile_hash": "4cc33f8c74237a43dc0babd1d81362d82c4e688fd2dfe008e32b73a2", "outfile": null, "outfile_hash": null, "stdout": "ast-error_stop1-ccc2415.stdout", "stdout_hash": "f00c7ead66b49ed45488f2d6a0c6824dae35ce6a5703f3c1fda6948f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor5-fdb91a5.json0000664000175000017500000000077015227365530026617 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor5-fdb91a5", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor5.f90", "infile_hash": "96309887c38d452524fc1048a69f630c58fd72edb53964e858ffd7dd", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor5-fdb91a5.stdout", "stdout_hash": "cd13e7af6dab54aa09d6f02c19a2258732ec4408cdf22f44a8563dc4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_interface2-5630d9d.stdout0000664000175000017500000002603315227365530025667 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { implicit_interface2: (Program (SymbolTable 2 { f: (Function (SymbolTable 3 { f_arg_0: (Variable 3 f_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f_return_var_name: (Variable 3 f_return_var_name [] ReturnVar () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4)] (Real 8) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 f_arg_0)] [] (Var 3 f_return_var_name) Public .false. .false. () ), g: (Function (SymbolTable 4 { g_arg_0: (Variable 4 g_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g_arg_1: (Variable 4 g_arg_1 [] Unspecified () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g_return_var_name: (Variable 4 g_return_var_name [] ReturnVar () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g (FunctionType [(Integer 4) (Real 4)] (Real 8) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 g_arg_0) (Var 4 g_arg_1)] [] (Var 4 g_return_var_name) Public .false. .false. () ) }) implicit_interface2 [] [(Print (StringFormat () [(FunctionCall 2 f () [((IntegerConstant 5 (Integer 4) Decimal))] (Real 8) () () ) (FunctionCall 2 g () [((IntegerConstant 1 (Integer 4) Decimal)) ((RealConstant 3.000000 (Real 4) ))] (Real 8) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit11-95f56fd.stdout0000664000175000017500000002143615227365530024023 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f1: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Unspecified () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Unspecified () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f1 (FunctionType [(Complex 8) (Complex 8)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 z) (Var 2 i)] [(Assignment (Var 2 z) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToComplex (Complex 8) (ComplexConstant 5.000000 0.000000 (Complex 8) ) () ) () .false. .false. ) (Print (StringFormat () [(IntrinsicElementalFunction Aimag [(Var 2 z)] 0 (Real 8) () ) (IntrinsicElementalFunction Aimag [(Var 2 i)] 0 (Real 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] (Var 2 f1) Public .false. .false. () ), f2: (Function (SymbolTable 3 { i: (Variable 3 i [] Unspecified () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 3 z [] Unspecified () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f2 (FunctionType [(Complex 8) (Complex 8)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 z) (Var 3 i)] [(Assignment (Var 3 z) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToComplex (Complex 8) (ComplexConstant 5.000000 0.000000 (Complex 8) ) () ) () .false. .false. )] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-builtin1-1b5ca89.stdout0000664000175000017500000000664415227365530023570 0ustar alastairalastair(TranslationUnit [(Program builtin_01 (TriviaNode [(EndOfLine) (Comment "! AST only tests" )] [] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(Inquire 0 [] [(unit n) (opened inuse)] [] () ) (Inquire 0 [] [(UNIT JOAN) (OPENED LOG_01) (NAMED LOG_02) (FORM CHAR_VAR) (IOSTAT IOS)] [] () ) (Inquire 0 [] [(IOLENGTH IOL)] [(FuncCallOrArray A [] [(1 N 1 0)] [] [] [] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Rewind 0 [s] [] () ) (Rewind 0 [s] [] () ) (Rewind 0 [10] [] () ) (Rewind 0 [] [(err label) (unit s)] () ) (Rewind 0 [(FuncCallOrArray iunit [] [(() 13 () 0)] [] [] [] )] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Backspace 0 [u] [] () ) (Backspace 0 [io_unit] [] () ) (Backspace 0 [10] [] () ) (Backspace 0 [10] [(IOSTAT N)] () ) (Backspace 0 [(FuncCallOrArray iunit [] [(() 13 () 0)] [] [] [] )] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Endfile 0 [K] [] () ) (Endfile 0 [5] [] () ) (Endfile 0 [k] [] () ) (Endfile 0 [10] [(iostat n)] () ) (Endfile 0 [] [(unit iout) (iostat ios) (iomsg msg)] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/ast-sync1-9624944.json0000664000175000017500000000070415227365530022305 0ustar alastairalastair{ "basename": "ast-sync1-9624944", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/sync1.f90", "infile_hash": "363462c860cc54ea57727a4d2ee43782f907dd682bcafcb8fa2017cb", "outfile": null, "outfile_hash": null, "stdout": "ast-sync1-9624944.stdout", "stdout_hash": "1b5fa1990ef0452d2709b23be0b5977d1c6e69a479a811b6bd8d81ab", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutines_01-6bd865a.stdout0000664000175000017500000000236215227365530025234 0ustar alastairalastairfunction f(a::Int32, b::Base.RefValue{Int32}) b[] = a + 1 end function main() local i::Int32 local j::Int32 i = 1 j = 1 if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(i, __j_ref__) j = __j_ref__[] println(i, " ", j) if i ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if j ≠ 2 println(Base.stderr, "ERROR STOP") exit(1) end j = 1 if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(Int32(3), __j_ref__) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end j = 1 if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(Int32(1 + 2), __j_ref__) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end j = 1 if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(Int32(i + 2), __j_ref__) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/asr-kind2-191347a.json0000664000175000017500000000071315227365530022321 0ustar alastairalastair{ "basename": "asr-kind2-191347a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kind2.f90", "infile_hash": "fe00584d15da135638cfe95fce629f431f82a273029cfb742ef534f3", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-kind2-191347a.stderr", "stderr_hash": "eaa6cf89bba5d3dfb23b915a22737aa52e0c11aa01eae1a4e3e3e2e0", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-allocate_01-ce7628b.json0000664000175000017500000000072615227365530023553 0ustar alastairalastair{ "basename": "ast-allocate_01-ce7628b", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/allocate_01.f90", "infile_hash": "7a28f6115b781d328be0829189ace20f4f862bf745740c6c78400225", "outfile": null, "outfile_hash": null, "stdout": "ast-allocate_01-ce7628b.stdout", "stdout_hash": "29fe560e6eae2987477bffd4880efd8abe5f9a4ba4b83312a889e625", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format7-5662bc0.json0000664000175000017500000000066215227365530022771 0ustar alastairalastair{ "basename": "run-format7-5662bc0", "cmd": "lfortran --no-color {infile}", "infile": "tests/format7.f90", "infile_hash": "2fa302a9dea408e1cee5ae34903a7ed59a6c729180d468f537a6caf5", "outfile": null, "outfile_hash": null, "stdout": "run-format7-5662bc0.stdout", "stdout_hash": "1953aa3f8f698f07a3be0ac613c646ed528adc664959cc638cabd693", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_02_size-ab6ee62.json0000664000175000017500000000076415227365530024375 0ustar alastairalastair{ "basename": "asr-arrays_02_size-ab6ee62", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_02_size.f90", "infile_hash": "38abe88ea3a7e82aa0d9dd390578cda301e16cccabaefeaab3650c5f", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_02_size-ab6ee62.stdout", "stdout_hash": "e26c9dc614bf53ed4ece6e129712010e44e07dd93f8a42a5e041e943", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-loop_unroll_small-13135c0.json0000664000175000017500000000077515227365530025044 0ustar alastairalastair{ "basename": "asr-loop_unroll_small-13135c0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/loop_unroll_small.f90", "infile_hash": "5a308fd86dceda8d2b6a3c4fcb2412bf4d1b3f043105d06956960db8", "outfile": null, "outfile_hash": null, "stdout": "asr-loop_unroll_small-13135c0.stdout", "stdout_hash": "addc7eaf85cb1aaefd51afb4bd166e88520995322ea7a5051127365a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-case_03-b4597f9.json0000664000175000017500000000073015227365530023145 0ustar alastairalastair{ "basename": "julia-case_03-b4597f9", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/case_03.f90", "infile_hash": "4fc1bb48b2136f22bb44b7c69aaa05a43b4ed2e4b8464c433340295d", "outfile": null, "outfile_hash": null, "stdout": "julia-case_03-b4597f9.stdout", "stdout_hash": "459246866bf743d18ebaef865b8bdcf461382930e4a850f5fe9ae164", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-complex_07-71c3c47.json0000664000175000017500000000075015227365530023352 0ustar alastairalastair{ "basename": "asr-complex_07-71c3c47", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_07.f90", "infile_hash": "fb49a785b3424190cd1c321680f4566fa5dc0ea30569ab7624004d2f", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_07-71c3c47.stdout", "stdout_hash": "40e218d601bfbd3cd433843d63cafd97fd2a61796e90d7704e03d29d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutine6-265d498.json0000664000175000017500000000073515227365530023617 0ustar alastairalastair{ "basename": "asr-subroutine6-265d498", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/subroutine6.f90", "infile_hash": "5bc0c9df124afea67ceb9278de7bb1436d4f1b31ae40c6edddf5838c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-subroutine6-265d498.stderr", "stderr_hash": "42e57dd8f16b0aabba5ffbcdce0c8d55d48e2a88f797fd2bcd0ba90e", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-program1-caa9665.stdout0000664000175000017500000000133615227365530023564 0ustar alastairalastair(TranslationUnit [(Program program1 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(Assignment 0 i 5 () ) (Print 0 () [i] () ) (Print 0 () [(+ i 1)] () )] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-program_04-4e711d5.json0000664000175000017500000000076315227365530024032 0ustar alastairalastair{ "basename": "ast_f90-program_04-4e711d5", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/program_04.f90", "infile_hash": "6d4faa951231e470e99cbc3ff617437048ceb99e3d92ba6e7810ef43", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-program_04-4e711d5.stdout", "stdout_hash": "50ee720f2d8e312d6a47c95d2456e67eb3c05a875b6192195957bdcc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-callback_05-c86f2cc.stdout0000664000175000017500000000762515227365530024346 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @main.x = internal global i32 5 define void @__module_callback_05_px_call1(i32* %x) { .entry: call void @__module_callback_05_px_call2(void (i32*)* @px_call1.__module_callback_05_printx, i32* %x) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_px_call1 FINALIZE_SYMTABLE_px_call1: ; preds = %return ret void } define void @px_call1.__module_callback_05_printx(i32* %x) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %x) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_printx FINALIZE_SYMTABLE_printx: ; preds = %return ret void } define void @__module_callback_05_px_call2(void (i32*)* %f, i32* %x) { .entry: call void @__module_callback_05_px_call3(void (i32*)* %f, i32* %x) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_px_call2 FINALIZE_SYMTABLE_px_call2: ; preds = %return ret void } declare void @f(i32*) define void @__module_callback_05_px_call3(void (i32*)* %f, i32* %x) { .entry: call void %f(i32* %x) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_px_call3 FINALIZE_SYMTABLE_px_call3: ; preds = %return ret void } declare void @f.1(i32*) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) call void @__module_callback_05_px_call1(i32* @main.x) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() ././@LongLink0000644000000000000000000000017000000000000011601 Lustar rootrootlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-modules_45-db3a04a.stdoutlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-module0000664000175000017500000041266215227365530035014 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_45: (Program (SymbolTable 7 { compiler_name: (Variable 7 compiler_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flag: (ExternalSymbol 7 file_scope_flag 2 file_scope_flag modules_45_fpm_manifest_profile [] file_scope_flag Public ), get_flags: (ExternalSymbol 7 get_flags 2 get_flags modules_45_fpm_manifest_profile [] get_flags Public ), new_profile: (ExternalSymbol 7 new_profile 2 new_profile modules_45_fpm_manifest_profile [] new_profile Public ), os_type: (Variable 7 os_type [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_valid: (Variable 7 os_valid [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_config_t: (ExternalSymbol 7 profile_config_t 2 profile_config_t modules_45_fpm_manifest_profile [] profile_config_t Public ), profile_name: (Variable 7 profile_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profiles: (Variable 7 profiles [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 7 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profindex: (Variable 7 profindex [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) modules_45 [modules_45_fpm_manifest_profile] [(Allocate [((Var 7 profile_name) [] (IntegerConstant 40 (Integer 4) Decimal) () (String 1 (IntegerConstant 40 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Allocate [((Var 7 compiler_name) [] (IntegerConstant 40 (Integer 4) Decimal) () (String 1 (IntegerConstant 40 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Allocate [((Var 7 profiles) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] () () ())] () () () ) (SubroutineCall 7 get_flags () [((Var 7 profile_name)) ((Var 7 compiler_name)) ((Var 7 os_type)) ((Var 7 profiles)) ((Var 7 profindex)) ((Var 7 os_valid))] () .false. )] ), modules_45_fpm_manifest_profile: (Module (SymbolTable 2 { file_scope_flag: (Struct (SymbolTable 3 { }) file_scope_flag (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () () [] ), get_flags: (Function (SymbolTable 6 { __libasr_created_dummy_variable_: (Variable 6 __libasr_created_dummy_variable_ [] Local () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_dummy_variable_1: (Variable 6 __libasr_created_dummy_variable_1 [] Local () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_dummy_variable_2: (Variable 6 __libasr_created_dummy_variable_2 [] Local () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_dummy_variable_3: (Variable 6 __libasr_created_dummy_variable_3 [] Local () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_dummy_variable_4: (Variable 6 __libasr_created_dummy_variable_4 [] Local () () Default (Array (StructType [] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_: (Variable 6 __libasr_created_variable_ [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_pointer_: (Variable 6 __libasr_created_variable_pointer_ [] Local () () Default (Pointer (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_pointer_1: (Variable 6 __libasr_created_variable_pointer_1 [] Local () () Default (Pointer (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_pointer_2: (Variable 6 __libasr_created_variable_pointer_2 [] Local () () Default (Pointer (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_pointer_3: (Variable 6 __libasr_created_variable_pointer_3 [] Local () () Default (Pointer (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_pointer_4: (Variable 6 __libasr_created_variable_pointer_4 [] Local () () Default (Pointer (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c_flags: (Variable 6 c_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), compiler_name: (Variable 6 compiler_name [] In () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 6 cxx_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), err_message: (Variable 6 err_message [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_flags: (Variable 6 file_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_name: (Variable 6 file_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 6 file_scope_flags [] Local () () Default (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 6 flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ifile: (Variable 6 ifile [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ikey: (Variable 6 ikey [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), is_valid: (Variable 6 is_valid [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), key_name: (Variable 6 key_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 6 link_time_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 6 os_type [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_valid: (Variable 6 os_valid [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 6 profile_name [] In () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profiles: (Variable 6 profiles [] InOut () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profindex: (Variable 6 profindex [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), stat: (Variable 6 stat [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_flags (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Integer 4) (Logical 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [new_profile] [(Var 6 profile_name) (Var 6 compiler_name) (Var 6 os_type) (Var 6 profiles) (Var 6 profindex) (Var 6 os_valid)] [(If () (IntrinsicImpureFunction Allocated [(Var 6 flags)] 0 (Logical 4) () ) [(Associate (Var 6 __libasr_created_variable_pointer_) (Var 6 flags) )] [(Associate (Var 6 __libasr_created_variable_pointer_) (Var 6 __libasr_created_dummy_variable_) )] ) (If () (IntrinsicImpureFunction Allocated [(Var 6 c_flags)] 0 (Logical 4) () ) [(Associate (Var 6 __libasr_created_variable_pointer_1) (Var 6 c_flags) )] [(Associate (Var 6 __libasr_created_variable_pointer_1) (Var 6 __libasr_created_dummy_variable_1) )] ) (If () (IntrinsicImpureFunction Allocated [(Var 6 cxx_flags)] 0 (Logical 4) () ) [(Associate (Var 6 __libasr_created_variable_pointer_2) (Var 6 cxx_flags) )] [(Associate (Var 6 __libasr_created_variable_pointer_2) (Var 6 __libasr_created_dummy_variable_2) )] ) (If () (IntrinsicImpureFunction Allocated [(Var 6 link_time_flags)] 0 (Logical 4) () ) [(Associate (Var 6 __libasr_created_variable_pointer_3) (Var 6 link_time_flags) )] [(Associate (Var 6 __libasr_created_variable_pointer_3) (Var 6 __libasr_created_dummy_variable_3) )] ) (If () (IntrinsicImpureFunction Allocated [(Var 6 file_scope_flags)] 0 (Logical 4) () ) [(Associate (Var 6 __libasr_created_variable_pointer_4) (Var 6 file_scope_flags) )] [(Associate (Var 6 __libasr_created_variable_pointer_4) (Var 6 __libasr_created_dummy_variable_4) )] ) (Assignment (ArrayItem (Var 6 profiles) [(() (Var 6 profindex) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) ColMajor () ) (FunctionCall 2 new_profile () [((Var 6 profile_name)) ((Var 6 compiler_name)) ((Var 6 os_type)) ((Var 6 __libasr_created_variable_pointer_)) ((LogicalBinOp (IntrinsicImpureFunction Allocated [(Var 6 flags)] 0 (Logical 4) () ) And (LogicalConstant .true. (Logical 4) ) (Logical 4) () )) ((Var 6 __libasr_created_variable_pointer_1)) ((LogicalBinOp (IntrinsicImpureFunction Allocated [(Var 6 c_flags)] 0 (Logical 4) () ) And (LogicalConstant .true. (Logical 4) ) (Logical 4) () )) ((Var 6 __libasr_created_variable_pointer_2)) ((LogicalBinOp (IntrinsicImpureFunction Allocated [(Var 6 cxx_flags)] 0 (Logical 4) () ) And (LogicalConstant .true. (Logical 4) ) (Logical 4) () )) ((Var 6 __libasr_created_variable_pointer_3)) ((LogicalBinOp (IntrinsicImpureFunction Allocated [(Var 6 link_time_flags)] 0 (Logical 4) () ) And (LogicalConstant .true. (Logical 4) ) (Logical 4) () )) ((Var 6 __libasr_created_variable_pointer_4)) ((LogicalBinOp (IntrinsicImpureFunction Allocated [(Var 6 file_scope_flags)] 0 (Logical 4) () ) And (LogicalConstant .true. (Logical 4) ) (Logical 4) () )) ((Var 6 __libasr_created_variable_)) ((LogicalConstant .false. (Logical 4) ))] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) () () ) () .false. .false. ) (Assignment (Var 6 profindex) (IntegerBinOp (Var 6 profindex) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ), new_profile: (Function (SymbolTable 5 { __libasr_is_present_c_flags: (Variable 5 __libasr_is_present_c_flags [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_cxx_flags: (Variable 5 __libasr_is_present_cxx_flags [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_file_scope_flags: (Variable 5 __libasr_is_present_file_scope_flags [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_flags: (Variable 5 __libasr_is_present_flags [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_is_built_in: (Variable 5 __libasr_is_present_is_built_in [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_link_time_flags: (Variable 5 __libasr_is_present_link_time_flags [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c_flags: (Variable 5 c_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), compiler: (Variable 5 compiler [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 5 cxx_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 5 file_scope_flags [] In () () Default (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 5 flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), is_built_in: (Variable 5 is_built_in [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 5 link_time_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 5 os_type [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile: (Variable 5 profile [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) 2 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 5 profile_name [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_profile (FunctionType [(String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (Integer 4) (String 1 () AssumedLength DescriptorString) (Logical 4) (String 1 () AssumedLength DescriptorString) (Logical 4) (String 1 () AssumedLength DescriptorString) (Logical 4) (String 1 () AssumedLength DescriptorString) (Logical 4) (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) (Logical 4) (Logical 4) (Logical 4)] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 profile_name) (Var 5 compiler) (Var 5 os_type) (Var 5 flags) (Var 5 __libasr_is_present_flags) (Var 5 c_flags) (Var 5 __libasr_is_present_c_flags) (Var 5 cxx_flags) (Var 5 __libasr_is_present_cxx_flags) (Var 5 link_time_flags) (Var 5 __libasr_is_present_link_time_flags) (Var 5 file_scope_flags) (Var 5 __libasr_is_present_file_scope_flags) (Var 5 is_built_in) (Var 5 __libasr_is_present_is_built_in)] [] (Var 5 profile) Public .true. .true. () ), profile_config_t: (Struct (SymbolTable 4 { c_flags: (Variable 4 c_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), compiler: (Variable 4 compiler [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 4 cxx_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 4 file_scope_flags [] Local () () Default (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 4 flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), is_built_in: (Variable 4 is_built_in [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 4 link_time_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 4 os_type [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 4 profile_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) profile_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [] [profile_name compiler os_type flags c_flags cxx_flags link_time_flags file_scope_flags is_built_in] [] Source Public .false. .false. .false. [] () () [] ) }) modules_45_fpm_manifest_profile () [modules_45_fpm_manifest_profile] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-subroutines_09-83ddd2b.stdout0000664000175000017500000006277415227365530025015 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 5 { a: (Variable 5 a [] Local (IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 5 f [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), get_elem_table@get_value: (ExternalSymbol 5 get_elem_table@get_value 2 get_elem_table subroutines_09_tomlf_build_array [] get_elem_table Public ), get_elem_value_string@get_value: (ExternalSymbol 5 get_elem_value_string@get_value 2 get_elem_value_string subroutines_09_tomlf_build_array [] get_elem_value_string Public ), get_value: (ExternalSymbol 5 get_value 2 get_value subroutines_09_tomlf_build_array [] get_value Public ), get_value@get_elem_table: (ExternalSymbol 5 get_value@get_elem_table 2 get_elem_table subroutines_09_tomlf_build_array [] get_elem_table Private ), get_value@get_elem_value_string: (ExternalSymbol 5 get_value@get_elem_value_string 2 get_elem_value_string subroutines_09_tomlf_build_array [] get_elem_value_string Private ), pos: (Variable 5 pos [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ptr: (Variable 5 ptr [] Local () () Default (Pointer (Integer 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [subroutines_09_tomlf_build_array] [(SubroutineCall 5 get_value@get_elem_table 5 get_value [((Var 5 a)) ((Var 5 pos)) ((Var 5 ptr)) ((Var 5 f))] () .false. ) (SubroutineCall 5 get_value@get_elem_value_string 5 get_value [((Var 5 f)) ((Var 5 pos)) ((Var 5 ptr)) (()) ((Var 5 f))] () .false. )] ), subroutines_09_tomlf_build_array: (Module (SymbolTable 2 { get_elem_table: (Function (SymbolTable 3 { array: (Variable 3 array [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), pos: (Variable 3 pos [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ptr: (Variable 3 ptr [] Out () () Default (Pointer (Integer 4) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), stat: (Variable 3 stat [] Out () () Default (Logical 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_elem_table (FunctionType [(Integer 4) (Integer 4) (Pointer (Integer 4) ) (Logical 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 array) (Var 3 pos) (Var 3 ptr) (Var 3 stat)] [(Nullify [(Var 3 ptr)] ) (Assignment (Var 3 stat) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] () Private .true. .true. () ), get_elem_value_string: (Function (SymbolTable 4 { array: (Variable 4 array [] InOut () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), def: (Variable 4 def [] Out () () Default (Integer 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ), pos: (Variable 4 pos [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ptr: (Variable 4 ptr [] Out () () Default (Pointer (Integer 4) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), stat: (Variable 4 stat [] Out () () Default (Logical 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_elem_value_string (FunctionType [(Logical 4) (Integer 4) (Pointer (Integer 4) ) (Integer 4) (Logical 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 array) (Var 4 pos) (Var 4 ptr) (Var 4 def) (Var 4 stat)] [(Nullify [(Var 4 ptr)] ) (Assignment (Var 4 stat) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] () Private .true. .true. () ), get_value: (GenericProcedure 2 get_value [2 get_elem_table 2 get_elem_value_string] Public ) }) subroutines_09_tomlf_build_array () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_array_01-691b151.stdout0000664000175000017500000020471115227365530025177 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_array_01: (Program (SymbolTable 10 { array_tmpl: (ExternalSymbol 10 array_tmpl 2 array_tmpl template_array_01_m [] array_tmpl Public ), r: (ExternalSymbol 10 r 2 r template_array_01_m [] r Public ), test_template: (ExternalSymbol 10 test_template 2 test_template template_array_01_m [] test_template Public ) }) template_array_01 [template_array_01_m] [(SubroutineCall 10 test_template () [] () .false. )] ), template_array_01_m: (Module (SymbolTable 2 { array_tmpl: (Template (SymbolTable 4 { insert_t: (Function (SymbolTable 5 { i: (Variable 5 i [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lst: (Variable 5 lst [] In () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 5 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) insert_t (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 lst) (Var 5 i)] [(Assignment (ArrayItem (Var 5 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) (Var 5 i) () .false. .false. ) (Assignment (Var 5 r) (ArrayItem (Var 5 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) () .false. .false. )] (Var 5 r) Public .true. .true. () ), insert_t_n: (Function (SymbolTable 6 { i: (Variable 6 i [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lst: (Variable 6 lst [n] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 6 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 6 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) insert_t_n (FunctionType [(Integer 4) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 n) (Var 6 lst) (Var 6 i)] [(Assignment (ArrayItem (Var 6 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) (Var 6 i) () .false. .false. ) (Assignment (Var 6 r) (ArrayItem (Var 6 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) () .false. .false. )] (Var 6 r) Private .true. .true. () ), t: (Variable 4 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array_tmpl [t] [(Require r [t] )] ), r: (Requirement (SymbolTable 3 { t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) r [t] [] ), test_template: (Function (SymbolTable 7 { a: (Variable 7 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 7 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), insert_int: (Function (SymbolTable 8 { i: (Variable 8 i [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lst: (Variable 8 lst [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 8 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) insert_int (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 lst) (Var 8 i)] [(Assignment (ArrayItem (Var 8 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 8 i) () .false. .false. ) (Assignment (Var 8 r) (ArrayItem (Var 8 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. )] (Var 8 r) Public .true. .true. () ), insert_int_n: (Function (SymbolTable 9 { i: (Variable 9 i [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lst: (Variable 9 lst [n] In () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 9 n))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 9 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 9 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) insert_int_n (FunctionType [(Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray ) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 n) (Var 9 lst) (Var 9 i)] [(Assignment (ArrayItem (Var 9 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (Var 9 i) () .false. .false. ) (Assignment (Var 9 r) (ArrayItem (Var 9 lst) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. )] (Var 9 r) Private .true. .true. () ), r: (Variable 7 r [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 7 i) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 7 r) (FunctionCall 7 insert_int () [((ArrayPhysicalCast (Var 7 a) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] DescriptorArray ) () )) ((Var 7 i))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 7 r) (FunctionCall 7 insert_int_n () [((ArraySize (Var 7 a) () (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) )) ((ArrayPhysicalCast (Var 7 a) FixedSizeArray PointerArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Mul (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () )) ((Var 7 i))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 7 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_array_01_m () [template_array_01_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-read2-7b581ec.stdout0000664000175000017500000000041615227365530023044 0ustar alastairalastairphifile: T F lfortran-0.64.0/tests/reference/asr-incompatible_dimension_assignment_arr2-3867783.json0000664000175000017500000000105615227365530031144 0ustar alastairalastair{ "basename": "asr-incompatible_dimension_assignment_arr2-3867783", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incompatible_dimension_assignment_arr2.f90", "infile_hash": "f3f2370b6a0b01d3cea561679f559769fc74d0a3e5100a33c249e0c7", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incompatible_dimension_assignment_arr2-3867783.stderr", "stderr_hash": "b774158a1115ef8b895a06920255e024b47c4d489e57b3642a65baf9", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-dim_assgn_test-4df3c08.stderr0000664000175000017500000000055015227365530025010 0ustar alastairalastairwarning: Dimensions are specified twice --> tests/errors/dim_assgn_test.f90:3:19 | 3 | integer, private, dimension(2,2) :: a(2,3) | ^^^^^^^^^^^^^^ ^^^^^^ help: consider specifying it just one way or the other semantic error: Variable 'x' is not declared --> tests/errors/dim_assgn_test.f90:5:1 | 5 | x = 5 | ^ 'x' is undeclared lfortran-0.64.0/tests/reference/fortran-coarray_saved_01-1f96b4c.json0000664000175000017500000000106615227365530025471 0ustar alastairalastair{ "basename": "fortran-coarray_saved_01-1f96b4c", "cmd": "lfortran --pass=coarray --show-fortran --no-color {infile} -o {outfile} --no-error-banner --line=-1 --column=-1 --coarray=true", "infile": "tests/coarray_saved_01.f90", "infile_hash": "6a1b873a25d0f89552a97342f257fef0a4b9abcbb88a1a4cf31f5241", "outfile": null, "outfile_hash": null, "stdout": "fortran-coarray_saved_01-1f96b4c.f90", "stdout_hash": "995fba7c8b4367f90c2aeabc063653261a1fa3199133700a98a34b8c", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/ast-fixed_form_2-1350599.stderr0000664000175000017500000000021715227365530024136 0ustar alastairalastairsyntax error: Token 'x' (of type 'identifier') is unexpected here --> tests/errors/fixed_form_2.f:3:12 | 3 | y = 5x | ^ lfortran-0.64.0/tests/reference/run-allocatable_component_reshape_unallocated_01-15046b1.stderr0000664000175000017500000000047215227365530032565 0ustar alastairalastairruntime error: Array 'x%arr' is not allocated. Allocate it manually or use the '--realloc-lhs-arrays' option to allocate it automatically. --> tests/../integration_tests/allocatable_component_reshape_unallocated_01.f90:15:5 | 15 | x%arr = reshape(gradient, shape(input)) | ^^^^^ not allocated here lfortran-0.64.0/tests/reference/ast-expr8-cb13ef4.json0000664000175000017500000000070415227365530022600 0ustar alastairalastair{ "basename": "ast-expr8-cb13ef4", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr8.f90", "infile_hash": "b0f7cfaa460c9319f7cc7b0fa470fbbce940f7f4eef3156b55897b51", "outfile": null, "outfile_hash": null, "stdout": "ast-expr8-cb13ef4.stdout", "stdout_hash": "a5bded52998d57e79faf66d869a9d90b00601c965ba1347a25764d38", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_5-f25edd8.json0000664000175000017500000000075315227365530024116 0ustar alastairalastair{ "basename": "ast-fixed_form_5-f25edd8", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/fixed_form_5.f", "infile_hash": "c978dce7f02ade3281b72a11001e4813cd7c3157f0efa065c8a137d2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-fixed_form_5-f25edd8.stderr", "stderr_hash": "868271d79402bdfa652f8d86b11303134261ca5a7c28edbbd97bf884", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-array_01_transfer-125156e.stdout0000664000175000017500000001041515227365530025204 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array_01_transfer: (Program (SymbolTable 2 { m: (Variable 2 m [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), size: (Variable 2 size [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array_01_transfer [] [(Assignment (Var 2 m) (ArrayConstant 24 [1, 0, 0, 0, 5, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Print (StringFormat () [(BitCast (Var 2 m) (RealConstant 1.000000 (Real 4) ) (Var 2 size) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 size))] PointerArray ) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-doloop_03-9c463c5.json0000664000175000017500000000074515227365530023204 0ustar alastairalastair{ "basename": "asr-doloop_03-9c463c5", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_03.f90", "infile_hash": "eafcb3d9dca52d81012b124f360aa148c946ed2e7ed8de07041aba1d", "outfile": null, "outfile_hash": null, "stdout": "asr-doloop_03-9c463c5.stdout", "stdout_hash": "bce8155a0f5aa46a4681b6c89f81e50efd238e517f319579fd0cd6a4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-modules_11-a28ab77.json0000664000175000017500000000075315227365530023616 0ustar alastairalastair{ "basename": "llvm-modules_11-a28ab77", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_11.f90", "infile_hash": "f19a5ba8d01ebaae3da78891afbae58462d711a364274aa3a5569fa1", "outfile": null, "outfile_hash": null, "stdout": "llvm-modules_11-a28ab77.stdout", "stdout_hash": "1da1c65c78dfcc912998868f650c67401887ccb6f5b2b9d058e3be5b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/lookup_name-lookup_name3-a06a374.stdout0000664000175000017500000000026415227365530026060 0ustar alastairalastair[{"kind":9,"location":{"range":{"start":{"character":40,"line":2},"end":{"character":41,"line":2}},"uri":"tests/lookup_name3.f90"},"name":"ec","filename":"tests/lookup_name3.f90"}]lfortran-0.64.0/tests/reference/run-format_08-581c944.json0000664000175000017500000000071515227365530023142 0ustar alastairalastair{ "basename": "run-format_08-581c944", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_08.f90", "infile_hash": "09be4bce42c0ceb75ad723d2c9c7615551fb01aeeb29e3432a11b1a4", "outfile": null, "outfile_hash": null, "stdout": "run-format_08-581c944.stdout", "stdout_hash": "c450011324a415cece37c9c2590c2a4b591dc1692b25e5272ad33e6a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/c-program4-d60edeb.json0000664000175000017500000000100715227365530022777 0ustar alastairalastair{ "basename": "c-program4-d60edeb", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/program4.f90", "infile_hash": "16adb5a498028ea668b9d513bb2ef0fa0b12e15bef4e2b5e30aa2740", "outfile": null, "outfile_hash": null, "stdout": "c-program4-d60edeb.stdout", "stdout_hash": "7befb0f20ab89ee4ccd2058f0418cd68b66c99d768f7e6113de89be5", "stderr": "c-program4-d60edeb.stderr", "stderr_hash": "3e15ec8a328c3f581817cf479d93e1f7166d89865efb6fb03f1909b8", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-substring_startidx-5fb6d57.stderr0000664000175000017500000000024315227365530025755 0ustar alastairalastairsemantic error: Substring start index at must be of type integer --> tests/errors/substring_startidx.f90:4:15 | 4 | print*, s(1.1:5) | ^^^ lfortran-0.64.0/tests/reference/asr-derived_types_05-35150cd.json0000664000175000017500000000077215227365530024544 0ustar alastairalastair{ "basename": "asr-derived_types_05-35150cd", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_05.f90", "infile_hash": "85f9d84172e5248d69383c57e1de14890ac154aec612e84a5253b502", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_05-35150cd.stdout", "stdout_hash": "382b7d8a158a7231280205e18beae687c43a3ac7675c0af91e61b470", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/tokens-esub1-3e8b16d.json0000664000175000017500000000072415227365530023214 0ustar alastairalastair{ "basename": "tokens-esub1-3e8b16d", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/errors/esub1.f90", "infile_hash": "93b7d715c14f2da952a8945b7ea7b16817b269880b156f00497dd7b1", "outfile": null, "outfile_hash": null, "stdout": "tokens-esub1-3e8b16d.stdout", "stdout_hash": "e49e323dc4149a6e283aa7f33d649fd490c58f1f0f808ee0393a0fd0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-save2-63c8bcc.stdout0000664000175000017500000015113215227365530023127 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 7 { a: (Variable 7 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 7 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 7 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 7 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [] ), save_fun: (Function (SymbolTable 3 { a: (Variable 3 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), save_fun: (Variable 3 save_fun [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 3 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_fun (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 3 save_fun) Public .true. .true. () ), save_module_2: (Module (SymbolTable 4 { a: (Variable 4 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fun_save: (Function (SymbolTable 6 { a: (Variable 6 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 6 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fun_save: (Variable 6 fun_save [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 6 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 6 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fun_save (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 6 fun_save) Public .true. .true. () ), sub_save: (Function (SymbolTable 5 { a: (Variable 5 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 5 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 5 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub_save (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ), x: (Variable 4 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 4 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_module_2 () [] .false. .false. .false. ), save_sub: (Function (SymbolTable 2 { a: (Variable 2 a [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-parameter_02-15e1701.stdout0000664000175000017500000000046215227365530024617 0ustar alastairalastairsubroutine a_proc() implicit none integer :: i parameter(i = 1) print *, i end subroutine a_proc module parameter_02_a implicit none integer :: i parameter(i = 2) end module parameter_02_a program parameter_02 use parameter_02_a, only: i implicit none call a_proc() print *, i end program parameter_02 lfortran-0.64.0/tests/reference/asr-logical2-e35f19c.stdout0000664000175000017500000000743015227365530023530 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { logical2: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) logical2 [] [(Assignment (Var 2 a) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (Assignment (Var 2 b) (LogicalConstant .false. (Logical 4) ) () .false. .false. ) (If () (LogicalBinOp (Var 2 a) And (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 1 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 1 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-common1-bbe229a.stderr0000664000175000017500000000024415227365530023431 0ustar alastairalastairsemantic error: Duplicate DIMENSION attribute specified --> tests/errors/common1.f90:3:20 | 3 | common /rowns/ rowns(209) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/run-integerStringInput-16e7ff7.json0000664000175000017500000000073215227365530025352 0ustar alastairalastair{ "basename": "run-integerStringInput-16e7ff7", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/integerStringInput.f90", "infile_hash": "04a4574d2a233b18a7a450ff6c9e574741495c363d9f3f355e8fcb6c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-integerStringInput-16e7ff7.stderr", "stderr_hash": "bf997e6d080ca99b5f968fd2d17d7794cc8a918276f16853f55bb1b0", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-template_array_02-85b6b2e.stdout0000664000175000017500000037537715227365530025366 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_array_02: (Program (SymbolTable 19 { add_integer: (ExternalSymbol 19 add_integer 2 add_integer template_array_02_math [] add_integer Public ), add_real: (ExternalSymbol 19 add_real 2 add_real template_array_02_math [] add_real Public ), array_tmpl: (ExternalSymbol 19 array_tmpl 7 array_tmpl template_array_02_m [] array_tmpl Public ), operations: (ExternalSymbol 19 operations 7 operations template_array_02_m [] operations Public ), test_template: (ExternalSymbol 19 test_template 7 test_template template_array_02_m [] test_template Public ), zero_integer: (ExternalSymbol 19 zero_integer 2 zero_integer template_array_02_math [] zero_integer Public ), zero_real: (ExternalSymbol 19 zero_real 2 zero_real template_array_02_math [] zero_real Public ) }) template_array_02 [template_array_02_math template_array_02_m] [(SubroutineCall 19 test_template () [] () .false. )] ), template_array_02_m: (Module (SymbolTable 7 { add_integer: (ExternalSymbol 7 add_integer 2 add_integer template_array_02_math [] add_integer Public ), add_real: (ExternalSymbol 7 add_real 2 add_real template_array_02_math [] add_real Public ), array_tmpl: (Template (SymbolTable 11 { mysum_t: (Function (SymbolTable 14 { a: (Variable 14 a [] In () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 14 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 14 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mysum_t (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [zero_t plus_t] [(Var 14 a)] [(Assignment (Var 14 r) (FunctionCall 11 zero_t () [((ArrayItem (Var 14 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. ) (DoLoop () ((Var 14 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 14 a) () (Integer 4) () ) ()) [(Assignment (Var 14 r) (FunctionCall 11 plus_t () [((Var 14 r)) ((ArrayItem (Var 14 a) [(() (Var 14 i) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. )] [] )] (Var 14 r) Public .true. .true. () ), mysum_t_n: (Function (SymbolTable 15 { a: (Variable 15 a [n] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 15 n))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 15 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 15 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 15 r [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mysum_t_n (FunctionType [(Integer 4) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [zero_t plus_t] [(Var 15 n) (Var 15 a)] [(Assignment (Var 15 r) (FunctionCall 11 zero_t () [((ArrayItem (Var 15 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. ) (DoLoop () ((Var 15 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 15 a) () (Integer 4) () ) ()) [(Assignment (Var 15 r) (FunctionCall 11 plus_t () [((Var 15 r)) ((ArrayItem (Var 15 a) [(() (Var 15 i) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. )] [] )] (Var 15 r) Private .true. .true. () ), plus_t: (Function (SymbolTable 12 { l: (Variable 12 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 12 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rs: (Variable 12 rs [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 12 l) (Var 12 r)] [] (Var 12 rs) Private .true. .true. () ), t: (Variable 11 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), zero_t: (Function (SymbolTable 13 { l: (Variable 13 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rs: (Variable 13 rs [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_t (FunctionType [(TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 13 l)] [] (Var 13 rs) Private .true. .true. () ) }) array_tmpl [t plus_t zero_t] [(Require operations [t plus_t zero_t] )] ), operations: (Requirement (SymbolTable 8 { plus_t: (Function (SymbolTable 9 { l: (Variable 9 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 9 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rs: (Variable 9 rs [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 9 l) (Var 9 r)] [] (Var 9 rs) Private .true. .true. () ), t: (Variable 8 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), zero_t: (Function (SymbolTable 10 { l: (Variable 10 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rs: (Variable 10 rs [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_t (FunctionType [(TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 10 l)] [] (Var 10 rs) Private .true. .true. () ) }) operations [t plus_t zero_t] [] ), test_template: (Function (SymbolTable 16 { a: (Variable 16 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 16 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 16 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), mysum_integer: (Function (SymbolTable 17 { a: (Variable 17 a [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 17 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 17 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mysum_integer (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 17 a)] [(Assignment (Var 17 r) (FunctionCall 7 zero_integer () [((ArrayItem (Var 17 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. ) (DoLoop () ((Var 17 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 17 a) () (Integer 4) () ) ()) [(Assignment (Var 17 r) (FunctionCall 7 add_integer () [((Var 17 r)) ((ArrayItem (Var 17 a) [(() (Var 17 i) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. )] [] )] (Var 17 r) Public .true. .true. () ), mysum_integer_n: (Function (SymbolTable 18 { a: (Variable 18 a [n] In () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 18 n))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 18 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 18 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 18 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mysum_integer_n (FunctionType [(Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 18 n) (Var 18 a)] [(Assignment (Var 18 r) (FunctionCall 7 zero_integer () [((ArrayItem (Var 18 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. ) (DoLoop () ((Var 18 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 18 a) () (Integer 4) () ) ()) [(Assignment (Var 18 r) (FunctionCall 7 add_integer () [((Var 18 r)) ((ArrayItem (Var 18 a) [(() (Var 18 i) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. )] [] )] (Var 18 r) Private .true. .true. () ), sa: (Variable 16 sa [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), sb: (Variable 16 sb [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(DoLoop () ((Var 16 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 16 a) () (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) ()) [(Assignment (ArrayItem (Var 16 a) [(() (Var 16 i) ())] (Integer 4) ColMajor () ) (Var 16 i) () .false. .false. ) (Assignment (ArrayItem (Var 16 b) [(() (Var 16 i) ())] (Integer 4) ColMajor () ) (Var 16 i) () .false. .false. )] [] ) (Assignment (Var 16 sa) (FunctionCall 16 mysum_integer () [((ArrayPhysicalCast (Var 16 a) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 16 sb) (FunctionCall 16 mysum_integer_n () [((ArraySize (Var 16 b) () (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) )) ((ArrayPhysicalCast (Var 16 b) FixedSizeArray PointerArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Mul (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 16 sa)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 16 sb)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), zero_integer: (ExternalSymbol 7 zero_integer 2 zero_integer template_array_02_math [] zero_integer Public ), zero_real: (ExternalSymbol 7 zero_real 2 zero_real template_array_02_math [] zero_real Public ) }) template_array_02_m () [template_array_02_math template_array_02_m] .false. .false. .false. ), template_array_02_math: (Module (SymbolTable 2 { add_integer: (Function (SymbolTable 3 { r: (Variable 3 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 x) (Var 3 y)] [(Assignment (Var 3 r) (IntegerBinOp (Var 3 x) Add (Var 3 y) (Integer 4) () ) () .false. .false. )] (Var 3 r) Public .true. .true. () ), add_real: (Function (SymbolTable 5 { r: (Variable 5 r [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 5 x) (Var 5 y)] [(Assignment (Var 5 r) (RealBinOp (Var 5 x) Add (Var 5 y) (Real 4) () ) () .false. .false. )] (Var 5 r) Public .true. .true. () ), zero_integer: (Function (SymbolTable 4 { r: (Variable 4 r [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_integer (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 x)] [(Assignment (Var 4 r) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 4 r) Public .true. .true. () ), zero_real: (Function (SymbolTable 6 { r: (Variable 6 r [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 6 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_real (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 6 x)] [(Assignment (Var 6 r) (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 0.000000 (Real 4) ) () ) () .false. .false. )] (Var 6 r) Public .true. .true. () ) }) template_array_02_math () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-unterminated_comment_01-a351b61.stderr0000664000175000017500000000023615227365530030703 0ustar alastairalastairC preprocessor error: Unterminated comment --> tests/errors/unterminated_comment_01.f90:3:8 | 3 | #endif /* unterminated comment starts here | ^ lfortran-0.64.0/tests/reference/ast-array5-2cde105.json0000664000175000017500000000070715227365530022654 0ustar alastairalastair{ "basename": "ast-array5-2cde105", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array5.f90", "infile_hash": "33d963b417ddd6ec562edf7732f7c595264090883fd4b80011b7a39d", "outfile": null, "outfile_hash": null, "stdout": "ast-array5-2cde105.stdout", "stdout_hash": "d8d454a272d8513cb4631f98108ed86879f616d03bce1e5d92ddeaf3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics10-ccd6322.json0000664000175000017500000000074015227365530023775 0ustar alastairalastair{ "basename": "asr-intrinsics10-ccd6322", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics10.f90", "infile_hash": "71c18b1007f67b59ecfe255092d42f662d34cd9e53bd53b154b0017c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics10-ccd6322.stderr", "stderr_hash": "218f007478d11304b2416451dc27d5018dd97bfbb616e4d057f0eec0", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-if_04-7f1b69d.json0000664000175000017500000000104515227365530022365 0ustar alastairalastair{ "basename": "ast-if_04-7f1b69d", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/if_04.f90", "infile_hash": "dc3029f2df7281746bd116d435ee39913201c693d801c2e53aca3886", "outfile": null, "outfile_hash": null, "stdout": "ast-if_04-7f1b69d.stdout", "stdout_hash": "600a6854a444ffce0dbf60489f9c9f924f43e1d9cb44fa151a35eb10", "stderr": "ast-if_04-7f1b69d.stderr", "stderr_hash": "8b854a8be811f407b5f543a37121d6b73b7265ed8b67dc1c76a42d63", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arithmetic_if1-f119c2a.json0000664000175000017500000000074615227365530024345 0ustar alastairalastair{ "basename": "asr-arithmetic_if1-f119c2a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/arithmetic_if1.f90", "infile_hash": "41667893ffab9b073a6c0674e1821f3009b9c55fe383c44dd863ac77", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-arithmetic_if1-f119c2a.stderr", "stderr_hash": "a9af1739b20d99ec366498b705aeb4044956976d00d257546dada29a", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-implicit5-8745632.stdout0000664000175000017500000003134715227365530023522 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { cpdsa: (Function (SymbolTable 2 { ca0: (Variable 2 ca0 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cdn: (Variable 2 cdn [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cpdsa: (Variable 2 cpdsa [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), eps: (Variable 2 eps [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pi: (Variable 2 pi [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), va0: (Variable 2 va0 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cpdsa (FunctionType [(Integer 4) (Real 4) (Real 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 n) (Var 2 z) (Var 2 cdn)] [(Assignment (Var 2 eps) (RealConstant 0.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 pi) (RealConstant 3.141593 (Real 8) ) () .false. .false. ) (Assignment (Var 2 ca0) (Cast (IntrinsicElementalFunction Exp [(RealBinOp (RealBinOp (RealUnaryMinus (RealConstant 0.250000 (Real 8) ) (Real 8) (RealConstant -0.250000 (Real 8) ) ) Mul (Cast (Var 2 z) RealToReal (Real 8) () () ) (Real 8) () ) Mul (Cast (Var 2 z) RealToReal (Real 8) () () ) (Real 8) () )] 0 (Real 8) () ) RealToReal (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 va0) (RealBinOp (RealConstant 0.500000 (Real 8) ) Mul (RealBinOp (RealConstant 1.000000 (Real 8) ) Sub (Cast (Var 2 n) IntegerToReal (Real 8) () () ) (Real 8) () ) (Real 8) () ) () .false. .false. )] (Var 2 cpdsa) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-implicit1-418fb10.stderr0000664000175000017500000000157015227365530024275 0ustar alastairalastairstyle suggestion: Use real(8) instead of real*8 --> tests/implicit1.f90:13:14 | 13 | implicit real*8 (a-h,o-z) | ^ help: write this as 'real(8)' style suggestion: Use integer(8) instead of integer*8 --> tests/implicit1.f90:25:17 | 25 | implicit integer*8 (i,j-l,m,n) | ^ help: write this as 'integer(8)' style suggestion: Use integer(4) instead of integer*4 --> tests/implicit1.f90:27:17 | 27 | IMPLICIT INTEGER*4 (C, D-x) | ^ help: write this as 'integer(4)' style suggestion: Use logical(4) instead of logical*4 --> tests/implicit1.f90:32:17 | 32 | implicit logical*4 (l, u-z) | ^ help: write this as 'logical(4)' style suggestion: Use complex(4) instead of complex*8 --> tests/implicit1.f90:38:17 | 38 | implicit complex*8 (z) | ^ help: write this as 'complex(4)' lfortran-0.64.0/tests/reference/ast-fn_call1-7e6ba0b.stdout0000664000175000017500000000601115227365530023556 0ustar alastairalastair(TranslationUnit [(FuncCallOrArray size [] [(() tvec () 0)] [(dim 2)] [] [] ) (FuncCallOrArray min [] [(() (FuncCallOrArray tvec [] [(() 2 () 0) (() i () 0)] [] [] [] ) () 0) (() (FuncCallOrArray tvec [] [(() 1 () 0) (() i () 0)] [] [] [] ) () 0)] [] [] [] ) (FuncCallOrArray a [] [(() 1 () 0) (() 2 () 0) (() 3 () 0)] [] [] [] ) (FuncCallOrArray f [] [(() a () 0) (() b () 0)] [(d (/ 5 2)) (c (+ 3 3))] [] [] ) (FuncCallOrArray A [] [(() i () 0) (() j () 0) (() k () 0)] [] [] [] ) (FuncCallOrArray X [] [(() i () 0)] [] [] [] ) (FuncCallOrArray X [] [(() () 1 0)] [] [] [] ) (FuncCallOrArray X [] [(a () 1 0)] [] [] [] ) (FuncCallOrArray X [] [(() b 1 0)] [] [] [] ) (FuncCallOrArray X [] [(a b 1 0)] [] [] [] ) (FuncCallOrArray X [] [(() () c 0)] [] [] [] ) (FuncCallOrArray X [] [(() () c 0)] [] [] [] ) (FuncCallOrArray X [] [(a () c 0)] [] [] [] ) (FuncCallOrArray X [] [(a () c 0)] [] [] [] ) (FuncCallOrArray X [] [(() b c 0)] [] [] [] ) (FuncCallOrArray X [] [(a b c 0)] [] [] [] ) (FuncCallOrArray X [] [(a b 1 0) (() () c 0) (a () 1 0) (a () c 0)] [] [] [] )] ) lfortran-0.64.0/tests/reference/asr-types_03-f0b782e.json0000664000175000017500000000074215227365530023126 0ustar alastairalastair{ "basename": "asr-types_03-f0b782e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_03.f90", "infile_hash": "388683b8609d91d174ceb8c24787c982bf1ea22d342e94d44457b861", "outfile": null, "outfile_hash": null, "stdout": "asr-types_03-f0b782e.stdout", "stdout_hash": "e2ab2f224496f3118fe3c6f7ff8122582194afb09c332e1da52d488d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/c-case_02-eff3752.json0000664000175000017500000000071415227365530022334 0ustar alastairalastair{ "basename": "c-case_02-eff3752", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/../integration_tests/case_02.f90", "infile_hash": "76d3020fba89787d565870ed03c1b5e8914d12b062cb9ca7a8c37550", "outfile": null, "outfile_hash": null, "stdout": "c-case_02-eff3752.stdout", "stdout_hash": "0c399d74c1e9da4150b7897617885c26efa6f50b999355381b02d7a5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-rand_01-5739aee.json0000664000175000017500000000104115227365530022702 0ustar alastairalastair{ "basename": "asr-rand_01-5739aee", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/warnings/rand_01.f90", "infile_hash": "52adc408e8be0fc19d7bcc8d16bd550a26e39637ff244dd87957335f", "outfile": null, "outfile_hash": null, "stdout": "asr-rand_01-5739aee.stdout", "stdout_hash": "52ead2c39799444e040adbb82a13ba28fa6417d12c34aa30ff54ad2c", "stderr": "asr-rand_01-5739aee.stderr", "stderr_hash": "ce9fb38fdc5fdacd02522991309cc7d24272f37328734150c223153e", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-shiftl1-0ff5448.stdout0000664000175000017500000000725715227365530023336 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { shiftl1: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) shiftl1 [] [(Print (StringFormat () [(IntrinsicElementalFunction Shiftl [(IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction Shiftl [(Var 2 x) (Var 2 y)] 0 (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-array_bounds_check_05-d584fab.json0000664000175000017500000000074315227365530025711 0ustar alastairalastair{ "basename": "run-array_bounds_check_05-d584fab", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_05.f90", "infile_hash": "9ef4f46c35739ba9241c8707b603e057f3ec10d97212ae6dd2ec1796", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_05-d584fab.stderr", "stderr_hash": "866571113400c0410af025f9bcd1c42653650ddf22c1418a4c757e7c", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-class_01-704dee8.stdout0000664000175000017500000006060415227365530023444 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { circle_test: (Program (SymbolTable 6 { 1_circle_print: (ExternalSymbol 6 1_circle_print 3 print class_circle1 [circle] print Public ), 1_circle_radius: (ExternalSymbol 6 1_circle_radius 3 radius class_circle1 [circle] radius Public ), c: (Variable 6 c [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 6 circle Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), circle: (ExternalSymbol 6 circle 2 circle class_circle1 [] circle Public ) }) circle_test [class_circle1] [(Assignment (Var 6 c) (StructConstructor 6 circle [((RealConstant 1.500000 (Real 4) ))] (StructType [(Real 4)] [] .true. .false. ) () ) () .false. .false. ) (SubroutineCall 6 1_circle_print () [((Var 6 c))] (Var 6 c) .false. ) (Assignment (StructInstanceMember (Var 6 c) 6 1_circle_radius (Real 4) () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (SubroutineCall 6 1_circle_print () [((Var 6 c))] (Var 6 c) .false. )] ), class_circle1: (Module (SymbolTable 2 { circle: (Struct (SymbolTable 3 { area: (StructMethodDeclaration 3 area () circle_area 2 circle_area Source .false. .false. ), print: (StructMethodDeclaration 3 print () circle_print 2 circle_print Source .false. .false. ), radius: (Variable 3 radius [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle (StructType [(Real 4)] [] .true. .false. ) [] [radius] [] Source Private .false. .false. .false. [] () () [] ), circle_area: (Function (SymbolTable 4 { 1_circle_radius: (ExternalSymbol 4 1_circle_radius 3 radius class_circle1 [circle] radius Public ), area: (Variable 4 area [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 4 this [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 circle Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle_area (FunctionType [(StructType [(Real 4)] [] .false. .false. )] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 this)] [(Assignment (Var 4 area) (RealBinOp (Var 2 pi) Mul (RealBinOp (StructInstanceMember (Var 4 this) 4 1_circle_radius (Real 4) () ) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 4 area) Private .true. .true. () ), circle_print: (Function (SymbolTable 5 { 1_circle_area: (ExternalSymbol 5 1_circle_area 3 area class_circle1 [circle] area Public ), 1_circle_radius: (ExternalSymbol 5 1_circle_radius 3 radius class_circle1 [circle] radius Public ), area: (Variable 5 area [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 5 this [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 circle Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle_print (FunctionType [(StructType [(Real 4)] [] .false. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 this)] [(Assignment (Var 5 area) (FunctionCall 5 1_circle_area () [((Var 5 this))] (Real 4) () (Var 5 this) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Circle: r = " (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Var 5 this) 5 1_circle_radius (Real 4) () ) (StringConstant " area = " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 area)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Private .false. .false. () ), pi: (Variable 2 pi [] Local (Cast (RealConstant 3.141593 (Real 8) ) RealToReal (Real 4) (RealConstant 3.141593 (Real 4) ) () ) (RealConstant 3.141593 (Real 4) ) Save (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) class_circle1 () [class_circle1] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-maskl_negative-c92502f.stderr0000664000175000017500000000024115227365530024712 0ustar alastairalastairsemantic error: first argument of `maskl` must be nonnegative --> tests/errors/maskl_negative.f90:2:12 | 2 | print*, maskl(-24) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor9-641e112.json0000664000175000017500000000077015227365530026373 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor9-641e112", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor9.f90", "infile_hash": "29602fb21e7b99077fe13064a66d8d0d714141266b33059fd7f37cf2", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor9-641e112.stdout", "stdout_hash": "7654096527ea6f3df6bc9eda85f931b9ca2423918e32f726b6e3718d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-derived_types_03-268a4a4.json0000664000175000017500000000077215227365530024551 0ustar alastairalastair{ "basename": "ast-derived_types_03-268a4a4", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_03.f90", "infile_hash": "fd0a87db249f310cd20a90b39d5eb4627597acf774b62bdb8c4256c4", "outfile": null, "outfile_hash": null, "stdout": "ast-derived_types_03-268a4a4.stdout", "stdout_hash": "64d6e9c4eec135cc474600cd8f3a44aab8c56cef25247a747a25f881", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_12-4cdd01e.json0000664000175000017500000000074315227365530025676 0ustar alastairalastair{ "basename": "run-array_bounds_check_12-4cdd01e", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_12.f90", "infile_hash": "4c372157b9d4aa36edb76a7e8441fd140bf39e30bd585e97bd03da65", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_12-4cdd01e.stderr", "stderr_hash": "b9d05555fd308792d5cf18daea340ee12986d53b8aecf231f9f11b75", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-intrinsics14-5a6d04e.json0000664000175000017500000000074015227365530024003 0ustar alastairalastair{ "basename": "asr-intrinsics14-5a6d04e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics14.f90", "infile_hash": "e5abcb6a33f84a36c3412054dd1092db703e97cebdb5e26d69b29702", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics14-5a6d04e.stderr", "stderr_hash": "249e6e7185993869a1a130554f0fcf10c43c67fef75ae76089e4717c", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-template_add_01-56d8eff.stdout0000664000175000017500000022132215227365530025045 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_add_01: (Program (SymbolTable 13 { add_t: (ExternalSymbol 13 add_t 2 add_t template_add_01_m [] add_t Public ), r: (ExternalSymbol 13 r 2 r template_add_01_m [] r Public ), test_template: (ExternalSymbol 13 test_template 2 test_template template_add_01_m [] test_template Public ) }) template_add_01 [template_add_01_m] [(SubroutineCall 13 test_template () [] () .false. )] ), template_add_01_m: (Module (SymbolTable 2 { add_t: (Template (SymbolTable 5 { add_generic: (Function (SymbolTable 7 { x: (Variable 7 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 7 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_generic (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [f] [(Var 7 x) (Var 7 y)] [(Assignment (Var 7 z) (FunctionCall 5 f () [((Var 7 x)) ((Var 7 y))] (TypeParameter t ) () () ) () .false. .false. )] (Var 7 z) Public .true. .true. () ), f: (Function (SymbolTable 6 { x: (Variable 6 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 6 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 6 x) (Var 6 y)] [] (Var 6 z) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_t [t f] [(Require r [t f] )] ), func_arg_int: (Function (SymbolTable 9 { x: (Variable 9 x [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 9 y [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 9 z [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func_arg_int (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 x) (Var 9 y)] [(Assignment (Var 9 z) (IntegerBinOp (Var 9 x) Add (Var 9 y) (Integer 4) () ) () .false. .false. )] (Var 9 z) Private .true. .true. () ), func_arg_real: (Function (SymbolTable 8 { x: (Variable 8 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 8 z [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func_arg_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 x) (Var 8 y)] [(Assignment (Var 8 z) (RealBinOp (Var 8 x) Add (Var 8 y) (Real 4) () ) () .false. .false. )] (Var 8 z) Private .true. .true. () ), r: (Requirement (SymbolTable 3 { f: (Function (SymbolTable 4 { x: (Variable 4 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 4 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 4 x) (Var 4 y)] [] (Var 4 z) Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) r [t f] [] ), test_template: (Function (SymbolTable 10 { a: (Variable 10 a [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), add_integer: (Function (SymbolTable 12 { x: (Variable 12 x [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 12 y [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 12 z [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [func_arg_int] [(Var 12 x) (Var 12 y)] [(Assignment (Var 12 z) (FunctionCall 2 func_arg_int () [((Var 12 x)) ((Var 12 y))] (Integer 4) () () ) () .false. .false. )] (Var 12 z) Public .true. .true. () ), add_real: (Function (SymbolTable 11 { x: (Variable 11 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 11 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 11 z [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [func_arg_real] [(Var 11 x) (Var 11 y)] [(Assignment (Var 11 z) (FunctionCall 2 func_arg_real () [((Var 11 x)) ((Var 11 y))] (Real 4) () () ) () .false. .false. )] (Var 11 z) Public .true. .true. () ), b: (Variable 10 b [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 10 x [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 10 y [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 10 x) (RealConstant 5.100000 (Real 4) ) () .false. .false. ) (Assignment (Var 10 y) (RealConstant 7.200000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "The result is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 10 add_real () [((Var 10 x)) ((Var 10 y))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (FunctionCall 10 add_real () [((Var 10 x)) ((Var 10 y))] (Real 4) () () ) Sub (RealConstant 12.300000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 10 a) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 10 b) (IntegerConstant 9 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(StringConstant "The result is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 10 add_integer () [((Var 10 a)) ((Var 10 b))] (Integer 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (FunctionCall 10 add_integer () [((Var 10 a)) ((Var 10 b))] (Integer 4) () () ) NotEq (IntegerConstant 14 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] () Public .false. .false. () ) }) template_add_01_m () [template_add_01_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-complex2-092502c.json0000664000175000017500000000072015227365530023221 0ustar alastairalastair{ "basename": "llvm-complex2-092502c", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/complex2.f90", "infile_hash": "420a31c745b1be940871a88d76cfdc7432de5cbf6fe9f2e8bc87bf39", "outfile": null, "outfile_hash": null, "stdout": "llvm-complex2-092502c.stdout", "stdout_hash": "62ab3b90f3c1559bebd513732e5ffbc94c43248ccd558103fb7f134b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-doloop_02-13efa8f.json0000664000175000017500000000073615227365530023657 0ustar alastairalastair{ "basename": "julia-doloop_02-13efa8f", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/doloop_02.f90", "infile_hash": "3f887434509231f48fbbbda31f34778f17ddb6871b39c44626d54f2e", "outfile": null, "outfile_hash": null, "stdout": "julia-doloop_02-13efa8f.stdout", "stdout_hash": "5b604b185db4645137879631e1fee5d8c404f0a2182d0f8a7e0e0df8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/c-case_05-2fed69e.json0000664000175000017500000000071415227365530022422 0ustar alastairalastair{ "basename": "c-case_05-2fed69e", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/../integration_tests/case_05.f90", "infile_hash": "914477f4a376baf0341e522d2109b6108238cd1d9dfecf969283ab79", "outfile": null, "outfile_hash": null, "stdout": "c-case_05-2fed69e.stdout", "stdout_hash": "e11494fc2fd6252c1afaec4ce466fe7d4c568c782f009dd1c96dd038", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dprod_01-80a930c.json0000664000175000017500000000072415227365530023002 0ustar alastairalastair{ "basename": "asr-dprod_01-80a930c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dprod_01.f90", "infile_hash": "d1ce33c89bee90c6db80924ecb910e367598d14758aafaa9303aeeb1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dprod_01-80a930c.stderr", "stderr_hash": "e2b330264207fb4416b7623e66f71d83926b820e67b727c487394dfd", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-callback_03-0f44942.stdout0000664000175000017500000001601015227365530024106 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @__module_callback_03_cb(float (float*)* %f, float* %a, float* %b) { .entry: %cb = alloca float, align 4 %0 = load float, float* %b, align 4 %1 = load float, float* %a, align 4 %2 = fsub float %0, %1 %3 = call float %f(float* %a) %4 = fadd float %2, %3 %5 = call float %f(float* %b) %6 = fadd float %4, %5 store float %6, float* %cb, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_cb FINALIZE_SYMTABLE_cb: ; preds = %return %7 = load float, float* %cb, align 4 ret float %7 } declare float @f(float*) define void @__module_callback_03_foo1(float* %c, float* %d) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call float @__module_callback_03_cb(float (float*)* @foo1.__module_callback_03_f, float* %c, float* %d) %3 = alloca float, align 4 store float %2, float* %3, align 4 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, float* %3) %5 = load i64, i64* %1, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_foo1 FINALIZE_SYMTABLE_foo1: ; preds = %return ret void } define float @foo1.__module_callback_03_f(float* %x) { .entry: %f = alloca float, align 4 %0 = load float, float* %x, align 4 %1 = fmul float 2.000000e+00, %0 store float %1, float* %f, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return %2 = load float, float* %f, align 4 ret float %2 } define void @__module_callback_03_foo2(float* %c, float* %d) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call float @__module_callback_03_cb(float (float*)* @foo2.__module_callback_03_f, float* %c, float* %d) %3 = alloca float, align 4 store float %2, float* %3, align 4 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, float* %3) %5 = load i64, i64* %1, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_foo2 FINALIZE_SYMTABLE_foo2: ; preds = %return ret void } define float @foo2.__module_callback_03_f(float* %x) { .entry: %f = alloca float, align 4 %0 = load float, float* %x, align 4 %1 = fmul float -2.000000e+00, %0 store float %1, float* %f, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return %2 = load float, float* %f, align 4 ret float %2 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value1 = alloca float, align 4 %call_arg_value = alloca float, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store float 1.500000e+00, float* %call_arg_value, align 4 store float 2.000000e+00, float* %call_arg_value1, align 4 call void @__module_callback_03_foo1(float* %call_arg_value, float* %call_arg_value1) store float 1.500000e+00, float* %call_arg_value, align 4 store float 2.000000e+00, float* %call_arg_value1, align 4 call void @__module_callback_03_foo2(float* %call_arg_value, float* %call_arg_value1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast-types_13-76138b5.stderr0000664000175000017500000000474415227365530023333 0ustar alastairalastairstyle suggestion: Use character(5) instead of character*5 --> tests/../integration_tests/types_13.f90:30:5 | 30 | character*5 :: d | ^^^^^^^^^^^ help: write this as 'character(5)' style suggestion: Use integer(4) instead of integer*4 --> tests/../integration_tests/types_13.f90:36:5 | 36 | integer*4, value, intent(in) :: a | ^^^^^^^^^ help: write this as 'integer(4)' style suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/types_13.f90:37:5 | 37 | real*8, value, intent(in) :: b | ^^^^^^ help: write this as 'real(8)' style suggestion: Use logical(4) instead of logical*4 --> tests/../integration_tests/types_13.f90:38:5 | 38 | logical*4 :: c | ^^^^^^^^^ help: write this as 'logical(4)' style suggestion: Use integer(4) instead of integer*4 --> tests/../integration_tests/types_13.f90:43:5 | 43 | integer*4, value, intent(in) :: a | ^^^^^^^^^ help: write this as 'integer(4)' style suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/types_13.f90:44:5 | 44 | real*8, value, intent(in) :: b | ^^^^^^ help: write this as 'real(8)' style suggestion: Use logical(4) instead of logical*4 --> tests/../integration_tests/types_13.f90:45:5 | 45 | logical*4 :: c | ^^^^^^^^^ help: write this as 'logical(4)' style suggestion: Use integer(4) instead of integer*4 --> tests/../integration_tests/types_13.f90:51:5 | 51 | integer*4, value, intent(in) :: a | ^^^^^^^^^ help: write this as 'integer(4)' style suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/types_13.f90:52:5 | 52 | real*8, value, intent(in) :: b | ^^^^^^ help: write this as 'real(8)' style suggestion: Use logical(4) instead of logical*4 --> tests/../integration_tests/types_13.f90:53:5 | 53 | logical*4 :: c | ^^^^^^^^^ help: write this as 'logical(4)' style suggestion: Use integer(4) instead of integer*4 --> tests/../integration_tests/types_13.f90:59:5 | 59 | integer*4, value, intent(in) :: a | ^^^^^^^^^ help: write this as 'integer(4)' style suggestion: Use real(8) instead of real*8 --> tests/../integration_tests/types_13.f90:60:5 | 60 | real*8, value, intent(in) :: b | ^^^^^^ help: write this as 'real(8)' style suggestion: Use logical(4) instead of logical*4 --> tests/../integration_tests/types_13.f90:61:5 | 61 | logical*4 :: c | ^^^^^^^^^ help: write this as 'logical(4)' lfortran-0.64.0/tests/reference/asr-program1-17e5471.stdout0000664000175000017500000000506215227365530023421 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { program1: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) program1 [] [(Assignment (Var 2 i) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err6-47462f4.json0000664000175000017500000000076015227365530025310 0ustar alastairalastair{ "basename": "asr_preprocess-cpp_err6-47462f4", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp_err6.f90", "infile_hash": "ac85436de6965d6e21140cdd72302a260de0f86538d86bd9b064a919", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp_err6-47462f4.stderr", "stderr_hash": "2b28f63b4ba3586c56a0b11dbd7597d09387b24d0002fcf81e9f02ae", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-bindc3-91bce68.stdout0000664000175000017500000002215115227365530023175 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bindc3: (Program (SymbolTable 2 { c_f_pointer: (ExternalSymbol 2 c_f_pointer 4 c_f_pointer lfortran_intrinsic_iso_c_binding [] c_f_pointer Public ), c_intptr_t: (ExternalSymbol 2 c_intptr_t 4 c_intptr_t lfortran_intrinsic_iso_c_binding [] c_intptr_t Public ), c_loc: (ExternalSymbol 2 c_loc 4 c_loc lfortran_intrinsic_iso_c_binding [] c_loc Public ), c_ptr: (ExternalSymbol 2 c_ptr 4 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), idx: (Variable 2 idx [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), queries: (Variable 2 queries [] Local () () Default (CPtr) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Pointer (Integer 2) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 2) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) bindc3 [iso_c_binding] [(CPtrToPointer (Var 2 queries) (Var 2 x) () () ) (Print (StringFormat () [(BitCast (PointerToCPtr (Var 2 x) (CPtr) () ) (IntegerConstant 0 (Integer 8) Decimal) () (Integer 8) () ) (BitCast (Var 2 queries) (IntegerConstant 0 (Integer 8) Decimal) () (Integer 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Associate (Var 2 x) (Var 2 y) ) (Print (StringFormat () [(BitCast (PointerToCPtr (Var 2 x) (CPtr) () ) (IntegerConstant 0 (Integer 8) Decimal) () (Integer 8) () ) (BitCast (PointerToCPtr (GetPointer (Var 2 y) (Pointer (Integer 2) ) () ) (CPtr) () ) (IntegerConstant 0 (Integer 8) Decimal) () (Integer 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding) }) [] ) lfortran-0.64.0/tests/reference/asr-modules_06-821cc56.stdout0000664000175000017500000001725315227365530023731 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_06_a: (Module (SymbolTable 4 { a: (Function (SymbolTable 5 { a: (Variable 5 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 5 a) (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Add (FunctionCall 4 b () [] (Integer 4) () () ) (Integer 4) () ) () .false. .false. )] (Var 5 a) Public .true. .true. () ), b: (ExternalSymbol 4 b 2 b modules_06_b [] b Public ) }) modules_06_a () [modules_06_b] .false. .false. .false. ), modules_06_b: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { b: (Variable 3 b [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 b) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. )] (Var 3 b) Public .true. .true. () ) }) modules_06_b () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-merge_bits_run-9579699.json0000664000175000017500000000074615227365530024300 0ustar alastairalastair{ "basename": "asr-merge_bits_run-9579699", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/merge_bits_run.f90", "infile_hash": "1af0976e21bea2f1804946c6fc9338f4a28f5ed426b33ffe3b79c6b5", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-merge_bits_run-9579699.stderr", "stderr_hash": "f92fd4979a11db6df9e223a4d7e8c5a8b53bcaefeb6579bdc7da7aa4", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-derived_types_41-d6b8ce9.stdout0000664000175000017500000005463015227365530025277 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_41: (Program (SymbolTable 4 { 1_mytype_a: (ExternalSymbol 4 1_mytype_a 3 a derived_types_41_mod [mytype] a Public ), 1_mytype_b: (ExternalSymbol 4 1_mytype_b 3 b derived_types_41_mod [mytype] b Public ), 1_mytype_c: (ExternalSymbol 4 1_mytype_c 3 c derived_types_41_mod [mytype] c Public ), mytype: (ExternalSymbol 4 mytype 2 mytype derived_types_41_mod [] mytype Public ), mytype_instance: (ExternalSymbol 4 mytype_instance 2 mytype_instance derived_types_41_mod [] mytype_instance Public ) }) derived_types_41 [derived_types_41_mod] [(If () (IntrinsicArrayFunction Any [(ArrayPhysicalCast (IntegerCompare (StructInstanceMember (Var 4 mytype_instance) 4 1_mytype_a (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) NotEq (ArrayConstant 8 [1, 2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray DescriptorArray (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () )] 0 (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (StructInstanceMember (Var 4 mytype_instance) 4 1_mytype_b (Integer 4) () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntrinsicArrayFunction Any [(ArrayPhysicalCast (IntegerCompare (StructInstanceMember (Var 4 mytype_instance) 4 1_mytype_c (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) NotEq (ArrayConstant 8 [4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray DescriptorArray (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () )] 0 (Logical 4) () ) [(ErrorStop () )] [] )] ), derived_types_41_mod: (Module (SymbolTable 2 { mytype: (Struct (SymbolTable 3 { a: (Variable 3 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mytype (StructType [(Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) (Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray )] [] .true. .false. ) [] [a b c] [] Source Public .false. .false. .false. [] () () [] ), mytype_instance: (Variable 2 mytype_instance [] Local (StructConstant 2 mytype [((ArrayConstant 8 [1, 2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor )) ((IntegerConstant 3 (Integer 4) Decimal)) ((ArrayConstant 8 [4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ))] (StructType [(Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) (Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray )] [] .true. .false. ) ) (StructConstant 2 mytype [((ArrayConstant 8 [1, 2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor )) ((IntegerConstant 3 (Integer 4) Decimal)) ((ArrayConstant 8 [4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ))] (StructType [(Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) (Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray )] [] .true. .false. ) ) Default (StructType [(Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) (Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray )] [] .true. .false. ) 2 mytype Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) derived_types_41_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-if_04-7f1b69d.stderr0000664000175000017500000000023715227365530022721 0ustar alastairalastairstyle suggestion: Use 'end if' instead of 'endif' --> tests/../integration_tests/if_04.f90:25:1 | 25 | endif name | ^^^^^ help: write this as 'end if' lfortran-0.64.0/tests/reference/asr-kind2-191347a.stderr0000664000175000017500000000017215227365530022652 0ustar alastairalastairsemantic error: Expected initialization expression for kind --> tests/errors/kind2.f90:4:6 | 4 | real(*) a | ^ lfortran-0.64.0/tests/reference/llvm-return_01-495409d.stderr0000664000175000017500000000026115227365530023657 0ustar alastairalastairstyle suggestion: Use '>' instead of '.gt.' --> tests/../integration_tests/return_01.f90:9:15 | 9 | if (i .GT. 5) then | ^^^^ help: write this as '>' lfortran-0.64.0/tests/reference/asr-string_01-bda4726.stdout0000664000175000017500000000465415227365530023641 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { print_01: (Program (SymbolTable 2 { my_name: (Variable 2 my_name [] Local (StringConstant "Dominic" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "Dominic" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) print_01 [] [(Print (StringFormat () [(StringConstant "My name is " (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 my_name)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_intent_out_deallocate-finalize_01-43c7d40.stdout0000664000175000017500000005401515227365530030655 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { finalize_01: (Program (SymbolTable 5 { arr: (Variable 5 arr [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), internal_sub: (Function (SymbolTable 6 { arr_real: (Variable 6 arr_real [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), bl: (Block (SymbolTable 7 { arr_in_block: (Variable 7 arr_in_block [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bl [(Exit bl ) (Return)] ), str: (Variable 6 str [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) internal_sub (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(BlockCall -1 6 bl ) (WhileLoop () (LogicalConstant .true. (Logical 4) ) [(Return)] [] )] () Public .true. .true. () ), ss: (ExternalSymbol 5 ss 2 ss finalize_01_mod [] ss Public ), str: (Variable 5 str [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), test_01: (ExternalSymbol 5 test_01 2 test_01 finalize_01_mod [] test_01 Public ) }) finalize_01 [finalize_01_mod] [(Allocate [((Var 5 str) [] (IntegerConstant 10 (Integer 4) Decimal) () (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (SubroutineCall 5 ss () [] () .false. ) (SubroutineCall 5 internal_sub () [] () .false. ) (Return)] ), finalize_01_mod: (Module (SymbolTable 2 { ss: (Function (SymbolTable 4 { arr: (Variable 4 arr [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ss (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Allocate [((Var 4 arr) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] () () ())] () () () ) (If () (LogicalConstant .true. (Logical 4) ) [(Return)] [(Return)] )] () Public .true. .true. () ), test_01: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), str: (Variable 3 str [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_01 (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Allocate [((Var 3 str) [] (IntegerConstant 10 (Integer 4) Decimal) () (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Return) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(Return)] [] )] () Public .true. .true. () ) }) finalize_01_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr_indent-subroutine1-41f648b.stdout0000664000175000017500000001673315227365530025602 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { g: (Function (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) g (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (Var 2 x) (IntegerBinOp (Var 2 x) Mul (Var 2 i) (Integer 4) () ) () .false. .false. )] [] )] () Public .true. .true. () ), h: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) h (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 x) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (Var 3 x) (IntegerBinOp (Var 3 i) Mul (Var 3 x) (Integer 4) () ) () .false. .false. )] [] )] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-program_without_line_cc-b84ba02.stdout0000664000175000017500000000036715227365530026727 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { }) [(Print (StringConstant "OK" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) lfortran-0.64.0/tests/reference/run-print4-e3cf30b.stdout0000664000175000017500000000070515227365530023337 0ustar alastairalastair20000000000000000 22 33 F 1 1 1 1 1 1 1 1 1 1 (2.00000000,3.00000000) 1 1 1 1 1 1 1 1 1 1 HelloLFortran HelloLFortran HelloLFortran HelloLComp 20000000000000000 20000000000000000 20000000000000000 HelloLFortran HelloLFortranHelloLFortran med med med med med med med med med med 22 10.300000000000001 T T T T T T T T T F 10.3000002 F 232 stringstring 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 33 1 1 1 1 1 1 1 1 1 here HelloLFortranHelloLFortran F lfortran-0.64.0/tests/reference/run-format_35-3cec85a.json0000664000175000017500000000071515227365530023354 0ustar alastairalastair{ "basename": "run-format_35-3cec85a", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_35.f90", "infile_hash": "f896fc01b6e682902fd344315307e1e7d30628de4f084373e8661259", "outfile": null, "outfile_hash": null, "stdout": "run-format_35-3cec85a.stdout", "stdout_hash": "1eb4aa6672473c6d9a100da8d292060aacac62d946b7c74b373cd04c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-type_conflict1-5097f3a.stderr0000664000175000017500000000031715227365530024654 0ustar alastairalastairsemantic error: Parameter attribute cannot be used with Target attribute --> tests/errors/type_conflict1.f90:3:5 | 3 | integer, parameter, target :: foo=4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-bin_op_real_dp-21bb7e8.json0000664000175000017500000000076415227365530024415 0ustar alastairalastair{ "basename": "asr-bin_op_real_dp-21bb7e8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bin_op_real_dp.f90", "infile_hash": "051ba0744595dc6c3079fa4dd5b8cf1ee0504f434ee5dd8eb64ad7cc", "outfile": null, "outfile_hash": null, "stdout": "asr-bin_op_real_dp-21bb7e8.stdout", "stdout_hash": "6cac2e3d9c4e0f90a44e39130cc4aad5d3bd9bbb101c4a525f4afff0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allow_implicit_interface2-f4d4abc.stdout0000664000175000017500000002053515227365530027277 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { fdjac1: (Function (SymbolTable 2 { fcn: (Function (SymbolTable 3 { fcn_arg_0: (Variable 3 fcn_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fcn_arg_1: (Variable 3 fcn_arg_1 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fcn (FunctionType [(Integer 4) (Integer 4)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 fcn_arg_0) (Var 3 fcn_arg_1)] [] () Public .false. .false. () ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fdjac1 (FunctionType [(Real 4) (Integer 4) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 fcn) (Var 2 n) (Var 2 x) (Var 2 y)] [(SubroutineCall 2 fcn () [((Var 2 x)) ((Var 2 y))] () .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form_4-656a640.json0000664000175000017500000000075315227365530023667 0ustar alastairalastair{ "basename": "ast-fixed_form_4-656a640", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/fixed_form_4.f", "infile_hash": "ead212bbc34e4848d189561c4e6474149e4afb1bfeda6f7e46b90b12", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-fixed_form_4-656a640.stderr", "stderr_hash": "dd0de417e4cccdc2321f322a53b4aa0c212ae0ee3dbdaf980d13ec3a", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-parameter_05-916c4d8.json0000664000175000017500000000075615227365530023676 0ustar alastairalastair{ "basename": "asr-parameter_05-916c4d8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/parameter_05.f90", "infile_hash": "050c43a9cdbd3f792c1b0b750daa46584ebee4ee16bebe0333f92e9b", "outfile": null, "outfile_hash": null, "stdout": "asr-parameter_05-916c4d8.stdout", "stdout_hash": "203c6b61c5d50c9dea4722119dc53d112a2afffa9e62ebf9bb080834", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-sync1-5d8b786.json0000664000175000017500000000071715227365530023131 0ustar alastairalastair{ "basename": "ast_f90-sync1-5d8b786", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/sync1.f90", "infile_hash": "363462c860cc54ea57727a4d2ee43782f907dd682bcafcb8fa2017cb", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-sync1-5d8b786.stdout", "stdout_hash": "6a7ee91dfaa1f073b34287cf672a38961de6950f061a815621778d54", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_doloop3-d579f3c.json0000664000175000017500000000076315227365530025116 0ustar alastairalastair{ "basename": "ast-fixedform_doloop3-d579f3c", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_doloop3.f", "infile_hash": "ebd193385bf57e6d56e977b85546143c590e783d1f2b5bdea17ecdf9", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_doloop3-d579f3c.stdout", "stdout_hash": "359c9d820d5c7a6f090fe92de1ebc651158e6974e0e50b191458b82c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-common2-1811464.stdout0000664000175000017500000000615015227365530023157 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ()) (b [] [] () () None ()) (c [] [] () () None ()) (d [] [] () () None ()) (e [] [] () () None ()) (g [] [] () () None ()) (h [] [] () () None ()) (i [] [] () () None ()) (j [] [] () () None ()) (k [] [] () () None ())] () ) (Declaration () [(AttrCommon [(block_1 [(a [] [] () a None ()) (b [] [] () b None ()) (h [] [] () h None ())]) (block_2 [(c [] [] () c None ()) (d [] [] () d None ())]) (block_3 [(e [] [] () e None ()) (g [] [] () g None ())])] )] [] () ) (Declaration () [(AttrCommon [(block_4 [(i [] [] () i None ())]) (block_5 [(j [] [] () j None ()) (k [] [] () k None ())])] )] [] () )] [] [] [] )] ) lfortran-0.64.0/tests/reference/llvm-print_01-63a0480.stdout0000664000175000017500000001417415227365530023506 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [15 x i8] c"I4,I4,I4,I4,I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c" \00", align 1 @3 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [15 x i8] c"I4,I4,I4,I4,I4\00", align 1 @4 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %lfortran_iomsg = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store %string_descriptor zeroinitializer, %string_descriptor* %lfortran_iomsg, align 1 %3 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 1 store i64 0, i64* %3, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 0 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 1) store i8* %6, i8** %4, align 8 %x = alloca i32, align 4 store i32 25, i32* %x, align 4 %7 = alloca i64, align 8 %8 = alloca i32, align 4 store i32 1, i32* %8, align 4 %9 = alloca i32, align 4 store i32 3, i32* %9, align 4 %10 = load i32, i32* %x, align 4 %11 = add i32 25, %10 %12 = alloca i32, align 4 store i32 %11, i32* %12, align 4 %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @serialization_info, i32 0, i32 0), i64* %7, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %x, i32* %8, i32* %9, i32* %x, i32* %12) %14 = load i64, i64* %7, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %13, i8** %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %14, i64* %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %18 = load i8*, i8** %17, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %20 = load i64, i64* %19, align 8 %21 = trunc i64 %20 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %22 = icmp eq i8* %13, null br i1 %22, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %13) br label %free_done free_done: ; preds = %free_nonnull, %.entry %23 = alloca i32*, align 8 store i32* null, i32** %23, align 8 %24 = load i32*, i32** %23, align 8 %25 = call i32 @_lfortran_get_decimal_mode(i32 6) %26 = call i32 @_lfortran_get_sign_mode(i32 6) %27 = call i32 @_lfortran_get_round_mode(i32 6) %28 = alloca i64, align 8 %29 = alloca i32, align 4 store i32 1, i32* %29, align 4 %30 = alloca i32, align 4 store i32 3, i32* %30, align 4 %31 = load i32, i32* %x, align 4 %32 = add i32 25, %31 %33 = alloca i32, align 4 store i32 %32, i32* %33, align 4 %34 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @serialization_info.1, i32 0, i32 0), i64* %28, i32 0, i32 0, i32 %25, i32 %26, i32 %27, i32* %x, i32* %29, i32* %30, i32* %x, i32* %33) %35 = load i64, i64* %28, align 8 %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %34, i8** %36, align 8 %37 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %35, i64* %37, align 8 %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %39 = load i8*, i8** %38, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %41 = load i64, i64* %40, align 8 call void (i32, i32*, i8*, i64, ...) @_lfortran_file_write(i32 6, i32* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @4, i32 0, i32 0), i64 4, i8* %39, i64 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @3, i32 0, i32 0), i64 1) %42 = icmp eq i8* %34, null br i1 %42, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %34) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_print_01 FINALIZE_SYMTABLE_print_01: ; preds = %return br label %Finalize_Variable_lfortran_iomsg Finalize_Variable_lfortran_iomsg: ; preds = %FINALIZE_SYMTABLE_print_01 %43 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 0 %44 = load i8*, i8** %43, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %44) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare i32 @_lfortran_get_decimal_mode(i32) declare i32 @_lfortran_get_sign_mode(i32) declare i32 @_lfortran_get_round_mode(i32) declare void @_lfortran_file_write(i32, i32*, i8*, i64, ...) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-legacy_array_sections_01-2515c0f.stdout0000664000175000017500000020412215227365530026775 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %array.1 = type { double*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] } %dimension_descriptor = type { i64, i64, i64 } %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [37 x i8] c"__libasr_created__subroutine_call_b1\00", align 1 @1 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @2 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @3 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @4 = private unnamed_addr constant [37 x i8] c"__libasr_created__subroutine_call_b1\00", align 1 @5 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @6 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @7 = private unnamed_addr constant [103 x i8] c"Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @8 = private unnamed_addr constant [36 x i8] c"__libasr_created__subroutine_call_b\00", align 1 @9 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @10 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @11 = private unnamed_addr constant [103 x i8] c"Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @12 = private unnamed_addr constant [36 x i8] c"__libasr_created__subroutine_call_b\00", align 1 @13 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @14 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @15 = private unnamed_addr constant [103 x i8] c"Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @16 = private unnamed_addr constant [37 x i8] c"__libasr_created__subroutine_call_b1\00", align 1 @17 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @18 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @19 = private unnamed_addr constant [103 x i8] c"Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"w\00", align 1 @21 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @22 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @23 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @24 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @25 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @26 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @27 = private unnamed_addr constant [143 x i8] c"Runtime error: Array shape mismatch in subroutine '%s'\0A\0ATried to match size %d of dimension %d of argument number %d, but expected size is %d\0A\00", align 1 @28 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [5 x i8] c"[R8]\00", align 1 @29 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @30 = private unnamed_addr constant [2 x i8] c"w\00", align 1 @31 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @32 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @33 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @34 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @35 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @36 = private unnamed_addr constant [2 x i8] c"w\00", align 1 @37 = private unnamed_addr constant [56 x i8] c"tests/../integration_tests/legacy_array_sections_01.f90\00", align 1 @38 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @39 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @40 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @41 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @a(double* %w) { .entry: %arr_desc17 = alloca %array.1, align 8 %0 = call i8* @_lfortran_get_default_allocator() %array_section_descriptor = alloca %array.1, align 8 %arr_desc1 = alloca %array.1, align 8 %arr_desc = alloca %array.1, align 8 %__do_loop_end = alloca i32, align 4 %__do_loop_end1 = alloca i32, align 4 %__lcompilers_i_0 = alloca i32, align 4 %__libasr_created__subroutine_call_b = alloca %array.1*, align 8 store %array.1* null, %array.1** %__libasr_created__subroutine_call_b, align 8 %1 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 8 %2 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %1, i32 0, i32 0 %3 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %2, i32 0 %4 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 0 store i64 1, i64* %4, align 8 %5 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 1 store i64 1, i64* %5, align 8 %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 2 store i64 0, i64* %6, align 8 %7 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 3 store i8 1, i8* %7, align 1 %8 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 0 store double* null, double** %8, align 8 store %array.1* %arr_desc, %array.1** %__libasr_created__subroutine_call_b, align 8 %__libasr_created__subroutine_call_b1 = alloca %array.1*, align 8 store %array.1* null, %array.1** %__libasr_created__subroutine_call_b1, align 8 %9 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 8 %10 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %9, i32 0, i32 0 %11 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %10, i32 0 %12 = getelementptr %dimension_descriptor, %dimension_descriptor* %11, i32 0, i32 0 store i64 1, i64* %12, align 8 %13 = getelementptr %dimension_descriptor, %dimension_descriptor* %11, i32 0, i32 1 store i64 1, i64* %13, align 8 %14 = getelementptr %dimension_descriptor, %dimension_descriptor* %11, i32 0, i32 2 store i64 0, i64* %14, align 8 %15 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 3 store i8 1, i8* %15, align 1 %16 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 0 store double* null, double** %16, align 8 store %array.1* %arr_desc1, %array.1** %__libasr_created__subroutine_call_b1, align 8 %icon = alloca i32, align 4 store i32 2, i32* %icon, align 4 %17 = load i32, i32* %icon, align 4 %18 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 8 %19 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %18, i32 0, i32 0 %20 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %19, i32 0 %21 = getelementptr %dimension_descriptor, %dimension_descriptor* %20, i32 0, i32 0 store i64 1, i64* %21, align 8 %22 = getelementptr %dimension_descriptor, %dimension_descriptor* %20, i32 0, i32 1 store i64 1, i64* %22, align 8 %23 = getelementptr %dimension_descriptor, %dimension_descriptor* %20, i32 0, i32 2 store i64 0, i64* %23, align 8 %24 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 3 store i8 1, i8* %24, align 1 %25 = sext i32 %17 to i64 %26 = sub i64 %25, 1 %27 = mul i64 1, %26 %28 = add i64 0, %27 %29 = getelementptr inbounds double, double* %w, i64 %28 %30 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 0 store double* %29, double** %30, align 8 %31 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 7 store i64 0, i64* %31, align 8 %32 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 8 %33 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %32, i32 0, i32 0 %34 = sext i32 %17 to i64 %35 = sub i64 5, %34 %36 = sdiv i64 %35, 1 %37 = add i64 %36, 1 %38 = icmp slt i64 5, %34 %39 = icmp sgt i64 5, %34 %40 = and i1 true, %38 %41 = and i1 false, %39 %42 = or i1 %40, %41 %43 = select i1 %42, i64 0, i64 %37 %44 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %33, i32 0 %45 = getelementptr %dimension_descriptor, %dimension_descriptor* %44, i32 0, i32 2 store i64 1, i64* %45, align 8 %46 = getelementptr %dimension_descriptor, %dimension_descriptor* %44, i32 0, i32 0 store i64 1, i64* %46, align 8 %47 = getelementptr %dimension_descriptor, %dimension_descriptor* %44, i32 0, i32 1 store i64 %43, i64* %47, align 8 %48 = getelementptr %array.1, %array.1* %array_section_descriptor, i32 0, i32 3 store i8 1, i8* %48, align 1 store %array.1* %array_section_descriptor, %array.1** %__libasr_created__subroutine_call_b, align 8 %49 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %50 = getelementptr %array.1, %array.1* %49, i32 0, i32 8 %51 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %50, i32 0, i32 0 %52 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %51, i32 0 %53 = getelementptr %dimension_descriptor, %dimension_descriptor* %52, i32 0, i32 0 %54 = load i64, i64* %53, align 8 %55 = getelementptr %dimension_descriptor, %dimension_descriptor* %52, i32 0, i32 2 %56 = load i64, i64* %55, align 8 %57 = icmp eq i64 %56, 1 %58 = and i1 true, %57 %59 = getelementptr %dimension_descriptor, %dimension_descriptor* %52, i32 0, i32 0 %60 = load i64, i64* %59, align 8 %61 = getelementptr %dimension_descriptor, %dimension_descriptor* %52, i32 0, i32 1 %62 = load i64, i64* %61, align 8 %63 = add i64 %62, %60 %64 = sub i64 %63, 1 %65 = sub i64 %64, %54 %66 = add i64 %65, 1 %67 = mul i64 1, %66 %68 = ptrtoint %array.1* %49 to i64 %69 = icmp eq i64 %68, 0 br i1 %69, label %merge_allocated, label %check_data check_data: ; preds = %.entry %70 = getelementptr %array.1, %array.1* %49, i32 0, i32 0 %71 = load double*, double** %70, align 8 %72 = ptrtoint double* %71 to i64 %73 = icmp ne i64 %72, 0 br label %merge_allocated merge_allocated: ; preds = %check_data, %.entry %is_allocated = phi i1 [ false, %.entry ], [ %73, %check_data ] %74 = xor i1 %is_allocated, true %75 = or i1 %58, %74 %76 = xor i1 %75, true br i1 %76, label %then, label %else15 then: ; preds = %merge_allocated %77 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %78 = ptrtoint %array.1* %77 to i64 %79 = icmp eq i64 %78, 0 br i1 %79, label %merge_allocated3, label %check_data2 check_data2: ; preds = %then %80 = getelementptr %array.1, %array.1* %77, i32 0, i32 0 %81 = load double*, double** %80, align 8 %82 = ptrtoint double* %81 to i64 %83 = icmp ne i64 %82, 0 br label %merge_allocated3 merge_allocated3: ; preds = %check_data2, %then %is_allocated4 = phi i1 [ false, %then ], [ %83, %check_data2 ] br i1 %is_allocated4, label %then5, label %else then5: ; preds = %merge_allocated3 %84 = getelementptr %array.1, %array.1* %77, i32 0, i32 0 %85 = load double*, double** %84, align 8 %86 = bitcast double* %85 to i8* call void @_lfortran_free_alloc(i8* %0, i8* %86) %87 = getelementptr %array.1, %array.1* %77, i32 0, i32 0 store double* null, double** %87, align 8 br label %ifcont else: ; preds = %merge_allocated3 br label %ifcont ifcont: ; preds = %else, %then5 %88 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %89 = ptrtoint %array.1* %88 to i64 %90 = icmp eq i64 %89, 0 br i1 %90, label %merge_allocated7, label %check_data6 check_data6: ; preds = %ifcont %91 = getelementptr %array.1, %array.1* %88, i32 0, i32 0 %92 = load double*, double** %91, align 8 %93 = ptrtoint double* %92 to i64 %94 = icmp ne i64 %93, 0 br label %merge_allocated7 merge_allocated7: ; preds = %check_data6, %ifcont %is_allocated8 = phi i1 [ false, %ifcont ], [ %94, %check_data6 ] br i1 %is_allocated8, label %then9, label %ifcont10 then9: ; preds = %merge_allocated7 %95 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %96 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %97 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %96, i32 0, i32 0 %98 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %97, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @1, i32 0, i32 0), i8** %98, align 8 %99 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %97, i32 0, i32 1 store i32 5, i32* %99, align 4 %100 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %97, i32 0, i32 2 store i32 8, i32* %100, align 4 %101 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %97, i32 0, i32 3 store i32 5, i32* %101, align 4 %102 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %97, i32 0, i32 4 store i32 14, i32* %102, align 4 %103 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @0, i32 0, i32 0)) %104 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %95, i32 0, i32 0 %105 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %96, i32 0, i32 0 %106 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %104, i32 0, i32 2 %107 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %104, i32 0, i32 0 store i1 true, i1* %107, align 1 %108 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %104, i32 0, i32 1 store i8* %103, i8** %108, align 8 store { i8*, i32, i32, i32, i32 }* %105, { i8*, i32, i32, i32, i32 }** %106, align 8 %109 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %104, i32 0, i32 3 store i32 1, i32* %109, align 4 %110 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %95, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %110, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @0, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont10: ; preds = %merge_allocated7 %111 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %112 = getelementptr %array.1, %array.1* %111, i32 0, i32 8 %113 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %112, i32 0, i32 0 %114 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %113, i32 0 %115 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %113, i32 0 %116 = getelementptr %dimension_descriptor, %dimension_descriptor* %115, i32 0, i32 1 %117 = load i64, i64* %116, align 8 %118 = icmp eq i64 %117, 0 %119 = getelementptr %dimension_descriptor, %dimension_descriptor* %114, i32 0, i32 0 %120 = load i64, i64* %119, align 8 %121 = getelementptr %dimension_descriptor, %dimension_descriptor* %114, i32 0, i32 1 %122 = load i64, i64* %121, align 8 %123 = add i64 %122, %120 %124 = sub i64 %123, 1 %125 = select i1 %118, i64 0, i64 %124 %126 = trunc i64 %125 to i32 %127 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %128 = getelementptr %array.1, %array.1* %127, i32 0, i32 7 store i64 0, i64* %128, align 8 %129 = getelementptr %array.1, %array.1* %127, i32 0, i32 3 store i8 1, i8* %129, align 1 %130 = getelementptr %array.1, %array.1* %127, i32 0, i32 8 %131 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %130, i32 0, i32 0 %132 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %131, i32 0 %133 = getelementptr %dimension_descriptor, %dimension_descriptor* %132, i32 0, i32 2 %134 = getelementptr %dimension_descriptor, %dimension_descriptor* %132, i32 0, i32 0 %135 = getelementptr %dimension_descriptor, %dimension_descriptor* %132, i32 0, i32 1 %136 = sext i32 %126 to i64 %137 = icmp slt i64 %136, 0 %138 = select i1 %137, i64 0, i64 %136 store i64 1, i64* %133, align 8 store i64 1, i64* %134, align 8 store i64 %138, i64* %135, align 8 %139 = mul i64 1, %138 %140 = getelementptr %array.1, %array.1* %127, i32 0, i32 0 %141 = mul i64 %139, 8 %142 = call i8* @_lfortran_get_default_allocator() %143 = call i8* @_lfortran_malloc_alloc(i8* %142, i64 %141) %144 = bitcast i8* %143 to double* store double* %144, double** %140, align 8 %145 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %146 = getelementptr %array.1, %array.1* %145, i32 0, i32 8 %147 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %146, i32 0, i32 0 %148 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %147, i32 0 %149 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %147, i32 0 %150 = getelementptr %dimension_descriptor, %dimension_descriptor* %149, i32 0, i32 1 %151 = load i64, i64* %150, align 8 %152 = icmp eq i64 %151, 0 %153 = getelementptr %dimension_descriptor, %dimension_descriptor* %148, i32 0, i32 0 %154 = load i64, i64* %153, align 8 %155 = getelementptr %dimension_descriptor, %dimension_descriptor* %148, i32 0, i32 1 %156 = load i64, i64* %155, align 8 %157 = add i64 %156, %154 %158 = sub i64 %157, 1 %159 = select i1 %152, i64 0, i64 %158 %160 = trunc i64 %159 to i32 store i32 %160, i32* %__do_loop_end, align 4 %161 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %162 = getelementptr %array.1, %array.1* %161, i32 0, i32 8 %163 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %162, i32 0, i32 0 %164 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %163, i32 0 %165 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %163, i32 0 %166 = getelementptr %dimension_descriptor, %dimension_descriptor* %165, i32 0, i32 1 %167 = load i64, i64* %166, align 8 %168 = icmp eq i64 %167, 0 %169 = getelementptr %dimension_descriptor, %dimension_descriptor* %164, i32 0, i32 0 %170 = load i64, i64* %169, align 8 %171 = select i1 %168, i64 1, i64 %170 %172 = trunc i64 %171 to i32 %173 = sub i32 %172, 1 store i32 %173, i32* %__lcompilers_i_0, align 4 br label %loop.head loop.head: ; preds = %ifcont14, %ifcont10 %174 = load i32, i32* %__lcompilers_i_0, align 4 %175 = add i32 %174, 1 %176 = load i32, i32* %__do_loop_end, align 4 %177 = icmp sle i32 %175, %176 br i1 %177, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %178 = load i32, i32* %__lcompilers_i_0, align 4 %179 = add i32 %178, 1 store i32 %179, i32* %__lcompilers_i_0, align 4 %180 = load i32, i32* %__lcompilers_i_0, align 4 %181 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %182 = getelementptr %array.1, %array.1* %181, i32 0, i32 8 %183 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %182, i32 0, i32 0 %184 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %183, i32 0 %185 = getelementptr %dimension_descriptor, %dimension_descriptor* %184, i32 0, i32 0 %186 = load i64, i64* %185, align 8 %187 = getelementptr %dimension_descriptor, %dimension_descriptor* %184, i32 0, i32 1 %188 = load i64, i64* %187, align 8 %189 = sext i32 %180 to i64 %190 = sub i64 %189, %186 %191 = add i64 %186, %188 %192 = sub i64 %191, 1 %193 = icmp slt i64 %189, %186 %194 = icmp sgt i64 %189, %192 %195 = or i1 %193, %194 br i1 %195, label %then11, label %ifcont12 then11: ; preds = %loop.body %196 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %197 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %198 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %197, i32 0, i32 0 %199 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %198, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @5, i32 0, i32 0), i8** %199, align 8 %200 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %198, i32 0, i32 1 store i32 5, i32* %200, align 4 %201 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %198, i32 0, i32 2 store i32 8, i32* %201, align 4 %202 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %198, i32 0, i32 3 store i32 5, i32* %202, align 4 %203 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %198, i32 0, i32 4 store i32 14, i32* %203, align 4 %204 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @6, i32 0, i32 0)) %205 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %196, i32 0, i32 0 %206 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %197, i32 0, i32 0 %207 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %205, i32 0, i32 2 %208 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %205, i32 0, i32 0 store i1 true, i1* %208, align 1 %209 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %205, i32 0, i32 1 store i8* %204, i8** %209, align 8 store { i8*, i32, i32, i32, i32 }* %206, { i8*, i32, i32, i32, i32 }** %207, align 8 %210 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %205, i32 0, i32 3 store i32 1, i32* %210, align 4 %211 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %196, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %211, i32 1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @4, i32 0, i32 0), i64 %189, i32 1, i64 %186, i64 %192) call void @exit(i32 1) unreachable ifcont12: ; preds = %loop.body %212 = getelementptr %dimension_descriptor, %dimension_descriptor* %184, i32 0, i32 2 %213 = load i64, i64* %212, align 8 %214 = mul i64 %213, %190 %215 = add i64 0, %214 %216 = getelementptr %array.1, %array.1* %181, i32 0, i32 7 %217 = load i64, i64* %216, align 8 %218 = add i64 %215, %217 %219 = getelementptr %array.1, %array.1* %181, i32 0, i32 0 %220 = load double*, double** %219, align 8 %221 = getelementptr inbounds double, double* %220, i64 %218 %222 = load i32, i32* %__lcompilers_i_0, align 4 %223 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %224 = getelementptr %array.1, %array.1* %223, i32 0, i32 8 %225 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %224, i32 0, i32 0 %226 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %225, i32 0 %227 = getelementptr %dimension_descriptor, %dimension_descriptor* %226, i32 0, i32 0 %228 = load i64, i64* %227, align 8 %229 = getelementptr %dimension_descriptor, %dimension_descriptor* %226, i32 0, i32 1 %230 = load i64, i64* %229, align 8 %231 = sext i32 %222 to i64 %232 = sub i64 %231, %228 %233 = add i64 %228, %230 %234 = sub i64 %233, 1 %235 = icmp slt i64 %231, %228 %236 = icmp sgt i64 %231, %234 %237 = or i1 %235, %236 br i1 %237, label %then13, label %ifcont14 then13: ; preds = %ifcont12 %238 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %239 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %240 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %239, i32 0, i32 0 %241 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %240, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @9, i32 0, i32 0), i8** %241, align 8 %242 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %240, i32 0, i32 1 store i32 5, i32* %242, align 4 %243 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %240, i32 0, i32 2 store i32 8, i32* %243, align 4 %244 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %240, i32 0, i32 3 store i32 5, i32* %244, align 4 %245 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %240, i32 0, i32 4 store i32 14, i32* %245, align 4 %246 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @10, i32 0, i32 0)) %247 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %238, i32 0, i32 0 %248 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %239, i32 0, i32 0 %249 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %247, i32 0, i32 2 %250 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %247, i32 0, i32 0 store i1 true, i1* %250, align 1 %251 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %247, i32 0, i32 1 store i8* %246, i8** %251, align 8 store { i8*, i32, i32, i32, i32 }* %248, { i8*, i32, i32, i32, i32 }** %249, align 8 %252 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %247, i32 0, i32 3 store i32 1, i32* %252, align 4 %253 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %238, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %253, i32 1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @8, i32 0, i32 0), i64 %231, i32 1, i64 %228, i64 %234) call void @exit(i32 1) unreachable ifcont14: ; preds = %ifcont12 %254 = getelementptr %dimension_descriptor, %dimension_descriptor* %226, i32 0, i32 2 %255 = load i64, i64* %254, align 8 %256 = mul i64 %255, %232 %257 = add i64 0, %256 %258 = getelementptr %array.1, %array.1* %223, i32 0, i32 7 %259 = load i64, i64* %258, align 8 %260 = add i64 %257, %259 %261 = getelementptr %array.1, %array.1* %223, i32 0, i32 0 %262 = load double*, double** %261, align 8 %263 = getelementptr inbounds double, double* %262, i64 %260 %264 = load double, double* %263, align 8 store double %264, double* %221, align 8 br label %loop.head loop.end: ; preds = %loop.head br label %ifcont20 else15: ; preds = %merge_allocated %265 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %266 = getelementptr %array.1, %array.1* %265, i32 0, i32 3 %267 = load i8, i8* %266, align 1 %268 = zext i8 %267 to i32 %269 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %270 = icmp eq %array.1* %269, null br i1 %270, label %then16, label %else18 then16: ; preds = %else15 %271 = bitcast %array.1* %arr_desc17 to i8* call void @llvm.memset.p0i8.i64(i8* %271, i8 0, i64 8, i1 false) %272 = getelementptr %array.1, %array.1* %arr_desc17, i32 0, i32 3 %273 = trunc i32 %268 to i8 store i8 %273, i8* %272, align 1 store %array.1* %arr_desc17, %array.1** %__libasr_created__subroutine_call_b1, align 8 br label %ifcont19 else18: ; preds = %else15 br label %ifcont19 ifcont19: ; preds = %else18, %then16 %274 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %275 = getelementptr %array.1, %array.1* %265, i32 0, i32 0 %276 = getelementptr %array.1, %array.1* %274, i32 0, i32 0 %277 = load double*, double** %275, align 8 store double* %277, double** %276, align 8 %278 = getelementptr %array.1, %array.1* %265, i32 0, i32 8 %279 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %278, i32 0, i32 0 %280 = getelementptr %array.1, %array.1* %274, i32 0, i32 8 %281 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %280, i32 0, i32 0 %282 = bitcast %dimension_descriptor* %281 to i8* %283 = bitcast %dimension_descriptor* %279 to i8* call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %282, i8* align 8 %283, i64 24, i1 false) %284 = getelementptr %array.1, %array.1* %274, i32 0, i32 3 %285 = trunc i32 %268 to i8 store i8 %285, i8* %284, align 1 %286 = getelementptr %array.1, %array.1* %265, i32 0, i32 7 %287 = load i64, i64* %286, align 8 %288 = getelementptr %array.1, %array.1* %274, i32 0, i32 7 store i64 %287, i64* %288, align 8 br label %ifcont20 ifcont20: ; preds = %ifcont19, %loop.end %289 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %290 = getelementptr %array.1, %array.1* %289, i32 0, i32 0 %291 = load double*, double** %290, align 8 %292 = getelementptr %array.1, %array.1* %289, i32 0, i32 7 %293 = load i64, i64* %292, align 8 %294 = getelementptr inbounds double, double* %291, i64 %293 call void @b(double* %294) %295 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %296 = getelementptr %array.1, %array.1* %295, i32 0, i32 8 %297 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %296, i32 0, i32 0 %298 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %297, i32 0 %299 = getelementptr %dimension_descriptor, %dimension_descriptor* %298, i32 0, i32 0 %300 = load i64, i64* %299, align 8 %301 = getelementptr %dimension_descriptor, %dimension_descriptor* %298, i32 0, i32 2 %302 = load i64, i64* %301, align 8 %303 = icmp eq i64 %302, 1 %304 = and i1 true, %303 %305 = getelementptr %dimension_descriptor, %dimension_descriptor* %298, i32 0, i32 0 %306 = load i64, i64* %305, align 8 %307 = getelementptr %dimension_descriptor, %dimension_descriptor* %298, i32 0, i32 1 %308 = load i64, i64* %307, align 8 %309 = add i64 %308, %306 %310 = sub i64 %309, 1 %311 = sub i64 %310, %300 %312 = add i64 %311, 1 %313 = mul i64 1, %312 %314 = ptrtoint %array.1* %295 to i64 %315 = icmp eq i64 %314, 0 br i1 %315, label %merge_allocated22, label %check_data21 check_data21: ; preds = %ifcont20 %316 = getelementptr %array.1, %array.1* %295, i32 0, i32 0 %317 = load double*, double** %316, align 8 %318 = ptrtoint double* %317 to i64 %319 = icmp ne i64 %318, 0 br label %merge_allocated22 merge_allocated22: ; preds = %check_data21, %ifcont20 %is_allocated23 = phi i1 [ false, %ifcont20 ], [ %319, %check_data21 ] %320 = xor i1 %is_allocated23, true %321 = or i1 %304, %320 %322 = xor i1 %321, true br i1 %322, label %then24, label %else32 then24: ; preds = %merge_allocated22 %323 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %324 = getelementptr %array.1, %array.1* %323, i32 0, i32 8 %325 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %324, i32 0, i32 0 %326 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %325, i32 0 %327 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %325, i32 0 %328 = getelementptr %dimension_descriptor, %dimension_descriptor* %327, i32 0, i32 1 %329 = load i64, i64* %328, align 8 %330 = icmp eq i64 %329, 0 %331 = getelementptr %dimension_descriptor, %dimension_descriptor* %326, i32 0, i32 0 %332 = load i64, i64* %331, align 8 %333 = getelementptr %dimension_descriptor, %dimension_descriptor* %326, i32 0, i32 1 %334 = load i64, i64* %333, align 8 %335 = add i64 %334, %332 %336 = sub i64 %335, 1 %337 = select i1 %330, i64 0, i64 %336 %338 = trunc i64 %337 to i32 store i32 %338, i32* %__do_loop_end1, align 4 %339 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %340 = getelementptr %array.1, %array.1* %339, i32 0, i32 8 %341 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %340, i32 0, i32 0 %342 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %341, i32 0 %343 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %341, i32 0 %344 = getelementptr %dimension_descriptor, %dimension_descriptor* %343, i32 0, i32 1 %345 = load i64, i64* %344, align 8 %346 = icmp eq i64 %345, 0 %347 = getelementptr %dimension_descriptor, %dimension_descriptor* %342, i32 0, i32 0 %348 = load i64, i64* %347, align 8 %349 = select i1 %346, i64 1, i64 %348 %350 = trunc i64 %349 to i32 %351 = sub i32 %350, 1 store i32 %351, i32* %__lcompilers_i_0, align 4 br label %loop.head25 loop.head25: ; preds = %ifcont30, %then24 %352 = load i32, i32* %__lcompilers_i_0, align 4 %353 = add i32 %352, 1 %354 = load i32, i32* %__do_loop_end1, align 4 %355 = icmp sle i32 %353, %354 br i1 %355, label %loop.body26, label %loop.end31 loop.body26: ; preds = %loop.head25 %356 = load i32, i32* %__lcompilers_i_0, align 4 %357 = add i32 %356, 1 store i32 %357, i32* %__lcompilers_i_0, align 4 %358 = load i32, i32* %__lcompilers_i_0, align 4 %359 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %360 = getelementptr %array.1, %array.1* %359, i32 0, i32 8 %361 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %360, i32 0, i32 0 %362 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %361, i32 0 %363 = getelementptr %dimension_descriptor, %dimension_descriptor* %362, i32 0, i32 0 %364 = load i64, i64* %363, align 8 %365 = getelementptr %dimension_descriptor, %dimension_descriptor* %362, i32 0, i32 1 %366 = load i64, i64* %365, align 8 %367 = sext i32 %358 to i64 %368 = sub i64 %367, %364 %369 = add i64 %364, %366 %370 = sub i64 %369, 1 %371 = icmp slt i64 %367, %364 %372 = icmp sgt i64 %367, %370 %373 = or i1 %371, %372 br i1 %373, label %then27, label %ifcont28 then27: ; preds = %loop.body26 %374 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %375 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %376 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %375, i32 0, i32 0 %377 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %376, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @13, i32 0, i32 0), i8** %377, align 8 %378 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %376, i32 0, i32 1 store i32 5, i32* %378, align 4 %379 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %376, i32 0, i32 2 store i32 8, i32* %379, align 4 %380 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %376, i32 0, i32 3 store i32 5, i32* %380, align 4 %381 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %376, i32 0, i32 4 store i32 14, i32* %381, align 4 %382 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @14, i32 0, i32 0)) %383 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %374, i32 0, i32 0 %384 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %375, i32 0, i32 0 %385 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %383, i32 0, i32 2 %386 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %383, i32 0, i32 0 store i1 true, i1* %386, align 1 %387 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %383, i32 0, i32 1 store i8* %382, i8** %387, align 8 store { i8*, i32, i32, i32, i32 }* %384, { i8*, i32, i32, i32, i32 }** %385, align 8 %388 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %383, i32 0, i32 3 store i32 1, i32* %388, align 4 %389 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %374, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %389, i32 1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @12, i32 0, i32 0), i64 %367, i32 1, i64 %364, i64 %370) call void @exit(i32 1) unreachable ifcont28: ; preds = %loop.body26 %390 = getelementptr %dimension_descriptor, %dimension_descriptor* %362, i32 0, i32 2 %391 = load i64, i64* %390, align 8 %392 = mul i64 %391, %368 %393 = add i64 0, %392 %394 = getelementptr %array.1, %array.1* %359, i32 0, i32 7 %395 = load i64, i64* %394, align 8 %396 = add i64 %393, %395 %397 = getelementptr %array.1, %array.1* %359, i32 0, i32 0 %398 = load double*, double** %397, align 8 %399 = getelementptr inbounds double, double* %398, i64 %396 %400 = load i32, i32* %__lcompilers_i_0, align 4 %401 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %402 = getelementptr %array.1, %array.1* %401, i32 0, i32 8 %403 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %402, i32 0, i32 0 %404 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %403, i32 0 %405 = getelementptr %dimension_descriptor, %dimension_descriptor* %404, i32 0, i32 0 %406 = load i64, i64* %405, align 8 %407 = getelementptr %dimension_descriptor, %dimension_descriptor* %404, i32 0, i32 1 %408 = load i64, i64* %407, align 8 %409 = sext i32 %400 to i64 %410 = sub i64 %409, %406 %411 = add i64 %406, %408 %412 = sub i64 %411, 1 %413 = icmp slt i64 %409, %406 %414 = icmp sgt i64 %409, %412 %415 = or i1 %413, %414 br i1 %415, label %then29, label %ifcont30 then29: ; preds = %ifcont28 %416 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %417 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %418 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %417, i32 0, i32 0 %419 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %418, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @17, i32 0, i32 0), i8** %419, align 8 %420 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %418, i32 0, i32 1 store i32 5, i32* %420, align 4 %421 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %418, i32 0, i32 2 store i32 8, i32* %421, align 4 %422 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %418, i32 0, i32 3 store i32 5, i32* %422, align 4 %423 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %418, i32 0, i32 4 store i32 14, i32* %423, align 4 %424 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @18, i32 0, i32 0)) %425 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %416, i32 0, i32 0 %426 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %417, i32 0, i32 0 %427 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %425, i32 0, i32 2 %428 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %425, i32 0, i32 0 store i1 true, i1* %428, align 1 %429 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %425, i32 0, i32 1 store i8* %424, i8** %429, align 8 store { i8*, i32, i32, i32, i32 }* %426, { i8*, i32, i32, i32, i32 }** %427, align 8 %430 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %425, i32 0, i32 3 store i32 1, i32* %430, align 4 %431 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %416, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %431, i32 1, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @16, i32 0, i32 0), i64 %409, i32 1, i64 %406, i64 %412) call void @exit(i32 1) unreachable ifcont30: ; preds = %ifcont28 %432 = getelementptr %dimension_descriptor, %dimension_descriptor* %404, i32 0, i32 2 %433 = load i64, i64* %432, align 8 %434 = mul i64 %433, %410 %435 = add i64 0, %434 %436 = getelementptr %array.1, %array.1* %401, i32 0, i32 7 %437 = load i64, i64* %436, align 8 %438 = add i64 %435, %437 %439 = getelementptr %array.1, %array.1* %401, i32 0, i32 0 %440 = load double*, double** %439, align 8 %441 = getelementptr inbounds double, double* %440, i64 %438 %442 = load double, double* %441, align 8 store double %442, double* %399, align 8 br label %loop.head25 loop.end31: ; preds = %loop.head25 br label %ifcont33 else32: ; preds = %merge_allocated22 br label %ifcont33 ifcont33: ; preds = %else32, %loop.end31 %443 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b, align 8 %444 = getelementptr %array.1, %array.1* %443, i32 0, i32 8 %445 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %444, i32 0, i32 0 %446 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %445, i32 0 %447 = getelementptr %dimension_descriptor, %dimension_descriptor* %446, i32 0, i32 0 %448 = load i64, i64* %447, align 8 %449 = getelementptr %dimension_descriptor, %dimension_descriptor* %446, i32 0, i32 2 %450 = load i64, i64* %449, align 8 %451 = icmp eq i64 %450, 1 %452 = and i1 true, %451 %453 = getelementptr %dimension_descriptor, %dimension_descriptor* %446, i32 0, i32 0 %454 = load i64, i64* %453, align 8 %455 = getelementptr %dimension_descriptor, %dimension_descriptor* %446, i32 0, i32 1 %456 = load i64, i64* %455, align 8 %457 = add i64 %456, %454 %458 = sub i64 %457, 1 %459 = sub i64 %458, %448 %460 = add i64 %459, 1 %461 = mul i64 1, %460 %462 = ptrtoint %array.1* %443 to i64 %463 = icmp eq i64 %462, 0 br i1 %463, label %merge_allocated35, label %check_data34 check_data34: ; preds = %ifcont33 %464 = getelementptr %array.1, %array.1* %443, i32 0, i32 0 %465 = load double*, double** %464, align 8 %466 = ptrtoint double* %465 to i64 %467 = icmp ne i64 %466, 0 br label %merge_allocated35 merge_allocated35: ; preds = %check_data34, %ifcont33 %is_allocated36 = phi i1 [ false, %ifcont33 ], [ %467, %check_data34 ] %468 = xor i1 %is_allocated36, true %469 = or i1 %452, %468 br i1 %469, label %then37, label %else38 then37: ; preds = %merge_allocated35 %470 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %471 = getelementptr %array.1, %array.1* %470, i32 0, i32 0 store double* null, double** %471, align 8 br label %ifcont45 else38: ; preds = %merge_allocated35 %472 = load %array.1*, %array.1** %__libasr_created__subroutine_call_b1, align 8 %473 = ptrtoint %array.1* %472 to i64 %474 = icmp eq i64 %473, 0 br i1 %474, label %merge_allocated40, label %check_data39 check_data39: ; preds = %else38 %475 = getelementptr %array.1, %array.1* %472, i32 0, i32 0 %476 = load double*, double** %475, align 8 %477 = ptrtoint double* %476 to i64 %478 = icmp ne i64 %477, 0 br label %merge_allocated40 merge_allocated40: ; preds = %check_data39, %else38 %is_allocated41 = phi i1 [ false, %else38 ], [ %478, %check_data39 ] br i1 %is_allocated41, label %then42, label %else43 then42: ; preds = %merge_allocated40 %479 = getelementptr %array.1, %array.1* %472, i32 0, i32 0 %480 = load double*, double** %479, align 8 %481 = bitcast double* %480 to i8* call void @_lfortran_free_alloc(i8* %0, i8* %481) %482 = getelementptr %array.1, %array.1* %472, i32 0, i32 0 store double* null, double** %482, align 8 br label %ifcont44 else43: ; preds = %merge_allocated40 br label %ifcont44 ifcont44: ; preds = %else43, %then42 br label %ifcont45 ifcont45: ; preds = %ifcont44, %then37 br label %return unreachable_after_return: ; No predecessors! br label %return return: ; preds = %unreachable_after_return, %ifcont45 br label %FINALIZE_SYMTABLE_a FINALIZE_SYMTABLE_a: ; preds = %return ret void } define void @b(double* %con) { .entry: %0 = getelementptr inbounds double, double* %con, i64 3 store double -4.830000e+00, double* %0, align 8 %1 = getelementptr inbounds double, double* %con, i64 2 store double 3.140000e+00, double* %1, align 8 br label %return unreachable_after_return: ; No predecessors! br label %return return: ; preds = %unreachable_after_return, %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return ret void } declare void @_lfortran_free_alloc(i8*, i8*) declare i8* @_lfortran_get_default_allocator() declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare i8* @_lfortran_malloc_alloc(i8*, i64) ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #0 ; Function Attrs: argmemonly nounwind willreturn declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %array_bound1 = alloca i32, align 4 %array_bound = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__do_loop_end = alloca i32, align 4 %__libasr_index_0_ = alloca i32, align 4 %w = alloca [5 x double], align 8 br i1 true, label %then, label %else then: ; preds = %.entry store i32 5, i32* %array_bound, align 4 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %3 = load i32, i32* %array_bound, align 4 store i32 %3, i32* %__do_loop_end, align 4 br i1 true, label %then2, label %else3 then2: ; preds = %ifcont store i32 1, i32* %array_bound1, align 4 br label %ifcont4 else3: ; preds = %ifcont br label %ifcont4 ifcont4: ; preds = %else3, %then2 %4 = load i32, i32* %array_bound1, align 4 %5 = sub i32 %4, 1 store i32 %5, i32* %__libasr_index_0_, align 4 br label %loop.head loop.head: ; preds = %ifcont6, %ifcont4 %6 = load i32, i32* %__libasr_index_0_, align 4 %7 = add i32 %6, 1 %8 = load i32, i32* %__do_loop_end, align 4 %9 = icmp sle i32 %7, %8 br i1 %9, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %10 = load i32, i32* %__libasr_index_0_, align 4 %11 = add i32 %10, 1 store i32 %11, i32* %__libasr_index_0_, align 4 %12 = load i32, i32* %__libasr_index_0_, align 4 %13 = sext i32 %12 to i64 %14 = sub i64 %13, 1 %15 = mul i64 1, %14 %16 = add i64 0, %15 %17 = icmp slt i64 %13, 1 %18 = icmp sgt i64 %13, 5 %19 = or i1 %17, %18 br i1 %19, label %then5, label %ifcont6 then5: ; preds = %loop.body %20 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %21 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %22 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %21, i32 0, i32 0 %23 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %22, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @21, i32 0, i32 0), i8** %23, align 8 %24 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %22, i32 0, i32 1 store i32 18, i32* %24, align 4 %25 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %22, i32 0, i32 2 store i32 1, i32* %25, align 4 %26 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %22, i32 0, i32 3 store i32 18, i32* %26, align 4 %27 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %22, i32 0, i32 4 store i32 1, i32* %27, align 4 %28 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @22, i32 0, i32 0)) %29 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %20, i32 0, i32 0 %30 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %21, i32 0, i32 0 %31 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %29, i32 0, i32 2 %32 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %29, i32 0, i32 0 store i1 true, i1* %32, align 1 %33 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %29, i32 0, i32 1 store i8* %28, i8** %33, align 8 store { i8*, i32, i32, i32, i32 }* %30, { i8*, i32, i32, i32, i32 }** %31, align 8 %34 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %29, i32 0, i32 3 store i32 1, i32* %34, align 4 %35 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %20, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %35, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0), i64 %13, i32 1, i64 1, i64 5) call void @exit(i32 1) unreachable ifcont6: ; preds = %loop.body %36 = getelementptr [5 x double], [5 x double]* %w, i32 0, i64 %16 store double 1.390000e+00, double* %36, align 8 br label %loop.head loop.end: ; preds = %loop.head br i1 false, label %then7, label %ifcont8 then7: ; preds = %loop.end %37 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %38 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %39 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %38, i32 0, i32 0 %40 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @25, i32 0, i32 0), i8** %40, align 8 %41 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 1 store i32 19, i32* %41, align 4 %42 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 2 store i32 8, i32* %42, align 4 %43 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 3 store i32 19, i32* %43, align 4 %44 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %39, i32 0, i32 4 store i32 8, i32* %44, align 4 %45 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @26, i32 0, i32 0)) %46 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %37, i32 0, i32 0 %47 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %38, i32 0, i32 0 %48 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 2 %49 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 0 store i1 true, i1* %49, align 1 %50 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 1 store i8* %45, i8** %50, align 8 store { i8*, i32, i32, i32, i32 }* %47, { i8*, i32, i32, i32, i32 }** %48, align 8 %51 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %46, i32 0, i32 3 store i32 1, i32* %51, align 4 %52 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %37, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %52, i32 1, i8* getelementptr inbounds ([143 x i8], [143 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @24, i32 0, i32 0), i32 5, i32 1, i32 1, i32 5) call void @exit(i32 1) unreachable ifcont8: ; preds = %loop.end %53 = getelementptr [5 x double], [5 x double]* %w, i32 0, i32 0 call void @a(double* %53) %54 = alloca i64, align 8 %55 = getelementptr [5 x double], [5 x double]* %w, i32 0, i32 0 %56 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @serialization_info, i32 0, i32 0), i64* %54, i32 1, i32 0, i32 0, i32 0, i32 0, i64 5, double* %55) %57 = load i64, i64* %54, align 8 %58 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %56, i8** %58, align 8 %59 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %57, i64* %59, align 8 %60 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %61 = load i8*, i8** %60, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %63 = load i64, i64* %62, align 8 %64 = trunc i64 %63 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @29, i32 0, i32 0), i8* %61, i32 %64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0), i32 1) %65 = icmp eq i8* %56, null br i1 %65, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont8 call void @_lfortran_free_alloc(i8* %2, i8* %56) br label %free_done free_done: ; preds = %free_nonnull, %ifcont8 br i1 false, label %then9, label %ifcont10 then9: ; preds = %free_done %66 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %67 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %68 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %67, i32 0, i32 0 %69 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %68, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @31, i32 0, i32 0), i8** %69, align 8 %70 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %68, i32 0, i32 1 store i32 21, i32* %70, align 4 %71 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %68, i32 0, i32 2 store i32 9, i32* %71, align 4 %72 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %68, i32 0, i32 3 store i32 21, i32* %72, align 4 %73 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %68, i32 0, i32 4 store i32 12, i32* %73, align 4 %74 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @32, i32 0, i32 0)) %75 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %66, i32 0, i32 0 %76 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %67, i32 0, i32 0 %77 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %75, i32 0, i32 2 %78 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %75, i32 0, i32 0 store i1 true, i1* %78, align 1 %79 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %75, i32 0, i32 1 store i8* %74, i8** %79, align 8 store { i8*, i32, i32, i32, i32 }* %76, { i8*, i32, i32, i32, i32 }** %77, align 8 %80 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %75, i32 0, i32 3 store i32 1, i32* %80, align 4 %81 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %66, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %81, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @30, i32 0, i32 0), i64 5, i32 1, i64 1, i64 5) call void @exit(i32 1) unreachable ifcont10: ; preds = %free_done %82 = getelementptr [5 x double], [5 x double]* %w, i32 0, i64 4 %83 = load double, double* %82, align 8 %84 = fsub double %83, -4.830000e+00 %85 = call double @llvm.fabs.f64(double %84) %86 = fcmp ogt double %85, 1.000000e-08 br i1 %86, label %then11, label %else12 then11: ; preds = %ifcont10 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @35, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @34, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont13 else12: ; preds = %ifcont10 br label %ifcont13 ifcont13: ; preds = %else12, %then11 br i1 false, label %then14, label %ifcont15 then14: ; preds = %ifcont13 %87 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %88 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %89 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %88, i32 0, i32 0 %90 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %89, i32 0, i32 0 store i8* getelementptr inbounds ([56 x i8], [56 x i8]* @37, i32 0, i32 0), i8** %90, align 8 %91 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %89, i32 0, i32 1 store i32 22, i32* %91, align 4 %92 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %89, i32 0, i32 2 store i32 9, i32* %92, align 4 %93 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %89, i32 0, i32 3 store i32 22, i32* %93, align 4 %94 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %89, i32 0, i32 4 store i32 12, i32* %94, align 4 %95 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @38, i32 0, i32 0)) %96 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %87, i32 0, i32 0 %97 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %88, i32 0, i32 0 %98 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %96, i32 0, i32 2 %99 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %96, i32 0, i32 0 store i1 true, i1* %99, align 1 %100 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %96, i32 0, i32 1 store i8* %95, i8** %100, align 8 store { i8*, i32, i32, i32, i32 }* %97, { i8*, i32, i32, i32, i32 }** %98, align 8 %101 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %96, i32 0, i32 3 store i32 1, i32* %101, align 4 %102 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %87, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %102, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @39, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @36, i32 0, i32 0), i64 4, i32 1, i64 1, i64 5) call void @exit(i32 1) unreachable ifcont15: ; preds = %ifcont13 %103 = getelementptr [5 x double], [5 x double]* %w, i32 0, i64 3 %104 = load double, double* %103, align 8 %105 = fsub double %104, 3.140000e+00 %106 = call double @llvm.fabs.f64(double %105) %107 = fcmp ogt double %106, 1.000000e-10 br i1 %107, label %then16, label %else17 then16: ; preds = %ifcont15 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @41, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @40, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont18 else17: ; preds = %ifcont15 br label %ifcont18 ifcont18: ; preds = %else17, %then16 br label %return return: ; preds = %ifcont18 br label %FINALIZE_SYMTABLE_legacy_array_sections_01 FINALIZE_SYMTABLE_legacy_array_sections_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) ; Function Attrs: nounwind readnone speculatable willreturn declare double @llvm.fabs.f64(double) #2 declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() attributes #0 = { argmemonly nounwind willreturn writeonly } attributes #1 = { argmemonly nounwind willreturn } attributes #2 = { nounwind readnone speculatable willreturn } lfortran-0.64.0/tests/reference/asr-arrays_01_real-6cb0873.json0000664000175000017500000000076415227365530024207 0ustar alastairalastair{ "basename": "asr-arrays_01_real-6cb0873", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_real.f90", "infile_hash": "52d4b470c5523650dead5fa570d62db7293b9ecd23758e3cc4ba28c2", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_01_real-6cb0873.stdout", "stdout_hash": "ae6da4c6d96f63dc04aa0f662562a8768f16538e13aefd15475d2c77", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-conv_complex2real-0c17eca.json0000664000175000017500000000077515227365530025156 0ustar alastairalastair{ "basename": "asr-conv_complex2real-0c17eca", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/conv_complex2real.f90", "infile_hash": "45bd43af8695005b07db0e167445c8230cda8e3201e8ce644bf187d2", "outfile": null, "outfile_hash": null, "stdout": "asr-conv_complex2real-0c17eca.stdout", "stdout_hash": "d230ec23ecf4970597b60a559a53f7d2cfe1a6e2302c6d35da528a12", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-if_05-2102585.json0000664000175000017500000000072215227365530022450 0ustar alastairalastair{ "basename": "julia-if_05-2102585", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/if_05.f90", "infile_hash": "e17354307d88b9239319cbfd5ce6b117fd24e4aa2998deee3d8fe695", "outfile": null, "outfile_hash": null, "stdout": "julia-if_05-2102585.stdout", "stdout_hash": "151c316fb5a19a14af5cced2a16b9efd1a65d8c4742084a5fe56fd9e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-case_01-09dad75.json0000664000175000017500000000074215227365530023060 0ustar alastairalastair{ "basename": "llvm-case_01-09dad75", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/case_01.f90", "infile_hash": "003a23367180e7f228e7e4ef5a6dfdb6749801b29ccf2002e2559e41", "outfile": null, "outfile_hash": null, "stdout": "llvm-case_01-09dad75.stdout", "stdout_hash": "611707f103a6b5fa9c7976c067bf0ea70c20155407837ad317b428e0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/rename_symbol-collect_occurence3-3737d89.json0000664000175000017500000000100415227365530027130 0ustar alastairalastair{ "basename": "rename_symbol-collect_occurence3-3737d89", "cmd": "lfortran --rename-symbol --no-color {infile} -o {outfile}", "infile": "tests/collect_occurence3.f90", "infile_hash": "64f44de76cd08c4e21e4f8e05bb2747574f998c95bcdb8d474c8c449", "outfile": null, "outfile_hash": null, "stdout": "rename_symbol-collect_occurence3-3737d89.stdout", "stdout_hash": "b3cdfcbdc16ad191eb06741f5a164c0b42530c8417c91b08ba740c03", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_vector-140858c.stdout0000664000175000017500000033024015227365530025064 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_vector: (Program (SymbolTable 11 { main: (ExternalSymbol 11 main 2 main template_vector_m [] main Public ), vector_t: (ExternalSymbol 11 vector_t 2 vector_t template_vector_m [] vector_t Public ) }) template_vector [template_vector_m] [(SubroutineCall 11 main () [] () .false. )] ), template_vector_m: (Module (SymbolTable 2 { main: (Function (SymbolTable 7 { 1_intvector_elements: (ExternalSymbol 7 1_intvector_elements 8 elements intvector [] elements Public ), 1_intvector_push_back: (ExternalSymbol 7 1_intvector_push_back 8 push_back intvector [] push_back Public ), __asr_push_back: (Function (SymbolTable 9 { 1_intvector_elements: (ExternalSymbol 9 1_intvector_elements 8 elements intvector [] elements Public ), 1_intvector_resize: (ExternalSymbol 9 1_intvector_resize 8 resize intvector [] resize Public ), 1_intvector_sz: (ExternalSymbol 9 1_intvector_sz 8 sz intvector [] sz Public ), item: (Variable 9 item [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), new_size: (Variable 9 new_size [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 9 this [] In () () Default (StructType [] [] .false. .false. ) 7 intvector Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr_push_back (FunctionType [(StructType [] [] .false. .false. ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 this) (Var 9 item)] [(Assignment (Var 9 new_size) (IntegerBinOp (StructInstanceMember (Var 9 this) 9 1_intvector_sz (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 9 1_intvector_resize () [((Var 9 this)) ((Var 9 new_size))] (Var 9 this) .false. ) (Assignment (ArrayItem (StructInstanceMember (Var 9 this) 9 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [(() (Var 9 new_size) ())] (Integer 4) ColMajor () ) (Var 9 item) () .false. .false. ) (Assignment (StructInstanceMember (Var 9 this) 9 1_intvector_sz (Integer 4) () ) (Var 9 new_size) () .false. .false. )] () Private .true. .true. () ), __asr_resize: (Function (SymbolTable 10 { 1_intvector_elements: (ExternalSymbol 10 1_intvector_elements 8 elements intvector [] elements Public ), 1_intvector_sz: (ExternalSymbol 10 1_intvector_sz 8 sz intvector [] sz Public ), i: (Variable 10 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 10 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 10 this [] InOut () () Default (StructType [] [] .false. .false. ) 7 intvector Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 10 tmp [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr_resize (FunctionType [(StructType [] [] .false. .false. ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 this) (Var 10 n)] [(If () (LogicalNot (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 10 this) 10 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () )] 0 (Logical 4) () ) (Logical 4) () ) [(Allocate [((StructInstanceMember (Var 10 this) 10 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 10 n))] () () ())] () () () ) (Return)] [] ) (If () (IntegerCompare (StructInstanceMember (Var 10 this) 10 1_intvector_sz (Integer 4) () ) GtE (Var 10 n) (Logical 4) () ) [(Return)] [] ) (Allocate [((Var 10 tmp) [((IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 10 this) 10 1_intvector_sz (Integer 4) () ))] () () ())] () () () ) (DoLoop () ((Var 10 i) (IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 10 this) 10 1_intvector_sz (Integer 4) () ) ()) [(Assignment (ArrayItem (Var 10 tmp) [(() (Var 10 i) ())] (Integer 4) ColMajor () ) (ArrayItem (StructInstanceMember (Var 10 this) 10 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [(() (Var 10 i) ())] (Integer 4) ColMajor () ) () .false. .false. )] [] ) (Allocate [((StructInstanceMember (Var 10 this) 10 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 10 n))] () () ())] () () () ) (Assignment (ArraySection (StructInstanceMember (Var 10 this) 10 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 10 this) 10 1_intvector_sz (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal))] (Array (Integer 4) [(() ())] DescriptorArray ) () ) (Var 10 tmp) () .false. .false. )] () Private .true. .true. () ), intvector: (Struct (SymbolTable 8 { elements: (Variable 8 elements [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), push_back: (StructMethodDeclaration 8 push_back () __asr_push_back 7 __asr_push_back Source .false. .false. ), resize: (StructMethodDeclaration 8 resize () __asr_resize 7 __asr_resize Source .false. .false. ), sz: (Variable 8 sz [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intvector (StructType [] [] .true. .false. ) [] [elements sz] [] Source Private .false. .false. .false. [] () () [] ), v: (Variable 7 v [] Local () () Default (StructType [] [] .true. .false. ) 7 intvector Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(SubroutineCall 7 1_intvector_push_back () [((Var 7 v)) ((IntegerConstant 10 (Integer 4) Decimal))] (Var 7 v) .false. ) (If () (IntegerCompare (ArrayItem (StructInstanceMember (Var 7 v) 7 1_intvector_elements (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] () Public .true. .true. () ), vector_t: (Template (SymbolTable 3 { push_back: (Function (SymbolTable 5 { 1_vector_elements: (ExternalSymbol 5 1_vector_elements 4 elements vector [] elements Public ), 1_vector_resize: (ExternalSymbol 5 1_vector_resize 4 resize vector [] resize Public ), 1_vector_sz: (ExternalSymbol 5 1_vector_sz 4 sz vector [] sz Public ), item: (Variable 5 item [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), new_size: (Variable 5 new_size [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 5 this [] In () () Default (StructType [(Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) (Integer 4)] [] .false. .false. ) 3 vector Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) push_back (FunctionType [(StructType [(Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) (Integer 4)] [] .false. .false. ) (TypeParameter t )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 this) (Var 5 item)] [(Assignment (Var 5 new_size) (IntegerBinOp (StructInstanceMember (Var 5 this) 5 1_vector_sz (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 5 1_vector_resize () [((Var 5 this)) ((Var 5 new_size))] (Var 5 this) .false. ) (Assignment (ArrayItem (StructInstanceMember (Var 5 this) 5 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () ) [(() (Var 5 new_size) ())] (TypeParameter t ) ColMajor () ) (Var 5 item) () .false. .false. ) (Assignment (StructInstanceMember (Var 5 this) 5 1_vector_sz (Integer 4) () ) (Var 5 new_size) () .false. .false. )] () Private .true. .true. () ), resize: (Function (SymbolTable 6 { 1_vector_elements: (ExternalSymbol 6 1_vector_elements 4 elements vector [] elements Public ), 1_vector_sz: (ExternalSymbol 6 1_vector_sz 4 sz vector [] sz Public ), i: (Variable 6 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 6 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 6 this [] InOut () () Default (StructType [(Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) (Integer 4)] [] .false. .false. ) 3 vector Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 6 tmp [] Local () () Default (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) resize (FunctionType [(StructType [(Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) (Integer 4)] [] .false. .false. ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 this) (Var 6 n)] [(If () (LogicalNot (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 6 this) 6 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () )] 0 (Logical 4) () ) (Logical 4) () ) [(Allocate [((StructInstanceMember (Var 6 this) 6 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ())] () () () ) (Return)] [] ) (If () (IntegerCompare (StructInstanceMember (Var 6 this) 6 1_vector_sz (Integer 4) () ) GtE (Var 6 n) (Logical 4) () ) [(Return)] [] ) (Allocate [((Var 6 tmp) [((IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 6 this) 6 1_vector_sz (Integer 4) () ))] () () ())] () () () ) (DoLoop () ((Var 6 i) (IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 6 this) 6 1_vector_sz (Integer 4) () ) ()) [(Assignment (ArrayItem (Var 6 tmp) [(() (Var 6 i) ())] (TypeParameter t ) ColMajor () ) (ArrayItem (StructInstanceMember (Var 6 this) 6 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () ) [(() (Var 6 i) ())] (TypeParameter t ) ColMajor () ) () .false. .false. )] [] ) (Allocate [((StructInstanceMember (Var 6 this) 6 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 6 n))] () () ())] () () () ) (Assignment (ArraySection (StructInstanceMember (Var 6 this) 6 1_vector_elements (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () ) [((IntegerConstant 1 (Integer 4) Decimal) (StructInstanceMember (Var 6 this) 6 1_vector_sz (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal))] (Array (TypeParameter t ) [(() ())] DescriptorArray ) () ) (Var 6 tmp) () .false. .false. )] () Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), vector: (Struct (SymbolTable 4 { elements: (Variable 4 elements [] Local () () Default (Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), push_back: (StructMethodDeclaration 4 push_back () push_back 3 push_back Source .false. .false. ), resize: (StructMethodDeclaration 4 resize () resize 3 resize Source .false. .false. ), sz: (Variable 4 sz [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) vector (StructType [(Allocatable (Array (TypeParameter t ) [(() ())] DescriptorArray ) ) (Integer 4)] [] .true. .false. ) [] [elements sz] [] Source Private .false. .false. .false. [] () () [] ) }) vector_t [t] [] ) }) template_vector_m () [template_vector_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit_interface5-fbe2fe9.stdout0000664000175000017500000002520015227365530026111 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { implicit_interface5: (Function (SymbolTable 2 { a: (Variable 2 a [n] In () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [n] In () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), driver: (Function (SymbolTable 3 { driver_arg_0: (Variable 3 driver_arg_0 [] Unspecified () () Default (Array (Integer 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), driver_arg_1: (Variable 3 driver_arg_1 [] Unspecified () () Default (Array (Integer 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) driver (FunctionType [(Array (Integer 4) [(() ())] PointerArray ) (Array (Integer 4) [(() ())] PointerArray )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 driver_arg_0) (Var 3 driver_arg_1)] [] () Public .false. .false. () ), n: (Variable 2 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) implicit_interface5 (FunctionType [(Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 2 (Integer 4) () ))] PointerArray ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 2 (Integer 4) () ))] PointerArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 a) (Var 2 b) (Var 2 n)] [(SubroutineCall 2 driver () [((Var 2 a)) ((Var 2 b))] () .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/llvm-class_02-82c2f9c.json0000664000175000017500000000106515227365530023255 0ustar alastairalastair{ "basename": "llvm-class_02-82c2f9c", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/class_02.f90", "infile_hash": "d9600a16766ae051943b344e946afd7523b8f9d66250d6cd908135cc", "outfile": null, "outfile_hash": null, "stdout": "llvm-class_02-82c2f9c.stdout", "stdout_hash": "c42a69db27055df0a09471939b6d933a4b90a7820b109c07b8c7a50e", "stderr": "llvm-class_02-82c2f9c.stderr", "stderr_hash": "cbe4c6f9d712b9d5ee417de42e2ce3b69d43ea5a0b463256ad71acfe", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-loop_test1-716ccb0.stdout0000664000175000017500000001667415227365530024125 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { do330i: (Variable 2 do330i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), kp: (Variable 2 kp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Assignment (Var 2 kp) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 kp) ()) [(DoLoop () ((Var 2 j) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Var 2 kp) ()) [(If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Gt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(Print (StringFormat () [(Var 2 i) (Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [(Print (StringFormat () [(Var 2 j) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) (GoToTarget 320 320 )] [] ) (GoToTarget 330 330 )] [] ) (Assignment (Var 2 do330i) (IntegerConstant 15 (Integer 4) Decimal) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-select_type1-767380c.json0000664000175000017500000000074415227365530024407 0ustar alastairalastair{ "basename": "ast_f90-select_type1-767380c", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/select_type1.f90", "infile_hash": "0484f169388676238c1bdf4ae9e9041b66ca05da7dc95a32c57a6003", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-select_type1-767380c.stdout", "stdout_hash": "7a06481b29b61eb38f12a018d320bf35f47ff7cf3624a9b23b1f2bdf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-close1-d682580.json0000664000175000017500000000070715227365530022514 0ustar alastairalastair{ "basename": "ast-close1-d682580", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/close1.f90", "infile_hash": "b6174b7e66a7b9dea6c59e0e40b1786dc0721bf2b248b292f3576c9c", "outfile": null, "outfile_hash": null, "stdout": "ast-close1-d682580.stdout", "stdout_hash": "df91f2f167a94a06284e0716e9ffb3c54cbc28b3ca4059cfb59ecbcf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit11-95f56fd.stderr0000664000175000017500000000053715227365530024003 0ustar alastairalastairstyle suggestion: Use complex(8) instead of complex*16 --> tests/implicit11.f90:2:17 | 2 | implicit complex*16 (z,i) | ^ help: write this as 'complex(8)' style suggestion: Use complex(8) instead of complex*16 --> tests/implicit11.f90:8:17 | 8 | implicit complex*16 (z,i) | ^ help: write this as 'complex(8)' lfortran-0.64.0/tests/reference/llvm-program1-29eca93.stdout0000664000175000017500000001044015227365530023744 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 store i32 5, i32* %i, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry %14 = alloca i64, align 8 %15 = load i32, i32* %i, align 4 %16 = add i32 %15, 1 %17 = alloca i32, align 4 store i32 %16, i32* %17, align 4 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %14, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %17) %19 = load i64, i64* %14, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %18) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_program1 FINALIZE_SYMTABLE_program1: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast-assign_to1-09e061a.json0000664000175000017500000000075015227365530023440 0ustar alastairalastair{ "basename": "ast-assign_to1-09e061a", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/assign_to1.f90", "infile_hash": "a8a83c753ee6f6e22b44441dbf0e5d8e7f180ca811bcbe45e810b869", "outfile": null, "outfile_hash": null, "stdout": "ast-assign_to1-09e061a.stdout", "stdout_hash": "28352d183ead36b8ad9ad210d30041867d24b98f61f5b89f0813f6ad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-matrix_matmul_03-a99cdd1.stderr0000664000175000017500000000033315227365530025254 0ustar alastairalastairsemantic error: The argument `matrix_b` in `matmul` must be of type Logical if first matrix is of Logical type --> tests/errors/matrix_matmul_03.f90:5:24 | 5 | print *, matmul(a, b) | ^ lfortran-0.64.0/tests/reference/ast-comments1-213c55a.json0000664000175000017500000000072015227365530023272 0ustar alastairalastair{ "basename": "ast-comments1-213c55a", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/comments1.f90", "infile_hash": "54490aafe8914e1e15517fbb3754ffa3d631fb2fd2241926a46aa79b", "outfile": null, "outfile_hash": null, "stdout": "ast-comments1-213c55a.stdout", "stdout_hash": "fcd83d753eb4d636130d6b1abe182f6aa5111fb30764419c1ad210e0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor5-fdb91a5.stdout0000664000175000017500000000473615227365530027176 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor5: (Program (SymbolTable 2 { }) preprocessor5 [] [(Print (StringFormat () [(IntegerConstant 1 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerConstant 12 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerConstant 3 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerConstant 6 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerConstant 15 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-parameter_01-746df62.stdout0000664000175000017500000000257415227365530024245 0ustar alastairalastair(TranslationUnit [(Program parameter_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (j [] [] () () None ()) (k [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrParameter )] [(i [] [] () 1 Equal ())] () ) (Declaration () [(SimpleAttribute AttrParameter )] [(j [] [] () 2 Equal ()) (k [] [] () 3 Equal ())] () )] [(Print 0 () [i j k] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-arrays_01-91893af.json0000664000175000017500000000075015227365530023374 0ustar alastairalastair{ "basename": "llvm-arrays_01-91893af", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01.f90", "infile_hash": "f7df4142feb383f836dfa072a60673922e8873b5695f893be8329b89", "outfile": null, "outfile_hash": null, "stdout": "llvm-arrays_01-91893af.stdout", "stdout_hash": "59f5874dafb34f289bf6e87b5d87aaa547e059d167903900e0b6edb2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope2-64078e2.json0000664000175000017500000000101415227365530026761 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope2-64078e2", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope2.f90", "infile_hash": "e511f118b9a040b5e7a3ff2ad75cd7942dee08d3a21bd4ca5cd668b3", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope2-64078e2.stdout", "stdout_hash": "ad64fc1c7d426fbe4446e13ee7602bd1854a51d760d66cc86239fbd7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_12-ff7ce44.stdout0000664000175000017500000001453215227365530024607 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_12: (Program (SymbolTable 2 { }) intrinsics_12 [] [(Print (StringFormat () [(TypeInquiry Kind (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Real 4) (RealConstant 0.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Real 4) (RealConstant 5.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Real 8) (RealConstant 5.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Kind (Logical 4) (LogicalConstant .true. (Logical 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-recursion_02-20a7daf.stdout0000664000175000017500000010250015227365530024405 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 7 { r: (Variable 7 r [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), solver: (ExternalSymbol 7 solver 2 solver recursion_02 [] solver Public ), sub1: (ExternalSymbol 7 sub1 2 sub1 recursion_02 [] sub1 Public ) }) main [recursion_02] [(Assignment (Var 7 r) (FunctionCall 7 sub1 () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 3 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "r =" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 7 r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), recursion_02: (Module (SymbolTable 2 { solver: (Function (SymbolTable 3 { f: (Function (SymbolTable 4 { f: (Variable 4 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 4 f) Public .false. .false. () ), f_val: (Variable 3 f_val [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iter: (Variable 3 iter [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), solver: (Variable 3 solver [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solver (FunctionType [(FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [sub1] [(Var 3 f) (Var 3 iter)] [(Assignment (Var 3 f_val) (FunctionCall 3 f () [] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "before:" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 3 f_val)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 3 solver) (FunctionCall 2 sub1 () [((IntegerConstant 2 (Integer 4) Decimal)) ((IntegerBinOp (Var 3 iter) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 3 f_val) (FunctionCall 3 f () [] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "after:" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 3 f_val)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] (Var 3 solver) Public .false. .false. () ), sub1: (Function (SymbolTable 5 { getx: (Function (SymbolTable 6 { getx: (Variable 6 getx [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) getx (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(StringConstant "x in getx" (String 1 (IntegerConstant 9 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 6 getx) (Var 5 x) () .false. .false. )] (Var 6 getx) Public .false. .false. () ), iter: (Variable 5 iter [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sub1: (Variable 5 sub1 [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 5 tmp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub1 (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solver] [(Var 5 y) (Var 5 iter)] [(Assignment (Var 5 x) (Var 5 y) () .false. .false. ) (Print (StringConstant "in sub1" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (If () (IntegerCompare (Var 5 iter) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 5 sub1) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Return)] [] ) (Assignment (Var 5 tmp) (FunctionCall 5 getx () [] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 5 sub1) (FunctionCall 2 solver () [((Var 5 getx)) ((Var 5 iter))] (Integer 4) () () ) () .false. .false. )] (Var 5 sub1) Public .false. .false. () ) }) recursion_02 () [recursion_02] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_11-13a7587.stdout0000664000175000017500000000645415227365530024367 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_11: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [x] Local (IntrinsicElementalFunction Real [(Var 2 x)] 0 (Real 4) (RealConstant 3.000000 (Real 4) ) ) (RealConstant 3.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_11 [] [(Print (StringFormat () [(Var 2 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-save1-7ce7ccf.stderr0000664000175000017500000000173115227365530023174 0ustar alastairalastairwarning: Assuming implicit save attribute for variable declaration --> tests/save1.f90:2:13 | 2 | real :: x = 5, z | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement warning: Assuming implicit save attribute for variable declaration --> tests/save1.f90:8:13 | 8 | real :: x = 5, z | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement warning: Assuming implicit save attribute for variable declaration --> tests/save1.f90:20:17 | 20 | real :: x = 5, z | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement warning: Assuming implicit save attribute for variable declaration --> tests/save1.f90:26:17 | 26 | real :: x = 5, z | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement lfortran-0.64.0/tests/reference/asr-kind_string_of_int-ed0ec70.json0000664000175000017500000000076215227365530025405 0ustar alastairalastair{ "basename": "asr-kind_string_of_int-ed0ec70", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kind_string_of_int.f90", "infile_hash": "89b2b88221d506d791bc4b592e7d73c1c2eebad1b47a0bcd8a388ba0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-kind_string_of_int-ed0ec70.stderr", "stderr_hash": "e7ad0c7055b862d2b628dbd827b39cac77dd6f3ef39025b02ff6a5fc", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_array_op-arrays_op_10-be689f7.stdout0000664000175000017500000004171215227365530026424 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { compare_solutions: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compare_solutions (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solution] [] [(Print (StringFormat () [(ArraySize (FunctionCall 2 solution () [] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () () ) () (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionCall 2 solution () [] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () () ) () (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) ) ()) [(Assignment (ArrayItem (Var 3 x) [(() (Var 3 i) ())] (Real 4) ColMajor () ) (Cast (Var 3 i) IntegerToReal (Real 4) () () ) () .false. .false. )] [] ) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(Print (StringFormat () [(ArrayItem (Var 3 x) [(() (Var 3 i) ())] (Real 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (ArrayItem (Var 3 x) [(() (Var 3 i) ())] (Real 4) ColMajor () ) NotEq (Cast (Var 3 i) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] )] [] )] () Public .false. .false. () ), solution: (Function (SymbolTable 4 { x: (Variable 4 x [] ReturnVar () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solution (FunctionType [] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (ArrayItem (Var 4 x) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (Assignment (ArrayItem (Var 4 x) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. )] (Var 4 x) Public .true. .true. () ) }) main [] [(SubroutineCall 2 compare_solutions () [] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor9-641e112.stdout0000664000175000017500000001253715227365530026750 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor9: (Program (SymbolTable 2 { }) preprocessor9 [] [(Print (StringFormat () [(IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 6 (Integer 4) Decimal) ) Add (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 15 (Integer 4) Decimal) ) Add (IntegerConstant 6 (Integer 4) Decimal) (Integer 4) (IntegerConstant 21 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 6 (Integer 4) Decimal) ) Add (IntegerBinOp (IntegerConstant 4 (Integer 4) Decimal) Mul (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (Integer 4) (IntegerConstant 12 (Integer 4) Decimal) ) (Integer 4) (IntegerConstant 18 (Integer 4) Decimal) ) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 23 (Integer 4) Decimal) ) Add (IntegerConstant 6 (Integer 4) Decimal) (Integer 4) (IntegerConstant 29 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/julia-doloop_02-13efa8f.stdout0000664000175000017500000000126015227365530024221 0ustar alastairalastairfunction main() local a::Int32 local b::Int32 local i::Int32 local j::Int32 j = 0 a = 1 b = 10 for i ∈ a:b j = j + i end if j ≠ 55 println(Base.stderr, "ERROR STOP") exit(1) end println(j) a = 0 for i ∈ 1:10 for j ∈ 1:10 a = a + (i - 1) * 10 + j end end if a ≠ 100 * 101 ÷ 2 println(Base.stderr, "ERROR STOP") exit(1) end println(a) a = 0 for i ∈ 1:10 for j ∈ 1:i a = a + j end end if a ≠ 220 println(Base.stderr, "ERROR STOP") exit(1) end println(a) end main() lfortran-0.64.0/tests/reference/asr-template_lapack_01-0d30f43.stdout0000664000175000017500000143450015227365530025371 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_lapack_01: (Program (SymbolTable 23 { cast_r: (ExternalSymbol 23 cast_r 2 cast_r template_lapack_01_m [] cast_r Public ), external_matmul_t: (ExternalSymbol 23 external_matmul_t 2 external_matmul_t template_lapack_01_m [] external_matmul_t Public ), gemm_r: (ExternalSymbol 23 gemm_r 2 gemm_r template_lapack_01_m [] gemm_r Public ), simple_external_matmul: (ExternalSymbol 23 simple_external_matmul 2 simple_external_matmul template_lapack_01_m [] simple_external_matmul Public ), test_template: (ExternalSymbol 23 test_template 2 test_template template_lapack_01_m [] test_template Public ) }) template_lapack_01 [template_lapack_01_m] [(SubroutineCall 23 test_template () [] () .false. )] ), template_lapack_01_m: (Module (SymbolTable 2 { cast_r: (Requirement (SymbolTable 5 { cast: (Function (SymbolTable 6 { arg: (Variable 6 arg [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 6 res [] ReturnVar () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast (FunctionType [(TypeParameter t )] (TypeParameter u ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 6 arg)] [] (Var 6 res) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 5 u [] In () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_r [t u cast] [] ), external_matmul_t: (Template (SymbolTable 7 { cast_to_t: (Function (SymbolTable 9 { arg: (Variable 9 arg [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 9 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_to_t (FunctionType [(Real 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 9 arg)] [] (Var 9 res) Private .true. .true. () ), gemm: (Function (SymbolTable 8 { a: (Variable 8 a [lda] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 8 lda)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), alpha: (Variable 8 alpha [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 8 b [ldb] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 8 ldb)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), beta: (Variable 8 beta [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 8 c [ldc] Out () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 8 ldc)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 8 k [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lda: (Variable 8 lda [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldb: (Variable 8 ldb [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldc: (Variable 8 ldc [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 8 m [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 8 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transa: (Variable 8 transa [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transb: (Variable 8 transb [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gemm (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 7 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 9 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 12 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 8 transa) (Var 8 transb) (Var 8 m) (Var 8 n) (Var 8 k) (Var 8 alpha) (Var 8 a) (Var 8 lda) (Var 8 b) (Var 8 ldb) (Var 8 beta) (Var 8 c) (Var 8 ldc)] [] () Private .true. .true. () ), nonsimple_external_matmul: (Function (SymbolTable 10 { a: (Variable 10 a [] In () () Default (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 10 b [] In () () Default (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 10 c [a b] ReturnVar () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 10 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 10 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 10 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 10 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 10 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nonsimple_external_matmul (FunctionType [(Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray )] (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [cast_to_t gemm] [(Var 10 a) (Var 10 b)] [(Assignment (Var 10 m) (ArraySize (Var 10 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 10 n) (ArraySize (Var 10 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 10 k) (ArraySize (Var 10 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 7 gemm () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 10 m)) ((Var 10 n)) ((Var 10 k)) ((FunctionCall 7 cast_to_t () [((RealConstant 1.000000 (Real 4) ))] (TypeParameter t ) () () )) ((ArrayPhysicalCast (Var 10 a) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () )) ((Var 10 m)) ((ArrayPhysicalCast (Var 10 b) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () )) ((Var 10 k)) ((FunctionCall 7 cast_to_t () [((RealConstant 0.000000 (Real 4) ))] (TypeParameter t ) () () )) ((ArrayPhysicalCast (Var 10 c) PointerArray DescriptorArray (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 10 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 10 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] DescriptorArray ) () )) ((Var 10 m))] () .false. )] (Var 10 c) Private .true. .true. () ), real: (Variable 7 real [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 7 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) external_matmul_t [t gemm cast_to_t] [(Require gemm_r [t gemm] ) (Require cast_r [real t cast_to_t] )] ), gemm_r: (Requirement (SymbolTable 3 { gemm: (Function (SymbolTable 4 { a: (Variable 4 a [lda] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 4 lda)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), alpha: (Variable 4 alpha [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [ldb] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 4 ldb)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), beta: (Variable 4 beta [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [ldc] Out () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 4 ldc)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 4 k [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lda: (Variable 4 lda [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldb: (Variable 4 ldb [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldc: (Variable 4 ldc [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 4 m [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 4 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transa: (Variable 4 transa [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transb: (Variable 4 transb [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gemm (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 7 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 9 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 12 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 4 transa) (Var 4 transb) (Var 4 m) (Var 4 n) (Var 4 k) (Var 4 alpha) (Var 4 a) (Var 4 lda) (Var 4 b) (Var 4 ldb) (Var 4 beta) (Var 4 c) (Var 4 ldc)] [] () Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gemm_r [t gemm] [] ), my_cast_to_double: (Function (SymbolTable 14 { a: (Variable 14 a [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 14 b [] ReturnVar () () Default (Real 8) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 14 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 1.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_cast_to_double (FunctionType [(Real 4)] (Real 8) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 14 a)] [(Assignment (Var 14 b) (Cast (Var 14 a) RealToReal (Real 8) () () ) () .false. .false. )] (Var 14 b) Private .true. .true. () ), my_cast_to_real: (Function (SymbolTable 13 { a: (Variable 13 a [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 13 b [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_cast_to_real (FunctionType [(Real 4)] (Real 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 13 a)] [(Assignment (Var 13 b) (Var 13 a) () .false. .false. )] (Var 13 b) Private .true. .true. () ), my_external_matmul: (Function (SymbolTable 15 { a: (Variable 15 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 15 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 15 c [a b] ReturnVar () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 15 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 15 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 15 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 15 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 15 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_external_matmul (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray )] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [my_cast_to_real my_gemm_real] [(Var 15 a) (Var 15 b)] [(Assignment (Var 15 m) (ArraySize (Var 15 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 15 n) (ArraySize (Var 15 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 15 k) (ArraySize (Var 15 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 my_gemm_real () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 15 m)) ((Var 15 n)) ((Var 15 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 1.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 15 a) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 15 m)) ((ArrayPhysicalCast (Var 15 b) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 15 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 0.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 15 c) PointerArray UnboundedPointerArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 15 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 15 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] UnboundedPointerArray ) () )) ((Var 15 m))] () .false. )] (Var 15 c) Private .true. .true. () ), my_gemm_double: (Function (SymbolTable 12 { a: (Variable 12 a [lda] In () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (Var 12 lda)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), alpha: (Variable 12 alpha [] In () () Default (Real 8) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 12 b [ldb] In () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (Var 12 ldb)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), beta: (Variable 12 beta [] In () () Default (Real 8) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 12 c [ldc] Out () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (Var 12 ldc)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 12 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 1.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 12 k [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lda: (Variable 12 lda [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldb: (Variable 12 ldb [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldc: (Variable 12 ldc [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 12 m [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 12 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transa: (Variable 12 transa [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transb: (Variable 12 transb [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_gemm_double (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4) (Integer 4) (Real 8) (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 7 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4) (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 9 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4) (Real 8) (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 12 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 12 transa) (Var 12 transb) (Var 12 m) (Var 12 n) (Var 12 k) (Var 12 alpha) (Var 12 a) (Var 12 lda) (Var 12 b) (Var 12 ldb) (Var 12 beta) (Var 12 c) (Var 12 ldc)] [] () Private .true. .true. () ), my_gemm_real: (Function (SymbolTable 11 { a: (Variable 11 a [lda] In () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 11 lda)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), alpha: (Variable 11 alpha [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 11 b [ldb] In () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 11 ldb)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), beta: (Variable 11 beta [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 11 c [ldc] Out () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 11 ldc)) (() ())] UnboundedPointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 11 k [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lda: (Variable 11 lda [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldb: (Variable 11 ldb [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldc: (Variable 11 ldc [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 11 m [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 11 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transa: (Variable 11 transa [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transb: (Variable 11 transb [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_gemm_real (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4) (Integer 4) (Real 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 7 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 9 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4) (Real 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 12 (Integer 4) () )) (() ())] UnboundedPointerArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 11 transa) (Var 11 transb) (Var 11 m) (Var 11 n) (Var 11 k) (Var 11 alpha) (Var 11 a) (Var 11 lda) (Var 11 b) (Var 11 ldb) (Var 11 beta) (Var 11 c) (Var 11 ldc)] [] () Private .true. .true. () ), simple_external_matmul: (Template (SymbolTable 16 { cast_to_t: (Function (SymbolTable 18 { arg: (Variable 18 arg [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 18 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_to_t (FunctionType [(Real 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 18 arg)] [] (Var 18 res) Private .true. .true. () ), gemm: (Function (SymbolTable 17 { a: (Variable 17 a [lda] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 17 lda)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), alpha: (Variable 17 alpha [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 17 b [ldb] In () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 17 ldb)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), beta: (Variable 17 beta [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 17 c [ldc] Out () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 17 ldc)) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 17 k [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), lda: (Variable 17 lda [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldb: (Variable 17 ldb [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ldc: (Variable 17 ldc [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 17 m [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 17 n [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transa: (Variable 17 transa [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), transb: (Variable 17 transb [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gemm (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 7 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 9 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4) (TypeParameter t ) (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 12 (Integer 4) () )) (() ())] DescriptorArray ) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 17 transa) (Var 17 transb) (Var 17 m) (Var 17 n) (Var 17 k) (Var 17 alpha) (Var 17 a) (Var 17 lda) (Var 17 b) (Var 17 ldb) (Var 17 beta) (Var 17 c) (Var 17 ldc)] [] () Private .true. .true. () ), real: (Variable 16 real [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), simple_external_matmul: (Function (SymbolTable 19 { a: (Variable 19 a [] In () () Default (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 19 b [] In () () Default (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 19 c [a b] ReturnVar () () Default (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 19 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 19 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 19 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 19 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 19 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) simple_external_matmul (FunctionType [(Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray )] (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [cast_to_t gemm] [(Var 19 a) (Var 19 b)] [(Assignment (Var 19 m) (ArraySize (Var 19 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 19 n) (ArraySize (Var 19 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 19 k) (ArraySize (Var 19 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 16 gemm () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 19 m)) ((Var 19 n)) ((Var 19 k)) ((FunctionCall 16 cast_to_t () [((RealConstant 1.000000 (Real 4) ))] (TypeParameter t ) () () )) ((ArrayPhysicalCast (Var 19 a) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () )) ((Var 19 m)) ((ArrayPhysicalCast (Var 19 b) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ()) (() ())] DescriptorArray ) () )) ((Var 19 k)) ((FunctionCall 16 cast_to_t () [((RealConstant 0.000000 (Real 4) ))] (TypeParameter t ) () () )) ((ArrayPhysicalCast (Var 19 c) PointerArray DescriptorArray (Array (TypeParameter t ) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 19 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 19 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] DescriptorArray ) () )) ((Var 19 m))] () .false. )] (Var 19 c) Private .true. .true. () ), t: (Variable 16 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) simple_external_matmul [t gemm cast_to_t] [(Require gemm_r [t gemm] ) (Require cast_r [real t cast_to_t] )] ), test_template: (Function (SymbolTable 20 { __instantiated_simple_external_matmul: (Function (SymbolTable 24 { a: (Variable 24 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 24 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 24 c [a b] ReturnVar () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 24 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 24 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 24 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 24 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 24 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_simple_external_matmul (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray )] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [my_cast_to_real my_gemm_real] [(Var 24 a) (Var 24 b)] [(Assignment (Var 24 m) (ArraySize (Var 24 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 24 n) (ArraySize (Var 24 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 24 k) (ArraySize (Var 24 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 my_gemm_real () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 24 m)) ((Var 24 n)) ((Var 24 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 1.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 24 a) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 24 m)) ((ArrayPhysicalCast (Var 24 b) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 24 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 0.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 24 c) PointerArray UnboundedPointerArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 24 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 24 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] UnboundedPointerArray ) () )) ((Var 24 m))] () .false. )] (Var 24 c) Private .true. .true. () ), __instantiated_simple_external_matmul1: (Function (SymbolTable 25 { a: (Variable 25 a [] In () () Default (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 25 b [] In () () Default (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 25 c [a b] ReturnVar () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 25 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 25 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 25 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 25 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 25 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_simple_external_matmul1 (FunctionType [(Array (Real 8) [(() ()) (() ())] DescriptorArray ) (Array (Real 8) [(() ()) (() ())] DescriptorArray )] (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [my_cast_to_double my_gemm_double] [(Var 25 a) (Var 25 b)] [(Assignment (Var 25 m) (ArraySize (Var 25 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 25 n) (ArraySize (Var 25 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 25 k) (ArraySize (Var 25 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 my_gemm_double () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 25 m)) ((Var 25 n)) ((Var 25 k)) ((FunctionCall 2 my_cast_to_double () [((RealConstant 1.000000 (Real 4) ))] (Real 8) () () )) ((ArrayPhysicalCast (Var 25 a) DescriptorArray UnboundedPointerArray (Array (Real 8) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 25 m)) ((ArrayPhysicalCast (Var 25 b) DescriptorArray UnboundedPointerArray (Array (Real 8) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 25 k)) ((FunctionCall 2 my_cast_to_double () [((RealConstant 0.000000 (Real 4) ))] (Real 8) () () )) ((ArrayPhysicalCast (Var 25 c) PointerArray UnboundedPointerArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 25 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 25 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] UnboundedPointerArray ) () )) ((Var 25 m))] () .false. )] (Var 25 c) Private .true. .true. () ), adp: (Variable 20 adp [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), asp: (Variable 20 asp [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), bdp: (Variable 20 bdp [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), bsp: (Variable 20 bsp [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), cdp: (Variable 20 cdp [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), csp: (Variable 20 csp [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 20 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 1.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), nonsimple_external_matmul_double: (Function (SymbolTable 22 { a: (Variable 22 a [] In () () Default (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 22 b [] In () () Default (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 22 c [a b] ReturnVar () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 22 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 22 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 22 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 22 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 22 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nonsimple_external_matmul_double (FunctionType [(Array (Real 8) [(() ()) (() ())] DescriptorArray ) (Array (Real 8) [(() ()) (() ())] DescriptorArray )] (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (Real 8) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [my_cast_to_double my_gemm_double] [(Var 22 a) (Var 22 b)] [(Assignment (Var 22 m) (ArraySize (Var 22 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 22 n) (ArraySize (Var 22 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 22 k) (ArraySize (Var 22 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 my_gemm_double () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 22 m)) ((Var 22 n)) ((Var 22 k)) ((FunctionCall 2 my_cast_to_double () [((RealConstant 1.000000 (Real 4) ))] (Real 8) () () )) ((ArrayPhysicalCast (Var 22 a) DescriptorArray UnboundedPointerArray (Array (Real 8) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 22 m)) ((ArrayPhysicalCast (Var 22 b) DescriptorArray UnboundedPointerArray (Array (Real 8) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 22 k)) ((FunctionCall 2 my_cast_to_double () [((RealConstant 0.000000 (Real 4) ))] (Real 8) () () )) ((ArrayPhysicalCast (Var 22 c) PointerArray UnboundedPointerArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 22 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 22 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] UnboundedPointerArray ) () )) ((Var 22 m))] () .false. )] (Var 22 c) Private .true. .true. () ), nonsimple_external_matmul_real: (Function (SymbolTable 21 { a: (Variable 21 a [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 21 b [] In () () Default (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 21 c [a b] ReturnVar () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 21 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 21 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 21 k [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 21 m [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 21 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nonsimple_external_matmul_real (FunctionType [(Array (Real 4) [(() ()) (() ())] DescriptorArray ) (Array (Real 4) [(() ()) (() ())] DescriptorArray )] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 0 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (FunctionParam 1 (Array (Real 4) [(() ()) (() ())] DescriptorArray ) () ) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [my_cast_to_real my_gemm_real] [(Var 21 a) (Var 21 b)] [(Assignment (Var 21 m) (ArraySize (Var 21 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 21 n) (ArraySize (Var 21 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 21 k) (ArraySize (Var 21 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 my_gemm_real () [((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((StringConstant "n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 21 m)) ((Var 21 n)) ((Var 21 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 1.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 21 a) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 21 m)) ((ArrayPhysicalCast (Var 21 b) DescriptorArray UnboundedPointerArray (Array (Real 4) [(() ()) (() ())] UnboundedPointerArray ) () )) ((Var 21 k)) ((FunctionCall 2 my_cast_to_real () [((RealConstant 0.000000 (Real 4) ))] (Real 4) () () )) ((ArrayPhysicalCast (Var 21 c) PointerArray UnboundedPointerArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 21 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 21 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] UnboundedPointerArray ) () )) ((Var 21 m))] () .false. )] (Var 21 c) Private .true. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 20 csp) (FunctionCall 20 __instantiated_simple_external_matmul () [((ArrayPhysicalCast (Var 20 asp) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 20 bsp) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () ))] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () () ) () .false. .false. ) (Assignment (Var 20 cdp) (FunctionCall 20 __instantiated_simple_external_matmul1 () [((ArrayPhysicalCast (Var 20 adp) FixedSizeArray DescriptorArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 20 bdp) FixedSizeArray DescriptorArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] DescriptorArray ) () ))] (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () () ) () .false. .false. )] () Public .true. .true. () ) }) template_lapack_01_m () [template_lapack_01_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-print_09-8516006.json0000664000175000017500000000071215227365530022714 0ustar alastairalastair{ "basename": "run-print_09-8516006", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/print_09.f90", "infile_hash": "cc0837a65a4cfcf29013298ba39bcabf2d6d192481f6217948058034", "outfile": null, "outfile_hash": null, "stdout": "run-print_09-8516006.stdout", "stdout_hash": "bbc919c4582c8659560481de5fbbfed97aadedb27e9243ef4001b2e7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-passing_array_01-b2bde68.json0000664000175000017500000000072415227365530024720 0ustar alastairalastair{ "basename": "run-passing_array_01-b2bde68", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/passing_array_01.f90", "infile_hash": "c4f23f8af4c7add1c1eeab42b957fd5885da76f668ca6b1b86660896", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-passing_array_01-b2bde68.stderr", "stderr_hash": "59aa29b7099f795300614c65d9ddb0c7314a7775a9d19e61a4c01e8d", "returncode": 1 }././@LongLink0000644000000000000000000000017000000000000011601 Lustar rootrootlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-modules_37-1456cdb.stdoutlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-module0000664000175000017500000016113415227365530035007 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_37: (Program (SymbolTable 11 { }) modules_37 [] [(Print (StringConstant "executing modules_37" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ), modules_37_fpm_backend: (Module (SymbolTable 2 { build_package_build_target_ptr____0: (Function (SymbolTable 13 { 1_build_target_ptr_ptr: (ExternalSymbol 13 1_build_target_ptr_ptr 6 ptr modules_37_fpm_backend [build_target_ptr] ptr Public ), __1targets: (Variable 13 __1targets [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), associate_block: (AssociateBlock (SymbolTable 14 { 1_build_target_t_output_dir: (ExternalSymbol 14 1_build_target_t_output_dir 7 output_dir modules_37_fpm_backend [build_target_t] output_dir Public ), 1_string_t_s: (ExternalSymbol 14 1_string_t_s 5 s modules_37_fpm_backend [string_t] s Public ), target: (Variable 14 target [] Local () () Default (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 2 build_target_t Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) associate_block [(Associate (Var 14 target) (StructInstanceMember (ArrayItem (Var 13 targets) [(() (Var 13 i) ())] (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) ColMajor () ) 9 1_build_target_ptr_ptr (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ) ) (Assignment (StructInstanceMember (Var 13 temp) 12 1_string_t_s (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (StructInstanceMember (Var 14 target) 12 1_build_target_t_output_dir (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) () .false. .false. ) (Assignment (Var 13 build_dirs) (ArrayConstructor [(Var 13 build_dirs) (Var 13 temp)] (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) ())] DescriptorArray ) () ColMajor () ) () .false. .false. )] ), build_dirs: (Variable 13 build_dirs [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 string_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 13 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 13 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), model: (Variable 13 model [] In () () Default (StructType [] [] .true. .false. ) 2 fpm_model_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), targets: (Variable 13 targets [__1targets] InOut () () Default (Array (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (Var 13 __1targets))] PointerArray ) 2 build_target_ptr Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), temp: (Variable 13 temp [] Local () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), verbose: (Variable 13 verbose [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) build_package_build_target_ptr____0 (FunctionType [(Array (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 1 (Integer 4) () ))] PointerArray ) (Integer 4) (StructType [] [] .true. .false. ) (Logical 4)] () Source Implementation "" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 targets) (Var 13 __1targets) (Var 13 model) (Var 13 verbose)] [(Allocate [((Var 13 build_dirs) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] () () ())] () () () ) (DoLoop () ((Var 13 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 13 targets) () (Integer 4) () ) ()) [(AssociateBlockCall 13 associate_block )] [] )] () Public .false. .false. () ), build_target_ptr: (Struct (SymbolTable 6 { ptr: (Variable 6 ptr [] Local (PointerNullConstant (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) (Var 6 ptr) ) (PointerNullConstant (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) (Var 6 ptr) ) Default (Pointer (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 2 build_target_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) build_target_ptr (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) [build_target_t] [ptr] [] Source Public .false. .false. .false. [] () () [] ), build_target_t: (Struct (SymbolTable 7 { output_dir: (Variable 7 output_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) build_target_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [output_dir] [] Source Public .false. .false. .false. [] () () [] ), cmd_build: (Function (SymbolTable 10 { 1_fpm_cmd_settings_verbose: (ExternalSymbol 10 1_fpm_cmd_settings_verbose 3 verbose modules_37_fpm_backend [fpm_cmd_settings] verbose Public ), model: (Variable 10 model [] Local () () Default (StructType [] [] .true. .false. ) 2 fpm_model_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), settings: (Variable 10 settings [] In () () Default (StructType [] [] .true. .false. ) 2 fpm_build_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), targets: (Variable 10 targets [] Local () () Default (Allocatable (Array (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 build_target_ptr Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cmd_build (FunctionType [(StructType [] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [build_package_build_target_ptr____0] [(Var 10 settings)] [(SubroutineCall 2 build_package_build_target_ptr____0 2 build_package_build_target_ptr____0 [((ArrayPhysicalCast (Var 10 targets) DescriptorArray PointerArray (Allocatable (Array (StructType [(Pointer (StructType [] [] .true. .false. ) )] [] .true. .false. ) [(() ())] PointerArray ) ) () )) ((ArraySize (Var 10 targets) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((Var 10 model)) ((StructInstanceMember (Var 10 settings) 10 1_fpm_cmd_settings_verbose (Logical 4) () ))] () .false. )] () Public .true. .true. () ), fpm_build_settings: (Struct (SymbolTable 4 { }) fpm_build_settings (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () 2 fpm_cmd_settings [] ), fpm_cmd_settings: (Struct (SymbolTable 3 { verbose: (Variable 3 verbose [] Local (LogicalConstant .true. (Logical 4) ) (LogicalConstant .true. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_cmd_settings (StructType [(Logical 4)] [] .true. .false. ) [] [verbose] [] Source Public .false. .true. .false. [] () () [] ), fpm_model_t: (Struct (SymbolTable 8 { }) fpm_model_t (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () () [] ), string_t: (Struct (SymbolTable 5 { s: (Variable 5 s [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [s] [] Source Public .false. .false. .false. [] () () [] ) }) modules_37_fpm_backend () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-recursion_01-95eb32d.json0000664000175000017500000000076115227365530024157 0ustar alastairalastair{ "basename": "llvm-recursion_01-95eb32d", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/recursion_01.f90", "infile_hash": "1e4b2d3443a20a91f047ee86808b6d104c0f8bb11e930886d11978b5", "outfile": null, "outfile_hash": null, "stdout": "llvm-recursion_01-95eb32d.stdout", "stdout_hash": "fd992af00b868fe3898498f26fab3fda05aa9776db227cf15cc46ca4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-fn2-b585098.stdout0000664000175000017500000002536715227365530022377 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a: (Function (SymbolTable 2 { a: (Variable 2 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 2 a) Public .true. .true. () ), b: (Function (SymbolTable 3 { b: (Variable 3 b [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 3 b) Public .true. .true. () ), c: (Function (SymbolTable 4 { c: (Variable 4 c [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) c (FunctionType [] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 4 c) Public .true. .true. () ), d: (Function (SymbolTable 5 { r: (Variable 5 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 5 r) Public .true. .true. () ), e: (Function (SymbolTable 6 { r: (Variable 6 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) e (FunctionType [] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 6 r) Public .true. .true. () ), f: (Function (SymbolTable 7 { r: (Variable 7 r [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 7 r) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-namelist_01-032372e.stdout0000664000175000017500000000325015227365530023774 0ustar alastairalastair(TranslationUnit [(Program namelist1 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(N [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(t [] [] () () None ()) (x [] [] () () None ()) (Ecut [] [] () () None ())] () ) (Declaration () [(AttrNamelist [(domain [(N [] [] () () None ()) (t [] [] () () None ()) (x [] [] () () None ()) (Ecut [] [] () () None ())])] )] [] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-template_array_03-b7f9799.stderr0000664000175000017500000000167115227365530025272 0ustar alastairalastairwarning: Assuming implicit save attribute for variable declaration --> tests/../integration_tests/template_array_03.f90:87:24 | 87 | integer :: x = 1, y = 1, z = 1 | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement warning: Assuming implicit save attribute for variable declaration --> tests/../integration_tests/template_array_03.f90:87:31 | 87 | integer :: x = 1, y = 1, z = 1 | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement warning: Assuming implicit save attribute for variable declaration --> tests/../integration_tests/template_array_03.f90:87:38 | 87 | integer :: x = 1, y = 1, z = 1 | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement lfortran-0.64.0/tests/reference/ast_f90-fixed_form1-f592417.json0000664000175000017500000000075415227365530024212 0ustar alastairalastair{ "basename": "ast_f90-fixed_form1-f592417", "cmd": "lfortran --fixed-form --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/fixed_form1.f", "infile_hash": "a6774c19d8ae1f0ab04227a596e393ce26d84d1c0f796b7187a87f1a", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-fixed_form1-f592417.stdout", "stdout_hash": "843ac83692a9534bec8918fbb1c735e55c96fe5dbba4ba51e3142bc8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-array3-ab6fef3.json0000664000175000017500000000070015227365530023331 0ustar alastairalastair{ "basename": "julia-array3-ab6fef3", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/array3.f90", "infile_hash": "047ac01d7e3df52429d6889258f37213048937dae8611af6cbd9ecae", "outfile": null, "outfile_hash": null, "stdout": "julia-array3-ab6fef3.stdout", "stdout_hash": "a68ff46f328c8936947ca83ff6d0bfabfff1d8283334d9c403b6c9e6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dimension_01-2172e76.stderr0000664000175000017500000000031615227365530024134 0ustar alastairalastairsemantic error: Expecting a scalar integer or parameter annotated integer variable --> tests/errors/dimension_01.f90:2:24 | 2 | integer, dimension("abcd") :: line | ^^^^^^ lfortran-0.64.0/tests/reference/ast_f90-coarrays_08-69934a9.stdout0000664000175000017500000000010015227365530024502 0ustar alastairalastairprogram coarrays_08 integer :: x[*] = 0 end program coarrays_08 lfortran-0.64.0/tests/reference/ast-array2-7b9505c.stdout0000664000175000017500000001155715227365530023162 0ustar alastairalastair(TranslationUnit [(Program array2 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 5 DimensionExpr)] )] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(1 3 DimensionExpr)] )] [(c [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [(AttrDimension [(1 2 DimensionExpr)] )] [(d [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 2 DimensionExpr) (1 3 DimensionExpr)] )] [(e [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(1 3 DimensionExpr) (1 4 DimensionExpr)] )] [(f [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [(AttrDimension [(1 5 DimensionExpr) (1 2 DimensionExpr)] )] [(g [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 2 DimensionExpr) (1 3 DimensionExpr) (1 4 DimensionExpr)] )] [(h [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(1 3 DimensionExpr) (1 4 DimensionExpr) (1 3 DimensionExpr)] )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [(AttrDimension [(1 5 DimensionExpr) (1 2 DimensionExpr) (1 2 DimensionExpr)] )] [(j [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] )] ) lfortran-0.64.0/tests/reference/fortran-coarray_operations_01-fb45389.f900000664000175000017500000001427415227365530026132 0ustar alastairalastairtype :: __module_prif_prif_dummy_team_descriptor end type __module_prif_prif_dummy_team_descriptor type :: __module_prif_prif_team_type type(__module_prif_prif_dummy_team_descriptor), pointer :: info end type __module_prif_prif_team_type type :: prif_coarray_handle type(c_ptr) :: info end type prif_coarray_handle program coarray_operations_01 implicit none integer(4), pointer :: a type(c_ptr) :: a__coarray_data type(prif_coarray_handle) :: a__coarray_handle integer(4) :: me integer(4) :: stat call __module_prif_prif_init(stat) call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8, null(), a__coarray_handle, a__coarray_data) call c_f_pointer(a__coarray_data, a) call __module_prif_prif_sync_all() me = lcompilers_prif_this_image() a = me call __module_prif_prif_sync_all() if (me == 1) then a = lcompilers_prif_get_integer(4)(a__coarray_handle, [int(2, kind=8)], int(0, kind=8)) call lcompilers_prif_put_integer(4)(a__coarray_handle, [int(2, kind=8)], int(0, kind=8), me) end if call __module_prif_prif_sync_all() call __module_prif_prif_stop(.false.) contains interface subroutine __module_prif_prif_allocate_coarray(lcobounds, ucobounds, size_in_bytes, final_proc,& & coarray_handle, allocated_memory, stat, errmsg, errmsg_alloc) type(c_ptr), intent(out) :: allocated_memory type(prif_coarray_handle), intent(out) :: coarray_handle character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc procedure(prif_coarray_cleanup_interface), pointer, intent(in) :: final_proc integer(8), dimension(:), intent(in), value :: lcobounds integer(8), intent(in), value :: size_in_bytes integer(4), intent(out), optional :: stat integer(8), dimension(:), intent(in), value :: ucobounds end subroutine __module_prif_prif_allocate_coarray end interface interface subroutine __module_prif_prif_get(image_num, coarray_handle, offset, current_image_buffer, size_in_bytes,& & stat, errmsg, errmsg_alloc) type(prif_coarray_handle), intent(in) :: coarray_handle type(c_ptr), intent(in), value :: current_image_buffer character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), value :: image_num integer(8), intent(in), value :: offset integer(8), intent(in), value :: size_in_bytes integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_get end interface interface subroutine __module_prif_prif_init(exit_code) integer(4), intent(out) :: exit_code end subroutine __module_prif_prif_init end interface interface subroutine __module_prif_prif_initial_team_index(coarray_handle, sub, initial_team_index, stat) type(prif_coarray_handle), intent(in) :: coarray_handle integer(4), intent(out) :: initial_team_index integer(4), intent(out), optional :: stat integer(8), dimension(:), intent(in), value :: sub end subroutine __module_prif_prif_initial_team_index end interface interface subroutine __module_prif_prif_put(image_num, coarray_handle, offset, current_image_buffer, size_in_bytes,& & stat, errmsg, errmsg_alloc) type(prif_coarray_handle), intent(in) :: coarray_handle type(c_ptr), intent(in), value :: current_image_buffer character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), value :: image_num integer(8), intent(in), value :: offset integer(8), intent(in), value :: size_in_bytes integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_put end interface interface subroutine __module_prif_prif_stop(quiet, stop_code_int, stop_code_char) logical(1), intent(in), value :: quiet character(len=*, kind=1), intent(in), optional, value :: stop_code_char integer(4), intent(in), optional, value :: stop_code_int end subroutine __module_prif_prif_stop end interface interface subroutine __module_prif_prif_sync_all(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_all end interface interface subroutine __module_prif_prif_this_image_no_coarray(team, this_image) type(__module_prif_prif_team_type), intent(in), optional :: team integer(4), intent(out) :: this_image end subroutine __module_prif_prif_this_image_no_coarray end interface integer(4) function lcompilers_prif_get_integer(4)(coarray_handle, sub, offset) result(result) type(prif_coarray_handle), intent(in) :: coarray_handle integer(4) :: image_num integer(8), intent(in), value :: offset integer(8), dimension(:), intent(in), value :: sub call __module_prif_prif_initial_team_index(coarray_handle, sub, image_num) call __module_prif_prif_get(image_num, coarray_handle, offset, c_loc(result), 4_8) end function lcompilers_prif_get_integer(4) subroutine lcompilers_prif_put_integer(4)(coarray_handle, sub, offset, value) type(prif_coarray_handle), intent(in) :: coarray_handle integer(4) :: image_num integer(8), intent(in), value :: offset integer(8), dimension(:), intent(in), value :: sub integer(4), intent(in), value :: value call __module_prif_prif_initial_team_index(coarray_handle, sub, image_num) call __module_prif_prif_put(image_num, coarray_handle, offset, c_loc(value), 4_8) end subroutine lcompilers_prif_put_integer(4) integer(4) function lcompilers_prif_this_image() call __module_prif_prif_this_image_no_coarray(lcompilers_prif_this_image) end function lcompilers_prif_this_image interface subroutine prif_coarray_cleanup_interface(handle) bind(c) type(prif_coarray_handle), intent(in), value :: handle end subroutine prif_coarray_cleanup_interface end interface end program coarray_operations_01 lfortran-0.64.0/tests/reference/run-read_error_02-866ee33.json0000664000175000017500000000071315227365530024050 0ustar alastairalastair{ "basename": "run-read_error_02-866ee33", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/read_error_02.f90", "infile_hash": "0fd50e46eba7079f2de793d0cb4739fabfa8874d8a26ebbc087d8783", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-read_error_02-866ee33.stderr", "stderr_hash": "779288eb815a37e8653ec38e1052dba7c4c3537f8fe7255fa94b5ad5", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-pragma2-604d549.stdout0000664000175000017500000001033615227365530023224 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { pragma2: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) pragma2 [] [(Assignment (Var 2 a) (ArrayPhysicalCast (ArrayBroadcast (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (ArrayConstant 4 [8] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 32 [1.00000000e+00, 1.00000000e+00, 1.00000000e+00, ...., 1.00000000e+00, 1.00000000e+00, 1.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) FixedSizeArray SIMDArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal))] SIMDArray ) () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/run-implicit_argument_casting_01-0d962d9.stderr0000664000175000017500000000014015227365530027471 0ustar alastairalastairCannot use --disable-implicit-argument-casting and --implicit-argument-casting at the same time lfortran-0.64.0/tests/reference/asr-array_constructor_with_different_kind-80c5bf4.json0000664000175000017500000000105315227365530031323 0ustar alastairalastair{ "basename": "asr-array_constructor_with_different_kind-80c5bf4", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_constructor_with_different_kind.f90", "infile_hash": "1c99a99dd08ea6e1a907a41a63108fa742ed6e2802d9f8be88f23732", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_constructor_with_different_kind-80c5bf4.stderr", "stderr_hash": "ffe5660a2ce99c0aa55533f42cbad5016f892774b54ab3ac611c3361", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-array_bound_1-b0c2255.json0000664000175000017500000000076115227365530024113 0ustar alastairalastair{ "basename": "asr-array_bound_1-b0c2255", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_bound_1.f90", "infile_hash": "38d2c1d99ad714fdaa387541310a78f8d3c4d7e19e93ed67a2dcf677", "outfile": null, "outfile_hash": null, "stdout": "asr-array_bound_1-b0c2255.stdout", "stdout_hash": "98cb89014cc517283b2847e9b8fdcbe12a78684ccf6e51cfcd32d2cd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_16_module-4aac273.stdout0000664000175000017500000004443515227365530026550 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_16: (Program (SymbolTable 5 { 1_fpm_run_settings_bool: (ExternalSymbol 5 1_fpm_run_settings_bool 3 bool fpm_command_line [fpm_run_settings] bool Public ), 1_fpm_run_settings_float: (ExternalSymbol 5 1_fpm_run_settings_float 3 float fpm_command_line [fpm_run_settings] float Public ), 1_fpm_run_settings_int: (ExternalSymbol 5 1_fpm_run_settings_int 3 int fpm_command_line [fpm_run_settings] int Public ), fpm_run_settings: (ExternalSymbol 5 fpm_run_settings 2 fpm_run_settings fpm_command_line [] fpm_run_settings Public ), get_command_line_settings: (ExternalSymbol 5 get_command_line_settings 2 get_command_line_settings fpm_command_line [] get_command_line_settings Public ), settings: (Variable 5 settings [] Local () () Default (Allocatable (StructType [(Integer 4) (Real 4) (Logical 4)] [] .false. .false. ) ) 5 fpm_run_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) derived_types_16 [fpm_command_line] [(Allocate [((Var 5 settings) [] () () ())] () () () ) (SubroutineCall 5 get_command_line_settings () [((Var 5 settings))] () .false. ) (If () (IntegerCompare (StructInstanceMember (Var 5 settings) 5 1_fpm_run_settings_int (Integer 4) () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (StructInstanceMember (Var 5 settings) 5 1_fpm_run_settings_float (Real 4) () ) Sub (RealConstant 1.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (StructInstanceMember (Var 5 settings) 5 1_fpm_run_settings_bool (Logical 4) () ) NEqv (LogicalConstant .true. (Logical 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ), fpm_command_line: (Module (SymbolTable 2 { fpm_run_settings: (Struct (SymbolTable 3 { bool: (Variable 3 bool [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), float: (Variable 3 float [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), int: (Variable 3 int [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_run_settings (StructType [(Integer 4) (Real 4) (Logical 4)] [] .true. .false. ) [] [int float bool] [] Source Public .false. .false. .false. [] () () [] ), get_command_line_settings: (Function (SymbolTable 4 { cmd_settings: (Variable 4 cmd_settings [] Out () () Default (Allocatable (StructType [(Integer 4) (Real 4) (Logical 4)] [] .false. .false. ) ) 2 fpm_run_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_command_line_settings (FunctionType [(Allocatable (StructType [(Integer 4) (Real 4) (Logical 4)] [] .false. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 cmd_settings)] [(Assignment (Var 4 cmd_settings) (StructConstructor 2 fpm_run_settings [((IntegerConstant 0 (Integer 4) Decimal)) ((RealConstant 1.000000 (Real 4) )) ((LogicalConstant .true. (Logical 4) ))] (StructType [(Integer 4) (Real 4) (Logical 4)] [] .true. .false. ) () ) () .false. .false. )] () Public .true. .true. () ) }) fpm_command_line () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-do_zero_increment-06c400d.stderr0000664000175000017500000000023615227365530025420 0ustar alastairalastairsemantic error: Step expression (Increment) in DO loop cannot be zero --> tests/errors/do_zero_increment.f90:4:14 | 4 | do i = 1, 5, 0 | ^ lfortran-0.64.0/tests/reference/ast-entry1-5b02d99.stdout0000664000175000017500000000404115227365530023172 0ustar alastairalastair(TranslationUnit [(Program entry1 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [(Declaration (AttrType TypeReal [] () () None ) [] [(dummy [] [] () () None ())] () )] [(Assignment 0 dummy 10 () ) (SubroutineCall 0 x [] [(() dummy () 0)] [] [] () ) (SubroutineCall 0 y [] [(() dummy () 0)] [] [] () )] [] ) (Subroutine x [(dummy)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [] [(dummy [] [] () () None ())] () )] [(Print 0 () [(String "Printed using subroutine call: " ()) dummy] () ) (Assignment 0 dummy (Real "5.0") () ) (Return 0 () () ) (Entry 0 y [(dummy)] () () () ) (Print 0 () [(String "Printed using entry statement: " ()) dummy] () ) (Return 0 () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-array_02_pack-233bae0.json0000664000175000017500000000076115227365530024060 0ustar alastairalastair{ "basename": "asr-array_02_pack-233bae0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_02_pack.f90", "infile_hash": "8d58570ab351e8b1ec04ca39b9a3dd9c099cffdcdf4ea487fe742f35", "outfile": null, "outfile_hash": null, "stdout": "asr-array_02_pack-233bae0.stdout", "stdout_hash": "7ac4d34b1d12179a8620df04bf1ac6610347ef6aa9c478ade24dd162", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutine7-e0b863b.json0000664000175000017500000000071715227365530024263 0ustar alastairalastair{ "basename": "julia-subroutine7-e0b863b", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/subroutine7.f90", "infile_hash": "3a15750c9d608f1988e0dd13f8d956be28a72297be5ef3137777cf2f", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutine7-e0b863b.stdout", "stdout_hash": "2399ab9cb3fe2b65500fd1f09c5ce34b0cfc6a0bc2d07ad844e98ba8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutine1-b6656b7.json0000664000175000017500000000073515227365530023666 0ustar alastairalastair{ "basename": "asr-subroutine1-b6656b7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/subroutine1.f90", "infile_hash": "0c76f3b9c93978c48be3b338215eb0380706f094f8d28edce0da034e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-subroutine1-b6656b7.stderr", "stderr_hash": "6023ad3e9dde6734e3fcc03d3dc361690e636daec657440736485019", "returncode": 2 }lfortran-0.64.0/tests/reference/run-scalar_allocation_check_07-eaa53b1.stdout0000664000175000017500000000000615227365530027222 0ustar alastairalastairhello lfortran-0.64.0/tests/reference/asr-intrinsics8-6c1e53e.json0000664000175000017500000000073515227365530023735 0ustar alastairalastair{ "basename": "asr-intrinsics8-6c1e53e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics8.f90", "infile_hash": "9b631de39a99a46aa17f154cad0d2ee561c62e453115eb29cafebefe", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics8-6c1e53e.stderr", "stderr_hash": "eb0ef68f4703dae27ab9edddee37e060bce610f6da28a5021f6b0d29", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-team1-f0af498.json0000664000175000017500000000070415227365530022473 0ustar alastairalastair{ "basename": "ast-team1-f0af498", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/team1.f90", "infile_hash": "c7d57807d2f91911de8beb317405307221c403b50c6abdec58484b8b", "outfile": null, "outfile_hash": null, "stdout": "ast-team1-f0af498.stdout", "stdout_hash": "96941664a3ca5f8afe52665681990109cfa0177a2d3d54d515f0ebd5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope8-95c3673.json0000664000175000017500000000101415227365530026773 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope8-95c3673", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope8.f90", "infile_hash": "899df30dee274279a699110fb9af2afad0b826c0abc886f9e2460627", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope8-95c3673.stdout", "stdout_hash": "abbd88eeb771cc172a9ce347bc00a3cb0d732b8a25b4c61e06446690", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-case_06-f84222d.json0000664000175000017500000000073715227365530022622 0ustar alastairalastair{ "basename": "asr-case_06-f84222d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_06.f90", "infile_hash": "3987983e4c8d162530bceffbbce0bd7d038b1f794655c222c47ad714", "outfile": null, "outfile_hash": null, "stdout": "asr-case_06-f84222d.stdout", "stdout_hash": "67b0159ed2ba9b643d614c6d4ede93caa1bcbb191f065b422cf80015", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-derived_types_32-4684b97.stdout0000664000175000017500000004661615227365530025254 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c" \00", align 1 @1 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [4 x i8] c"(g0)" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }> @serialization_info = private unnamed_addr constant [3 x i8] c"R8\00", align 1 @2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @__Wrong_allocation = private unnamed_addr constant [51 x i8] c"Attempting to allocate already allocated variable!\00", align 1 @string_const_data.1 = private constant [1 x i8] c" " @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.1, i32 0, i32 0), i64 1 }> @3 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [7 x i8] c"S-DESC\00", align 1 @4 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @string_const_data.4 = private constant [18 x i8] c"10.000000000000000" @string_const.5 = private global %string_descriptor <{ i8* getelementptr inbounds ([18 x i8], [18 x i8]* @string_const_data.4, i32 0, i32 0), i64 18 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @5 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @6 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @_lcompilers_len_trim_str(%string_descriptor* %str) { .entry: %StringItem = alloca %string_descriptor, align 8 %result = alloca i32, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %1 = load i64, i64* %0, align 8 %2 = trunc i64 %1 to i32 store i32 %2, i32* %result, align 4 %3 = load i32, i32* %result, align 4 %4 = icmp ne i32 %3, 0 br i1 %4, label %then, label %else2 then: ; preds = %.entry br label %loop.head loop.head: ; preds = %ifcont, %then %5 = load i32, i32* %result, align 4 %6 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = sext i32 %5 to i64 %9 = sub i64 %8, 1 %10 = getelementptr i8, i8* %7, i64 %9 %11 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 0 store i8* %10, i8** %11, align 8 %12 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 1 store i64 1, i64* %12, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 0 %14 = load i8*, i8** %13, align 8 %15 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 %16 = load i8, i8* %14, align 1 %17 = load i8, i8* %15, align 1 %18 = icmp eq i8 %16, %17 br i1 %18, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %19 = load i32, i32* %result, align 4 %20 = sub i32 %19, 1 store i32 %20, i32* %result, align 4 %21 = load i32, i32* %result, align 4 %22 = icmp eq i32 %21, 0 br i1 %22, label %then1, label %else then1: ; preds = %loop.body br label %loop.end unreachable_after_exit: ; No predecessors! br label %ifcont else: ; preds = %loop.body br label %ifcont ifcont: ; preds = %else, %unreachable_after_exit br label %loop.head loop.end: ; preds = %then1, %loop.head br label %ifcont3 else2: ; preds = %.entry br label %ifcont3 ifcont3: ; preds = %else2, %loop.end br label %return return: ; preds = %ifcont3 br label %FINALIZE_SYMTABLE__lcompilers_len_trim_str FINALIZE_SYMTABLE__lcompilers_len_trim_str: ; preds = %return %23 = load i32, i32* %result, align 4 ret i32 %23 } define void @_lcompilers_trim_str(%string_descriptor* %str, %string_descriptor* %result) { .entry: %0 = call i8* @_lfortran_get_default_allocator() %StrSlice_StrView = alloca %string_descriptor, align 8 %1 = call i32 @_lcompilers_len_trim_str(%string_descriptor* %str) %2 = sext i32 %1 to i64 %3 = sub i64 %2, 1 %4 = add i64 %3, 1 %5 = icmp slt i64 %4, 0 %6 = select i1 %5, i64 0, i64 %4 %7 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %StrSliceGEP = getelementptr i8, i8* %8, i64 0 %9 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 store i8* %StrSliceGEP, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 store i64 %6, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %result, i32 0, i32 0 %12 = getelementptr %string_descriptor, %string_descriptor* %result, i32 0, i32 1 %13 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 %14 = load i8*, i8** %13, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 %16 = load i64, i64* %15, align 8 call void @_lfortran_strcpy_alloc(i8* %0, i8** %11, i64* %12, i8 0, i8 0, i8* %14, i64 %16, i32 1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_trim_str FINALIZE_SYMTABLE__lcompilers_trim_str: ; preds = %return ret void } define void @__module_testdrive_derived_types_32_real_dp_to_string(double* %val, %string_descriptor* %string) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %lfortran_iomsg = alloca %string_descriptor, align 8 %buffer = alloca %string_descriptor, align 8 %__libasr__created__var__2_return_slot = alloca %string_descriptor, align 8 store %string_descriptor zeroinitializer, %string_descriptor* %__libasr__created__var__2_return_slot, align 1 store %string_descriptor zeroinitializer, %string_descriptor* %buffer, align 1 %1 = getelementptr %string_descriptor, %string_descriptor* %buffer, i32 0, i32 1 store i64 128, i64* %1, align 8 %2 = getelementptr %string_descriptor, %string_descriptor* %buffer, i32 0, i32 0 %3 = call i8* @_lfortran_get_default_allocator() %4 = call i8* @_lfortran_malloc_alloc(i8* %3, i64 128) store i8* %4, i8** %2, align 8 %buffer_len = alloca i32, align 4 store i32 128, i32* %buffer_len, align 4 store %string_descriptor zeroinitializer, %string_descriptor* %lfortran_iomsg, align 1 %5 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 1 store i64 0, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 0 %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 1) store i8* %8, i8** %6, align 8 %9 = load %string_descriptor, %string_descriptor* %string, align 1 %10 = getelementptr %string_descriptor, %string_descriptor* %string, i32 0, i32 0 %11 = load i8*, i8** %10, align 8 %12 = icmp ne i8* %11, null br i1 %12, label %then, label %else then: ; preds = %.entry %13 = getelementptr %string_descriptor, %string_descriptor* %string, i32 0, i32 0 %14 = getelementptr %string_descriptor, %string_descriptor* %string, i32 0, i32 1 %15 = load i8*, i8** %13, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %15) store i8* null, i8** %13, align 8 store i64 0, i64* %14, align 8 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %16 = getelementptr %string_descriptor, %string_descriptor* %buffer, i32 0, i32 0 %17 = getelementptr %string_descriptor, %string_descriptor* %buffer, i32 0, i32 1 %18 = alloca i32*, align 8 store i32* null, i32** %18, align 8 %19 = load i32*, i32** %18, align 8 %20 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 %21 = alloca i64, align 8 %22 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* %20, i64 4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %21, i32 0, i32 0, i32 0, i32 0, i32 0, double* %val) %23 = load i64, i64* %21, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %22, i8** %24, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %23, i64* %25, align 8 %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %27 = load i8*, i8** %26, align 8 %28 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %29 = load i64, i64* %28, align 8 call void (i8*, i8**, i8, i8, i8, i64, i64*, i32*, i8*, i64, ...) @_lfortran_string_write(i8* %0, i8** %16, i8 0, i8 0, i8 0, i64 1, i64* %17, i32* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @2, i32 0, i32 0), i64 2, i8* %27, i64 %29) %30 = icmp eq i8* %22, null br i1 %30, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %0, i8* %22) br label %free_done free_done: ; preds = %free_nonnull, %ifcont %31 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 0 %32 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 1 %33 = load i8*, i8** %31, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %33) store i8* null, i8** %31, align 8 store i64 0, i64* %32, align 8 %34 = call i32 @_lcompilers_len_trim_str(%string_descriptor* %buffer) %35 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 0 %36 = load i8*, i8** %35, align 8 %37 = icmp ne i8* %36, null br i1 %37, label %then1, label %else2 then1: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @__Wrong_allocation, i32 0, i32 0)) call void @exit(i32 1) br label %ifcont3 else2: ; preds = %free_done br label %ifcont3 ifcont3: ; preds = %else2, %then1 %38 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 0 %39 = sext i32 %34 to i64 %40 = call i8* @_lfortran_get_default_allocator() %41 = call i8* @_lfortran_string_malloc_alloc(i8* %40, i64 %39) store i8* %41, i8** %38, align 8 %42 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 1 %43 = sext i32 %34 to i64 store i64 %43, i64* %42, align 8 call void @_lcompilers_trim_str(%string_descriptor* %buffer, %string_descriptor* %__libasr__created__var__2_return_slot) %44 = getelementptr %string_descriptor, %string_descriptor* %string, i32 0, i32 0 %45 = getelementptr %string_descriptor, %string_descriptor* %string, i32 0, i32 1 %46 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 0 %47 = load i8*, i8** %46, align 8 %48 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 1 %49 = load i64, i64* %48, align 8 call void @_lfortran_strcpy_alloc(i8* %0, i8** %44, i64* %45, i8 1, i8 1, i8* %47, i64 %49, i32 1) br label %return return: ; preds = %ifcont3 br label %FINALIZE_SYMTABLE_real_dp_to_string FINALIZE_SYMTABLE_real_dp_to_string: ; preds = %return br label %Finalize_Variable___libasr__created__var__2_return_slot Finalize_Variable___libasr__created__var__2_return_slot: ; preds = %FINALIZE_SYMTABLE_real_dp_to_string %50 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__2_return_slot, i32 0, i32 0 %51 = load i8*, i8** %50, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %51) br label %Finalize_Variable_buffer Finalize_Variable_buffer: ; preds = %Finalize_Variable___libasr__created__var__2_return_slot %52 = getelementptr %string_descriptor, %string_descriptor* %buffer, i32 0, i32 0 %53 = load i8*, i8** %52, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %53) br label %Finalize_Variable_lfortran_iomsg Finalize_Variable_lfortran_iomsg: ; preds = %Finalize_Variable_buffer %54 = getelementptr %string_descriptor, %string_descriptor* %lfortran_iomsg, i32 0, i32 0 %55 = load i8*, i8** %54, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %55) ret void } declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_free_alloc(i8*, i8*) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_string_write(i8*, i8**, i8, i8, i8, i64, i64*, i32*, i8*, i64, ...) declare void @_lcompilers_print_error(i8*, ...) declare void @exit(i32) declare i8* @_lfortran_string_malloc_alloc(i8*, i64) declare void @_lfortran_strcpy_alloc(i8*, i8**, i64*, i8, i8, i8*, i64, i32) define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %__libasr__created__var__1_return_slot = alloca %string_descriptor, align 8 %__libasr__created__var__0_return_slot = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store %string_descriptor zeroinitializer, %string_descriptor* %__libasr__created__var__0_return_slot, align 1 store %string_descriptor zeroinitializer, %string_descriptor* %__libasr__created__var__1_return_slot, align 1 %value = alloca double, align 8 store double 1.000000e+01, double* %value, align 8 %3 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %4 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 1 %5 = load i8*, i8** %3, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %5) store i8* null, i8** %3, align 8 store i64 0, i64* %4, align 8 call void @__module_testdrive_derived_types_32_real_dp_to_string(double* %value, %string_descriptor* %__libasr__created__var__0_return_slot) %6 = alloca i64, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 1 %8 = load i64, i64* %7, align 8 %9 = load %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, align 1 %10 = alloca %string_descriptor, align 8 store %string_descriptor %9, %string_descriptor* %10, align 1 %11 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @serialization_info.3, i32 0, i32 0), i64* %6, i32 0, i32 1, i32 0, i32 0, i32 0, i64 %8, %string_descriptor* %10) %12 = load i64, i64* %6, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %11, i8** %13, align 8 %14 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %12, i64* %14, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %16 = load i8*, i8** %15, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %18 = load i64, i64* %17, align 8 %19 = trunc i64 %18 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @4, i32 0, i32 0), i8* %16, i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @3, i32 0, i32 0), i32 1) %20 = icmp eq i8* %11, null br i1 %20, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %11) br label %free_done free_done: ; preds = %free_nonnull, %.entry %21 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__1_return_slot, i32 0, i32 0 %22 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__1_return_slot, i32 0, i32 1 %23 = load i8*, i8** %21, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %23) store i8* null, i8** %21, align 8 store i64 0, i64* %22, align 8 call void @__module_testdrive_derived_types_32_real_dp_to_string(double* %value, %string_descriptor* %__libasr__created__var__1_return_slot) %24 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__1_return_slot, i32 0, i32 0 %25 = load i8*, i8** %24, align 8 %26 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__1_return_slot, i32 0, i32 1 %27 = load i64, i64* %26, align 8 %28 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.5, i32 0, i32 0), align 8 %29 = call i32 @str_compare(i8* %25, i64 %27, i8* %28, i64 18) %30 = icmp ne i32 %29, 0 br i1 %30, label %then, label %else then: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @5, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return br label %Finalize_Variable___libasr__created__var__0_return_slot Finalize_Variable___libasr__created__var__0_return_slot: ; preds = %FINALIZE_SYMTABLE_main %31 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %32 = load i8*, i8** %31, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %32) br label %Finalize_Variable___libasr__created__var__1_return_slot Finalize_Variable___libasr__created__var__1_return_slot: ; preds = %Finalize_Variable___libasr__created__var__0_return_slot %33 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__1_return_slot, i32 0, i32 0 %34 = load i8*, i8** %33, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %34) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare i32 @str_compare(i8*, i64, i8*, i64) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/run-scalar_allocation_check_01-a82b6b0.stderr0000664000175000017500000000025415227365530027125 0ustar alastairalastairruntime error: Variable 'x' is not allocated. --> tests/errors/scalar_allocation_check_01.f90:4:29 | 4 | integer, allocatable :: x | ^ lfortran-0.64.0/tests/reference/asr-fixed_form_goto_select-a0c3483.json0000664000175000017500000000100215227365530026067 0ustar alastairalastair{ "basename": "asr-fixed_form_goto_select-a0c3483", "cmd": "lfortran --fixed-form --show-asr --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_goto_select.f", "infile_hash": "acbe51b93b613a469a6a95e544f8bf2480ad5ea75d6f5e369dcceb9a", "outfile": null, "outfile_hash": null, "stdout": "asr-fixed_form_goto_select-a0c3483.stdout", "stdout_hash": "362bdc18ee785b2f2e7698fce59a216e5fa4b12081132424e84aa955", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-forall1-88e2780.stdout0000664000175000017500000000210515227365530023714 0ustar alastairalastairprogram forall1 implicit none ! Only for Syntax check !>>>>>>>>>>>>> Single line statments <<<<<<<<<<<<<< forall (i = 1:n) A(i, i) = B(i) end forall forall (i = 1:n:3, j = 1:n:5) A(i, j) = SIN(A(j, i)) end forall forall (i = 1:n, j = 1:n, i /= j) A(i, j) = REAL(i + j) end forall forall (i = 1:n, j = 1:m, A(i, j) /= 0) A(i, j) = 1/A(i, j) end forall forall (i = 1:1000, j = 1:1000, i /= j) A(i, j) = A(j, i) end forall !>>>>>>>>>>>>> Multipe line statements <<<<<<<<<<<<<< forall (j = 1:n) shared(i) local(x) default(none) forall (i = 1:j) A(i, j) = B(i) end forall end forall forall (i = 1:N) reduce(*: s) s = s + a(i) end forall forall (i = 3:N + 1, j = 3:N + 1) C(i, j) = C(i, j + 2) + C(i, j - 2) D(i, j) = C(i, j) + C(i + 2, j) + C(i - 2, j) end forall forall (x = 1:100, J(x) > 0) where (I(x, :) < 0) I(x, :) = 0 elsewhere I(x, :) = 1 end where end forall outer: forall (i = 1:100) inner: forall (j = 1:100, i /= j) A(i, j) = A(j, i) end forall inner end forall outer end program forall1 lfortran-0.64.0/tests/reference/asr-assign_01-2cf003f.stderr0000664000175000017500000000035215227365530023561 0ustar alastairalastairsemantic error: Cannot assign to a constant variable --> tests/errors/assign_01.f90:5:5 | 5 | x = 1 | ^^^^^ assignment here | 4 | integer, parameter :: x = 2 | ~~~~~ declared as constant lfortran-0.64.0/tests/reference/llvm-string_10-ef0078f.stdout0000664000175000017500000004235415227365530024033 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @c_data = private global [2 x i8] c"BC" @c = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @c_data, i32 0, i32 0), i64 2 }> @string_const_data = private constant [1 x i8] c"A" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data, i32 0, i32 0), i64 1 }> @string_const_data.1 = private constant [1 x i8] c"Z" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.1, i32 0, i32 0), i64 1 }> @string_const_data.3 = private constant [1 x i8] c"a" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.3, i32 0, i32 0), i64 1 }> @string_const_data.5 = private constant [1 x i8] c"z" @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.5, i32 0, i32 0), i64 1 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [4 x i8] c"L32\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @string_const_data.7 = private constant [2 x i8] c"@a" @string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data.7, i32 0, i32 0), i64 2 }> @string_const_data.9 = private constant [1 x i8] c"A" @string_const.10 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.9, i32 0, i32 0), i64 1 }> @string_const_data.11 = private constant [1 x i8] c"Z" @string_const.12 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.11, i32 0, i32 0), i64 1 }> @string_const_data.13 = private constant [1 x i8] c"a" @string_const.14 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.13, i32 0, i32 0), i64 1 }> @string_const_data.15 = private constant [1 x i8] c"z" @string_const.16 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.15, i32 0, i32 0), i64 1 }> @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.17 = private unnamed_addr constant [4 x i8] c"L32\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @string_const_data.18 = private constant [2 x i8] c"a@" @string_const.19 = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data.18, i32 0, i32 0), i64 2 }> @string_const_data.20 = private constant [1 x i8] c"A" @string_const.21 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.20, i32 0, i32 0), i64 1 }> @string_const_data.22 = private constant [1 x i8] c"Z" @string_const.23 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.22, i32 0, i32 0), i64 1 }> @string_const_data.24 = private constant [1 x i8] c"a" @string_const.25 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.24, i32 0, i32 0), i64 1 }> @string_const_data.26 = private constant [1 x i8] c"z" @string_const.27 = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data.26, i32 0, i32 0), i64 1 }> @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.28 = private unnamed_addr constant [4 x i8] c"L32\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @string_const_data.29 = private constant [3 x i8] c"sbs" @string_const.30 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.29, i32 0, i32 0), i64 3 }> @string_const_data.31 = private constant [3 x i8] c"sbs" @string_const.32 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.31, i32 0, i32 0), i64 3 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %StrSlice_StrView = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %num = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %is_alpha = alloca i32, align 4 store %string_descriptor zeroinitializer, %string_descriptor* %num, align 1 %3 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 1 store i64 3, i64* %3, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 3) store i8* %6, i8** %4, align 8 %7 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %8 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 %9 = call i32 @str_compare(i8* %7, i64 2, i8* %8, i64 1) %10 = icmp sge i32 %9, 0 %11 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %12 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 %13 = call i32 @str_compare(i8* %11, i64 2, i8* %12, i64 1) %14 = icmp sle i32 %13, 0 %15 = and i1 %10, %14 %16 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %17 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 %18 = call i32 @str_compare(i8* %16, i64 2, i8* %17, i64 1) %19 = icmp sge i32 %18, 0 %20 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %21 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8 %22 = call i32 @str_compare(i8* %20, i64 2, i8* %21, i64 1) %23 = icmp sle i32 %22, 0 %24 = and i1 %19, %23 %25 = or i1 %15, %24 %26 = zext i1 %25 to i32 store i32 %26, i32* %is_alpha, align 4 %27 = alloca i64, align 8 %28 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @serialization_info, i32 0, i32 0), i64* %27, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %is_alpha) %29 = load i64, i64* %27, align 8 %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %28, i8** %30, align 8 %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %29, i64* %31, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %33 = load i8*, i8** %32, align 8 %34 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %35 = load i64, i64* %34, align 8 %36 = trunc i64 %35 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %33, i32 %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %37 = icmp eq i8* %28, null br i1 %37, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %28) br label %free_done free_done: ; preds = %free_nonnull, %.entry %38 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8 call void @_lfortran_strcpy_alloc(i8* %2, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), i64* getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 1), i8 0, i8 0, i8* %38, i64 2, i32 1) %39 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %40 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.10, i32 0, i32 0), align 8 %41 = call i32 @str_compare(i8* %39, i64 2, i8* %40, i64 1) %42 = icmp sge i32 %41, 0 %43 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %44 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.12, i32 0, i32 0), align 8 %45 = call i32 @str_compare(i8* %43, i64 2, i8* %44, i64 1) %46 = icmp sle i32 %45, 0 %47 = and i1 %42, %46 %48 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %49 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.14, i32 0, i32 0), align 8 %50 = call i32 @str_compare(i8* %48, i64 2, i8* %49, i64 1) %51 = icmp sge i32 %50, 0 %52 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %53 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.16, i32 0, i32 0), align 8 %54 = call i32 @str_compare(i8* %52, i64 2, i8* %53, i64 1) %55 = icmp sle i32 %54, 0 %56 = and i1 %51, %55 %57 = or i1 %47, %56 %58 = zext i1 %57 to i32 store i32 %58, i32* %is_alpha, align 4 %59 = alloca i64, align 8 %60 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @serialization_info.17, i32 0, i32 0), i64* %59, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %is_alpha) %61 = load i64, i64* %59, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %60, i8** %62, align 8 %63 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %61, i64* %63, align 8 %64 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %65 = load i8*, i8** %64, align 8 %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %67 = load i64, i64* %66, align 8 %68 = trunc i64 %67 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %65, i32 %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %69 = icmp eq i8* %60, null br i1 %69, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %60) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %70 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.19, i32 0, i32 0), align 8 call void @_lfortran_strcpy_alloc(i8* %2, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), i64* getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 1), i8 0, i8 0, i8* %70, i64 2, i32 1) %71 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %72 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.21, i32 0, i32 0), align 8 %73 = call i32 @str_compare(i8* %71, i64 2, i8* %72, i64 1) %74 = icmp sge i32 %73, 0 %75 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %76 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.23, i32 0, i32 0), align 8 %77 = call i32 @str_compare(i8* %75, i64 2, i8* %76, i64 1) %78 = icmp sle i32 %77, 0 %79 = and i1 %74, %78 %80 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %81 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.25, i32 0, i32 0), align 8 %82 = call i32 @str_compare(i8* %80, i64 2, i8* %81, i64 1) %83 = icmp sge i32 %82, 0 %84 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @c, i32 0, i32 0), align 8 %85 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.27, i32 0, i32 0), align 8 %86 = call i32 @str_compare(i8* %84, i64 2, i8* %85, i64 1) %87 = icmp sle i32 %86, 0 %88 = and i1 %83, %87 %89 = or i1 %79, %88 %90 = zext i1 %89 to i32 store i32 %90, i32* %is_alpha, align 4 %91 = alloca i64, align 8 %92 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @serialization_info.28, i32 0, i32 0), i64* %91, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %is_alpha) %93 = load i64, i64* %91, align 8 %94 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %92, i8** %94, align 8 %95 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %93, i64* %95, align 8 %96 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %97 = load i8*, i8** %96, align 8 %98 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %99 = load i64, i64* %98, align 8 %100 = trunc i64 %99 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %97, i32 %100, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %101 = icmp eq i8* %92, null br i1 %101, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %92) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %102 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0 %103 = load i8*, i8** %102, align 8 %StrSliceGEP = getelementptr i8, i8* %103, i64 0 %104 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 store i8* %StrSliceGEP, i8** %104, align 8 %105 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 store i64 3, i64* %105, align 8 %106 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 %107 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 %108 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.30, i32 0, i32 0), align 8 call void @_lfortran_strcpy_alloc(i8* %2, i8** %106, i64* %107, i8 0, i8 0, i8* %108, i64 3, i32 1) %109 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0 %110 = load i8*, i8** %109, align 8 %111 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.32, i32 0, i32 0), align 8 %112 = call i32 @str_compare(i8* %110, i64 3, i8* %111, i64 3) %113 = icmp ne i32 %112, 0 br i1 %113, label %then, label %else then: ; preds = %free_done6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done6 br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_string_10 FINALIZE_SYMTABLE_string_10: ; preds = %return br label %Finalize_Variable_num Finalize_Variable_num: ; preds = %FINALIZE_SYMTABLE_string_10 %114 = getelementptr %string_descriptor, %string_descriptor* %num, i32 0, i32 0 %115 = load i8*, i8** %114, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %115) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare i32 @str_compare(i8*, i64, i8*, i64) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_strcpy_alloc(i8*, i8**, i64*, i8, i8, i8*, i64, i32) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/ast-multi_error1-6934f65.stderr0000664000175000017500000000016615227365530024311 0ustar alastairalastairsyntax error: Newline is unexpected here --> tests/multi_error1.f90:3:15 | 3 | integer :: x = | ^ lfortran-0.64.0/tests/reference/asr-uppercase1-b7c06b1.stdout0000664000175000017500000001607715227365530024100 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { uppercase1: (Module (SymbolTable 2 { sub: (Function (SymbolTable 3 { a: (Variable 3 a [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a)] [(Assignment (Var 3 a) (IntegerBinOp (IntegerBinOp (Var 3 a) Add (ArraySize (Var 2 x) () (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (Integer 4) () ) Add (ArraySize (Var 2 y) () (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ), x: (Variable 2 x [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) uppercase1 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/pass_div_to_mul-div_to_mul-d0027c6.json0000664000175000017500000000102215227365530026123 0ustar alastairalastair{ "basename": "pass_div_to_mul-div_to_mul-d0027c6", "cmd": "lfortran --pass=div_to_mul --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/div_to_mul.f90", "infile_hash": "6c1d702f410e8db6aae79c37b446d7a2fd6295166902746ff799d239", "outfile": null, "outfile_hash": null, "stdout": "pass_div_to_mul-div_to_mul-d0027c6.stdout", "stdout_hash": "0590734a0ae808a03af901dd7ec0e1ebc93a97e5e6f1cd1fa0d1d5ce", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-no_prescan_include2-121e523.stdout0000664000175000017500000000127615227365530025577 0ustar alastairalastair(TranslationUnit [(Program include2 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] [(Assignment 0 x (* (+ 2 3) 5) () ) (Print 0 () [x] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/ast-program_without_line_06-58bbdbc.stdout0000664000175000017500000000030615227365530026731 0ustar alastairalastair(TranslationUnit [(Program __xx_main () [] [] [] [(Stop 0 () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-operator_overloading_02-6076a0f.stdout0000664000175000017500000003655615227365530026506 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 5 { logical_gets_integer@~assign: (ExternalSymbol 5 logical_gets_integer@~assign 2 logical_gets_integer overload_assignment_m [] logical_gets_integer Public ), tf: (Variable 5 tf [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~assign: (ExternalSymbol 5 ~assign 2 ~assign overload_assignment_m [] ~assign Public ) }) main [overload_assignment_m] [(Assignment (Var 5 tf) (IntegerConstant 0 (Integer 4) Decimal) (SubroutineCall 5 logical_gets_integer@~assign 5 logical_gets_integer@~assign [((Var 5 tf)) ((IntegerConstant 0 (Integer 4) Decimal))] () .false. ) .false. .false. ) (Print (StringFormat () [(StringConstant "tf=0:" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 tf)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 5 tf) (IntegerConstant 1 (Integer 4) Decimal) (SubroutineCall 5 logical_gets_integer@~assign 5 logical_gets_integer@~assign [((Var 5 tf)) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) .false. .false. ) (Print (StringFormat () [(StringConstant "tf=1:" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 tf)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), overload_assignment_m: (Module (SymbolTable 2 { logical_gets_integer: (Function (SymbolTable 3 { i: (Variable 3 i [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), tf: (Variable 3 tf [] Out () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) logical_gets_integer (FunctionType [(Logical 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 tf) (Var 3 i)] [(Assignment (Var 3 tf) (IntegerCompare (Var 3 i) Eq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) () .false. .false. )] () Private .true. .true. () ), logical_gets_integer_use: (Function (SymbolTable 4 { i: (Variable 4 i [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), logical_gets_integer: (ExternalSymbol 4 logical_gets_integer 2 logical_gets_integer overload_assignment_m [] logical_gets_integer Public ), tf: (Variable 4 tf [] Out () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) logical_gets_integer_use (FunctionType [(Logical 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 tf) (Var 4 i)] [(Assignment (Var 4 tf) (Var 4 i) (SubroutineCall 4 logical_gets_integer 4 logical_gets_integer [((Var 4 tf)) ((Var 4 i))] () .false. ) .false. .false. )] () Private .true. .true. () ), ~assign: (CustomOperator 2 ~assign [2 logical_gets_integer] Public ) }) overload_assignment_m () [overload_assignment_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-allocate_02-4f6b634.stdout0000664000175000017500000003533015227365530024225 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %array.1 = type { i32*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] } %dimension_descriptor = type { i64, i64, i64 } @0 = private unnamed_addr constant [4 x i8] c"arr\00", align 1 @1 = private unnamed_addr constant [22 x i8] c"tests/allocate_02.f90\00", align 1 @2 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @3 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @4 = private unnamed_addr constant [4 x i8] c"arr\00", align 1 @5 = private unnamed_addr constant [22 x i8] c"tests/allocate_02.f90\00", align 1 @6 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @7 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() %arr_desc = alloca %array.1, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %arr = alloca %array.1*, align 8 store %array.1* null, %array.1** %arr, align 8 %3 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 8 %4 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %3, i32 0, i32 0 %5 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %4, i32 0 %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 0 store i64 1, i64* %6, align 8 %7 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 1 store i64 1, i64* %7, align 8 %8 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 2 store i64 0, i64* %8, align 8 %9 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 3 store i8 1, i8* %9, align 1 %10 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 0 store i32* null, i32** %10, align 8 store %array.1* %arr_desc, %array.1** %arr, align 8 %i = alloca i32, align 4 %11 = load %array.1*, %array.1** %arr, align 8 %12 = ptrtoint %array.1* %11 to i64 %13 = icmp eq i64 %12, 0 br i1 %13, label %merge_allocated, label %check_data check_data: ; preds = %.entry %14 = getelementptr %array.1, %array.1* %11, i32 0, i32 0 %15 = load i32*, i32** %14, align 8 %16 = ptrtoint i32* %15 to i64 %17 = icmp ne i64 %16, 0 br label %merge_allocated merge_allocated: ; preds = %check_data, %.entry %is_allocated = phi i1 [ false, %.entry ], [ %17, %check_data ] br i1 %is_allocated, label %then, label %ifcont then: ; preds = %merge_allocated %18 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %19 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %20 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %19, i32 0, i32 0 %21 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %20, i32 0, i32 0 store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @1, i32 0, i32 0), i8** %21, align 8 %22 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %20, i32 0, i32 1 store i32 5, i32* %22, align 4 %23 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %20, i32 0, i32 2 store i32 14, i32* %23, align 4 %24 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %20, i32 0, i32 3 store i32 5, i32* %24, align 4 %25 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %20, i32 0, i32 4 store i32 19, i32* %25, align 4 %26 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) %27 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %18, i32 0, i32 0 %28 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %19, i32 0, i32 0 %29 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %27, i32 0, i32 2 %30 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %27, i32 0, i32 0 store i1 true, i1* %30, align 1 %31 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %27, i32 0, i32 1 store i8* %26, i8** %31, align 8 store { i8*, i32, i32, i32, i32 }* %28, { i8*, i32, i32, i32, i32 }** %29, align 8 %32 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %27, i32 0, i32 3 store i32 1, i32* %32, align 4 %33 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %18, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %33, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont: ; preds = %merge_allocated %34 = load %array.1*, %array.1** %arr, align 8 %35 = getelementptr %array.1, %array.1* %34, i32 0, i32 7 store i64 0, i64* %35, align 8 %36 = getelementptr %array.1, %array.1* %34, i32 0, i32 3 store i8 1, i8* %36, align 1 %37 = getelementptr %array.1, %array.1* %34, i32 0, i32 8 %38 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %37, i32 0, i32 0 %39 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %38, i32 0 %40 = getelementptr %dimension_descriptor, %dimension_descriptor* %39, i32 0, i32 2 %41 = getelementptr %dimension_descriptor, %dimension_descriptor* %39, i32 0, i32 0 %42 = getelementptr %dimension_descriptor, %dimension_descriptor* %39, i32 0, i32 1 store i64 1, i64* %40, align 8 store i64 1, i64* %41, align 8 store i64 1, i64* %42, align 8 %43 = getelementptr %array.1, %array.1* %34, i32 0, i32 0 %44 = call i8* @_lfortran_get_default_allocator() %45 = call i8* @_lfortran_malloc_alloc(i8* %44, i64 4) %46 = bitcast i8* %45 to i32* store i32* %46, i32** %43, align 8 store i32 0, i32* %i, align 4 br label %loop.head loop.head: ; preds = %ifcont10, %ifcont %47 = load i32, i32* %i, align 4 %48 = add i32 %47, 1 %49 = icmp sle i32 %48, 1000000 br i1 %49, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %50 = load i32, i32* %i, align 4 %51 = add i32 %50, 1 store i32 %51, i32* %i, align 4 %52 = load %array.1*, %array.1** %arr, align 8 %53 = ptrtoint %array.1* %52 to i64 %54 = icmp eq i64 %53, 0 br i1 %54, label %merge_allocated2, label %check_data1 check_data1: ; preds = %loop.body %55 = getelementptr %array.1, %array.1* %52, i32 0, i32 0 %56 = load i32*, i32** %55, align 8 %57 = ptrtoint i32* %56 to i64 %58 = icmp ne i64 %57, 0 br label %merge_allocated2 merge_allocated2: ; preds = %check_data1, %loop.body %is_allocated3 = phi i1 [ false, %loop.body ], [ %58, %check_data1 ] br i1 %is_allocated3, label %then4, label %else then4: ; preds = %merge_allocated2 %59 = getelementptr %array.1, %array.1* %52, i32 0, i32 0 %60 = load i32*, i32** %59, align 8 %61 = bitcast i32* %60 to i8* call void @_lfortran_free_alloc(i8* %2, i8* %61) %62 = getelementptr %array.1, %array.1* %52, i32 0, i32 0 store i32* null, i32** %62, align 8 br label %ifcont5 else: ; preds = %merge_allocated2 br label %ifcont5 ifcont5: ; preds = %else, %then4 %63 = load %array.1*, %array.1** %arr, align 8 %64 = ptrtoint %array.1* %63 to i64 %65 = icmp eq i64 %64, 0 br i1 %65, label %merge_allocated7, label %check_data6 check_data6: ; preds = %ifcont5 %66 = getelementptr %array.1, %array.1* %63, i32 0, i32 0 %67 = load i32*, i32** %66, align 8 %68 = ptrtoint i32* %67 to i64 %69 = icmp ne i64 %68, 0 br label %merge_allocated7 merge_allocated7: ; preds = %check_data6, %ifcont5 %is_allocated8 = phi i1 [ false, %ifcont5 ], [ %69, %check_data6 ] br i1 %is_allocated8, label %then9, label %ifcont10 then9: ; preds = %merge_allocated7 %70 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %71 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %72 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %71, i32 0, i32 0 %73 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %72, i32 0, i32 0 store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @5, i32 0, i32 0), i8** %73, align 8 %74 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %72, i32 0, i32 1 store i32 8, i32* %74, align 4 %75 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %72, i32 0, i32 2 store i32 18, i32* %75, align 4 %76 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %72, i32 0, i32 3 store i32 8, i32* %76, align 4 %77 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %72, i32 0, i32 4 store i32 23, i32* %77, align 4 %78 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @4, i32 0, i32 0)) %79 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %70, i32 0, i32 0 %80 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %71, i32 0, i32 0 %81 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %79, i32 0, i32 2 %82 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %79, i32 0, i32 0 store i1 true, i1* %82, align 1 %83 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %79, i32 0, i32 1 store i8* %78, i8** %83, align 8 store { i8*, i32, i32, i32, i32 }* %80, { i8*, i32, i32, i32, i32 }** %81, align 8 %84 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %79, i32 0, i32 3 store i32 1, i32* %84, align 4 %85 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %70, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %85, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @4, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont10: ; preds = %merge_allocated7 %86 = load %array.1*, %array.1** %arr, align 8 %87 = getelementptr %array.1, %array.1* %86, i32 0, i32 7 store i64 0, i64* %87, align 8 %88 = getelementptr %array.1, %array.1* %86, i32 0, i32 3 store i8 1, i8* %88, align 1 %89 = getelementptr %array.1, %array.1* %86, i32 0, i32 8 %90 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %89, i32 0, i32 0 %91 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %90, i32 0 %92 = getelementptr %dimension_descriptor, %dimension_descriptor* %91, i32 0, i32 2 %93 = getelementptr %dimension_descriptor, %dimension_descriptor* %91, i32 0, i32 0 %94 = getelementptr %dimension_descriptor, %dimension_descriptor* %91, i32 0, i32 1 store i64 1, i64* %92, align 8 store i64 1, i64* %93, align 8 store i64 1, i64* %94, align 8 %95 = getelementptr %array.1, %array.1* %86, i32 0, i32 0 %96 = call i8* @_lfortran_get_default_allocator() %97 = call i8* @_lfortran_malloc_alloc(i8* %96, i64 4) %98 = bitcast i8* %97 to i32* store i32* %98, i32** %95, align 8 br label %loop.head loop.end: ; preds = %loop.head br label %return return: ; preds = %loop.end br label %FINALIZE_SYMTABLE_allocate_02 FINALIZE_SYMTABLE_allocate_02: ; preds = %return br label %Finalize_Variable_arr Finalize_Variable_arr: ; preds = %FINALIZE_SYMTABLE_allocate_02 %99 = load %array.1*, %array.1** %arr, align 8 call void @finalize_allocatable__Array_1_i32(%array.1* %99) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare void @_lfortran_free_alloc(i8*, i8*) define internal void @finalize_allocatable__Array_1_i32(%array.1* %0) { entry: %1 = icmp ne %array.1* %0, null br i1 %1, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry call void @finalize_descriptorArray_Array_1_i32(%array.1* %0) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then ret void } define internal void @finalize_descriptorArray_Array_1_i32(%array.1* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = getelementptr %array.1, %array.1* %0, i32 0, i32 0 %3 = load i32*, i32** %2, align 8 %4 = ptrtoint i32* %3 to i64 %5 = icmp ne i64 %4, 0 br i1 %5, label %then, label %else then: ; preds = %entry %6 = bitcast i32* %3 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %6) br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then ret void } declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-complex1-0e93fa9.stdout0000664000175000017500000000131315227365530023744 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %complex_4 = type <{ float, float }> define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %x = alloca %complex_4, align 8 store %complex_4 <{ float 3.000000e+00, float 4.000000e+00 }>, %complex_4* %x, align 1 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_complex1 FINALIZE_SYMTABLE_complex1: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-intrinsics_02-404e16e.json0000664000175000017500000000076415227365530024252 0ustar alastairalastair{ "basename": "llvm-intrinsics_02-404e16e", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_02.f90", "infile_hash": "9042eb55a868aba778eaccfaba75217700b9f99f157df367ffc005fd", "outfile": null, "outfile_hash": null, "stdout": "llvm-intrinsics_02-404e16e.stdout", "stdout_hash": "36d631646b2e0282357e06b935ae7114348892d5b7dc329ba2b3adbe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-modules_01-da63075.json0000664000175000017500000000075015227365530023345 0ustar alastairalastair{ "basename": "ast-modules_01-da63075", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_01.f90", "infile_hash": "592921c14763dae70e205b1eaf8b9fd0b69df11eccc0a66d109e11b8", "outfile": null, "outfile_hash": null, "stdout": "ast-modules_01-da63075.stdout", "stdout_hash": "e69793d1058d360b1ba8c99a09834216a95939942da8317d7934bd88", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_03_transfer-4fcb3e2.json0000664000175000017500000000077515227365530025065 0ustar alastairalastair{ "basename": "asr-array_03_transfer-4fcb3e2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_03_transfer.f90", "infile_hash": "d554a75d7567a6aed407dae5c430c9dea3fa17c13fad6b7ffeecb8d0", "outfile": null, "outfile_hash": null, "stdout": "asr-array_03_transfer-4fcb3e2.stdout", "stdout_hash": "41d5555af3db1fc17cbd6d0a8a20f7b27fb465ff561ee9829ff356d0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_error_01b-e284c9a.json0000664000175000017500000000076215227365530025152 0ustar alastairalastair{ "basename": "asr-template_error_01b-e284c9a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/template_error_01b.f90", "infile_hash": "5ec3c47e5ccee449eb4e86e635ac1544b93a6be86f7ce1c332c97ddd", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-template_error_01b-e284c9a.stderr", "stderr_hash": "78249ad975f5cc263d61ff3951e5c3f7eded7260e296bbabd430c29c", "returncode": 2 }lfortran-0.64.0/tests/reference/ast_f90-where1-5c3f533.json0000664000175000017500000000072215227365530023247 0ustar alastairalastair{ "basename": "ast_f90-where1-5c3f533", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/where1.f90", "infile_hash": "cd5e0b85aa90c2bb3dff3fdc1e1e563b601c361a4b57ba16db0bf051", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-where1-5c3f533.stdout", "stdout_hash": "c91657eeaef4fd0b4c18b234bc364630734714fd5b953b2c081c15b3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_35-5fba3e7.json0000664000175000017500000000075015227365530023515 0ustar alastairalastair{ "basename": "asr-modules_35-5fba3e7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_35.f90", "infile_hash": "5117017b03ab16e2fa34e13800ebd9e03539c4bd6ad2fafc1e543dbb", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_35-5fba3e7.stdout", "stdout_hash": "47bd81a2ae15b4ee73f8d1819269592306dd34153b72b8366626d4b4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-complex_01-f07fa9a.stdout0000664000175000017500000000554215227365530024065 0ustar alastairalastair(TranslationUnit [(Program complex_01 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeComplex [] () () None ) [] [(x [] [] () (Complex (Real "1.0") (u- (Real "3.0"))) Equal ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrParameter )] [(a [] [] () (Real "3.0") Equal ()) (b [] [] () (Real "4.0") Equal ())] () ) (Declaration (AttrType TypeComplex [] () () None ) [] [(y [] [] () (Complex a b) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Declaration (AttrType TypeComplex [] () () None ) [(SimpleAttribute AttrParameter )] [(i_ [] [] () (Complex 0 1) Equal ())] () ) (Declaration (AttrType TypeComplex [] () () None ) [] [(z [] [] () (+ a (* i_ b)) Equal ())] () ) (Declaration (AttrType TypeComplex [] () () None ) [] [(w [] [] () (+ (+ a b) (* i_ (- a b))) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Print 0 () [x y z w] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/x86-program1-cd1a758.json0000664000175000017500000000057615227365530023054 0ustar alastairalastair{ "basename": "x86-program1-cd1a758", "cmd": "lfortran --no-color --backend=x86 {infile} -o output", "infile": "tests/program1.f90", "infile_hash": "ec4ccdfed01d45648718ca57a9ceb3e5aa82e55e57d8906636902e7b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-interface_04-9570e2b.json0000664000175000017500000000075615227365530023650 0ustar alastairalastair{ "basename": "asr-interface_04-9570e2b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/interface_04.f90", "infile_hash": "14368b65a65dffde9d8d8ed4bc45203d43a32e68739474d9f18fff8b", "outfile": null, "outfile_hash": null, "stdout": "asr-interface_04-9570e2b.stdout", "stdout_hash": "adb4cbc8dfef619a526e5d677db842669db9307b5ab5be21826e7f18", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics5-1cd2db1.json0000664000175000017500000000073515227365530023777 0ustar alastairalastair{ "basename": "asr-intrinsics5-1cd2db1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics5.f90", "infile_hash": "f6ab4986a500e1e177af025cc2991631cf382d103abca3355b09df16", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics5-1cd2db1.stderr", "stderr_hash": "0e94a76d3b167ad857fc872892b30dc061bdc741242a8d34e87bdf48", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-implicit_argument_casting_01-2274b4b.stdout0000664000175000017500000006251415227365530027473 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { idz_realcomp: (Function (SymbolTable 2 { a: (Variable 2 a [n] Unspecified () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) idz_realcomp (FunctionType [(Integer 4) (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 n) (Var 2 a)] [(Assignment (Var 2 a) (ArrayBroadcast (RealConstant 12.500000 (Real 8) ) (IntrinsicArrayFunction Shape [(Var 2 a)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () ) () .false. .false. )] () Public .true. .true. () ), main: (Program (SymbolTable 3 { dp: (Variable 3 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), idzp_svd: (Function (SymbolTable 4 { isi: (Variable 4 isi [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ls: (Variable 4 ls [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 4 w [] Unspecified () () Default (Array (Complex 8) [(() ())] UnboundedPointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w_cast: (Variable 4 w_cast [] Local () () Default (Pointer (Array (Real 8) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) idzp_svd (FunctionType [(Integer 4) (Array (Complex 8) [(() ())] UnboundedPointerArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [idz_realcomp] [(Var 4 ls) (Var 4 w)] [(Assignment (Var 4 isi) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (CPtrToPointer (PointerToCPtr (GetPointer (ArrayItem (Var 4 w) [(() (Var 4 isi) ())] (Complex 8) ColMajor () ) (Pointer (Complex 8) ) () ) (CPtr) () ) (Var 4 w_cast) (ArrayConstant 4 [1000] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () ) (SubroutineCall 1 idz_realcomp () [((IntegerBinOp (Var 4 ls) Mul (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((ArrayPhysicalCast (Var 4 w_cast) DescriptorArray PointerArray (Pointer (Array (Real 8) [(() ())] PointerArray ) ) () ))] () .false. ) (Print (StringFormat () [(ArrayItem (Var 4 w) [(() (Var 4 isi) ())] (Complex 8) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Real [(ArrayItem (Var 4 w) [(() (Var 4 isi) ())] (Complex 8) ColMajor () )] 0 (Real 8) () ) Sub (RealConstant 12.500000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] () Public .false. .false. () ), w: (Variable 3 w [] Local () () Default (Array (Complex 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(SubroutineCall 3 idzp_svd () [((IntegerConstant 5 (Integer 4) Decimal)) ((ArrayPhysicalCast (Var 3 w) FixedSizeArray UnboundedPointerArray (Array (Complex 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] UnboundedPointerArray ) () ))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_28-d8cdd42.json0000664000175000017500000000071515227365530023357 0ustar alastairalastair{ "basename": "run-format_28-d8cdd42", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_28.f90", "infile_hash": "e12053da38efd01671849c2d7e7ff4188ea37725fd373fee0322018e", "outfile": null, "outfile_hash": null, "stdout": "run-format_28-d8cdd42.stdout", "stdout_hash": "5a623fd42274dea41223ab2fcd021cbd0ecbf208b1c2aa96782ade02", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-entry2-a9679e0.json0000664000175000017500000000075615227365530022637 0ustar alastairalastair{ "basename": "asr-entry2-a9679e0", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/entry2.f90", "infile_hash": "8a9990154b2df25acf24c7fec7a8d5c1a984523e505e71caacf27c61", "outfile": null, "outfile_hash": null, "stdout": "asr-entry2-a9679e0.stdout", "stdout_hash": "abaff24c29779342cda4b9e34882ac7f0a0eb5effb7736c850e08b03", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form4-a6a0e27.json0000664000175000017500000000074115227365530023657 0ustar alastairalastair{ "basename": "ast-fixed_form4-a6a0e27", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form4.f", "infile_hash": "4b4c0ab80a461abdbde1e862272b59c0a86b2fc7685d3b60379457f7", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form4-a6a0e27.stdout", "stdout_hash": "b71d4f8dfff81c774615aa2d502b4576e561b208b3d73998faa71da2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-return_03-3f7087d.json0000664000175000017500000000107115227365530023407 0ustar alastairalastair{ "basename": "llvm-return_03-3f7087d", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/return_03.f90", "infile_hash": "c190c174edf4f26a3f53eaf52dec0323754909c2495aedbf30d13753", "outfile": null, "outfile_hash": null, "stdout": "llvm-return_03-3f7087d.stdout", "stdout_hash": "43e95fe72656d8993d3ed7ef431b5b4b9e74ba65da00a4bae440aaee", "stderr": "llvm-return_03-3f7087d.stderr", "stderr_hash": "3a3e7d555e7082b1df762706047d54b39d0484046e5f72bf507b2a3b", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-merge_bits_run-9579699.stderr0000664000175000017500000000031715227365530024624 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/merge_bits_run.f90:7:14 | 7 | print *, merge_bits(a, b, c) | ^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-template_sort_02-0aa4518.json0000664000175000017500000000077215227365530024554 0ustar alastairalastair{ "basename": "asr-template_sort_02-0aa4518", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_sort_02.f90", "infile_hash": "784d6d4e3ae91b1604cc477b388497c8298e6743c01bbefb61ecd409", "outfile": null, "outfile_hash": null, "stdout": "asr-template_sort_02-0aa4518.stdout", "stdout_hash": "44a4b69510bcfb8ae6981569024ec9afd9613d26c8e60a26dab8b02c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-rand_01-5739aee.stdout0000664000175000017500000000410015227365530023252 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { rand_01: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) rand_01 [] [(Assignment (Var 2 x) (IntrinsicElementalFunction Rand [] 0 (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-esub2-248f0df.stderr0000664000175000017500000000017315227365530023032 0ustar alastairalastairtokenizer error: Token '~' is not recognized --> tests/errors/esub2.f90:3:5 | 3 | x = ~1 | ^ token not recognized lfortran-0.64.0/tests/reference/c-program3-32749e4.json0000664000175000017500000000067215227365530022515 0ustar alastairalastair{ "basename": "c-program3-32749e4", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/program3.f90", "infile_hash": "f5e4a3f2a2a6f406171d0aa3895b5d7342c4d87b73ffede073827f34", "outfile": null, "outfile_hash": null, "stdout": "c-program3-32749e4.stdout", "stdout_hash": "dca2659bdfaea8181b9d34cd7070e45eb52d551e9f4b5f4c40fd5529", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-complex_to_complex_cast_fortran_codegen-d2ad266.f900000664000175000017500000000061515227365530032116 0ustar alastairalastairprogram implicitcomplextocomplexdifferentkindexample implicit none complex(4) :: complexvalue1 complex(8) :: complexvalue2 complexvalue1 = cmplx(1.00000000e+00, 2.00000000e+00, kind=4) complexvalue2 = cmplx(complexvalue1, kind=8) print *, "Complex Value 1 (Default Kind):", complexvalue1 print *, "Complex Value 2 (Kind=8):", complexvalue2 end program implicitcomplextocomplexdifferentkindexample lfortran-0.64.0/tests/reference/asr-intrinsics_28-7703b7d.json0000664000175000017500000000076115227365530024077 0ustar alastairalastair{ "basename": "asr-intrinsics_28-7703b7d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_28.f90", "infile_hash": "f45647d216365113f8bfc21ff79a6d9bad1d526431280aade87dd5b9", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_28-7703b7d.stdout", "stdout_hash": "68f5c5db715140fbb0d550987b7302af8fe5f221308c91bd85b19799", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-subroutine4-e2840c9.stdout0000664000175000017500000000170615227365530024233 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations template void triad(T0* a, T1* b, float scalar, T2* c); // Implementations template void triad(T0* a, T1* b, float scalar, T2* c) { int32_t i; int32_t n; n = a->data->extent(0); Kokkos::parallel_for(Kokkos::RangePolicy(1, n+1), KOKKOS_LAMBDA(const long i) { c->data->operator[](i - c->dims[0].lower_bound) = a->data->operator[](i - a->dims[0].lower_bound) + scalar*b->data->operator[](i - b->dims[0].lower_bound); }); } lfortran-0.64.0/tests/reference/wat-types_03-e07ce23.json0000664000175000017500000000072515227365530023130 0ustar alastairalastair{ "basename": "wat-types_03-e07ce23", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/types_03.f90", "infile_hash": "388683b8609d91d174ceb8c24787c982bf1ea22d342e94d44457b861", "outfile": null, "outfile_hash": null, "stdout": "wat-types_03-e07ce23.stdout", "stdout_hash": "b71ee4ae0bfeeacb0aa6a6c97ed4444e801a15fb3e1eb2f71f81514c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-operator_overloading_01-9ec8e71.stdout0000664000175000017500000007323315227365530026572 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { operator_overloading_01: (Program (SymbolTable 5 { bin_add: (ExternalSymbol 5 bin_add 2 bin_add operator_overloading_01_overload_asterisk_m [] bin_add Public ), f: (Variable 5 f [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Parameter (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), logical_and: (ExternalSymbol 5 logical_and 2 logical_and operator_overloading_01_overload_asterisk_m [] logical_and Public ), t: (Variable 5 t [] Local (LogicalConstant .true. (Logical 4) ) (LogicalConstant .true. (Logical 4) ) Parameter (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (ExternalSymbol 5 ~add 2 ~add operator_overloading_01_overload_asterisk_m [] ~add Public ), ~mul: (ExternalSymbol 5 ~mul 2 ~mul operator_overloading_01_overload_asterisk_m [] ~mul Public ) }) operator_overloading_01 [operator_overloading_01_overload_asterisk_m] [(Print (StringFormat () [(StringConstant "T*T:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 t) Mul (Var 5 t) (Logical 4) () (FunctionCall 5 logical_and 5 ~mul [((Var 5 t)) ((Var 5 t))] (Logical 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "T*F:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 t) Mul (Var 5 f) (Logical 4) () (FunctionCall 5 logical_and 5 ~mul [((Var 5 t)) ((Var 5 f))] (Logical 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "F*T:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 f) Mul (Var 5 t) (Logical 4) () (FunctionCall 5 logical_and 5 ~mul [((Var 5 f)) ((Var 5 t))] (Logical 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "F*F:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 f) Mul (Var 5 f) (Logical 4) () (FunctionCall 5 logical_and 5 ~mul [((Var 5 f)) ((Var 5 f))] (Logical 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "T+T:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 t) Add (Var 5 t) (Logical 4) () (FunctionCall 5 bin_add 5 ~add [((Var 5 t)) ((Var 5 t))] (Integer 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "T+F:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 t) Add (Var 5 f) (Logical 4) () (FunctionCall 5 bin_add 5 ~add [((Var 5 t)) ((Var 5 f))] (Integer 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "F+T:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 f) Add (Var 5 t) (Logical 4) () (FunctionCall 5 bin_add 5 ~add [((Var 5 f)) ((Var 5 t))] (Integer 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "F+F:" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (OverloadedBinOp (Var 5 f) Add (Var 5 f) (Logical 4) () (FunctionCall 5 bin_add 5 ~add [((Var 5 f)) ((Var 5 f))] (Integer 4) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), operator_overloading_01_overload_asterisk_m: (Module (SymbolTable 2 { bin_add: (Function (SymbolTable 4 { bin_add: (Variable 4 bin_add [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), log1: (Variable 4 log1 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), log2: (Variable 4 log2 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bin_add (FunctionType [(Logical 4) (Logical 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 log1) (Var 4 log2)] [(If () (LogicalBinOp (Var 4 log1) And (Var 4 log2) (Logical 4) () ) [(Assignment (Var 4 bin_add) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. )] [(If () (LogicalBinOp (LogicalNot (Var 4 log1) (Logical 4) () ) And (LogicalNot (Var 4 log2) (Logical 4) () ) (Logical 4) () ) [(Assignment (Var 4 bin_add) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] [(Assignment (Var 4 bin_add) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. )] )] )] (Var 4 bin_add) Public .true. .true. () ), logical_and: (Function (SymbolTable 3 { log1: (Variable 3 log1 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), log2: (Variable 3 log2 [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), logical_and: (Variable 3 logical_and [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) logical_and (FunctionType [(Logical 4) (Logical 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 log1) (Var 3 log2)] [(Assignment (Var 3 logical_and) (LogicalBinOp (Var 3 log1) And (Var 3 log2) (Logical 4) () ) () .false. .false. )] (Var 3 logical_and) Public .true. .true. () ), ~add: (CustomOperator 2 ~add [2 bin_add] Public ), ~mul: (CustomOperator 2 ~mul [2 logical_and] Public ) }) operator_overloading_01_overload_asterisk_m () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-submodule_01-2524ba9.stdout0000664000175000017500000004723215227365530024252 0ustar alastairalastair(TranslationUnit [(Module m1 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [(DerivedType Base [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [] ) (Interface (InterfaceHeader) () [(InterfaceProc (Subroutine sub1 [(i) (b)] [(SimpleAttribute AttrModule )] () (TriviaNode [(EOLComment "! Module procedure interface body for sub1" )] [] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [(AttrIntent In )] [(b [] [] () () None ())] () )] [] [] [] ) )] )] [] [] ) (Module m2 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(Use [] m1 [] .false. (TriviaNode [] [(EOLComment "! Use association of module m1" ) (EndOfLine)] ) )] [] [(Interface (InterfaceHeader) () [(InterfaceProc (Function func1 [] [(AttrType TypeReal [] () () None ) (SimpleAttribute AttrModule )] () () (TriviaNode [(EOLComment "! Module procedure interface body for func1" )] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) ) (InterfaceProc (Function func2 [(b)] [(SimpleAttribute AttrModule )] () () (TriviaNode [(EOLComment "! Module procedure interface body for func2" )] [] ) [] [] [] [(Declaration (AttrType TypeType [] () Base None ) [] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [] [(func2 [] [] () () None ())] () )] [] [] [] ) )] )] [] [] ) (Module m4 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(Use [] m1 [] .false. (TriviaNode [] [(EOLComment "! Use association of module m1" )] ) )] [] [(DerivedType NewType [] () [(AttrExtends Base )] [(Declaration (AttrType TypeReal [] () () None ) [] [(j [] [] () () None ())] () )] [] )] [] [] ) (Submodule m1 () m1sub (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(Use [] m4 [] .false. (TriviaNode [] [(EOLComment "! Use association of module m4" ) (EndOfLine)] ) )] [] [] [] [(Subroutine sub1 [(i) (b)] [(SimpleAttribute AttrModule )] () (TriviaNode [(EOLComment "! Implementation of sub1 declared in m1" )] [] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [(AttrIntent In )] [(b [] [] () () None ())] () )] [(Print 0 () [(String "sub1" ()) i b] () )] [] [] )] ) (Submodule m2 () m2sub (TriviaNode [(EndOfLine) (EndOfLine)] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Function func1 [] [(AttrType TypeReal [] () () None ) (SimpleAttribute AttrModule )] () () (TriviaNode [(EOLComment "! Implementation of func1 declared in m2" )] [] ) [] [] [] [] [(Assignment 0 func1 20 () )] [] [] )] ) (Submodule m2 m2sub m2sub2 (TriviaNode [(EndOfLine) (EndOfLine)] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Function func2 [(b)] [(SimpleAttribute AttrModule )] () () (TriviaNode [(EOLComment "! Implementation of func2 declared in m2" )] [] ) [] [] [] [(Declaration (AttrType TypeType [] () Base None ) [] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [] [(func2 [] [] () () None ())] () )] [(Assignment 0 func2 b () )] [] [] )] ) (Module m3 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [(Interface (InterfaceHeader) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceProc (Subroutine interfaceSub1 [(i) (b)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(Use [] m1 [] .false. () )] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [(AttrIntent In )] [(b [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function interfaceFunc1 [] [(AttrType TypeReal [] () () None )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) ) (InterfaceProc (Function interfaceFunc2 [(b)] [] () () () [(Use [] m1 [] .false. () )] [] [] [(Declaration (AttrType TypeType [] () Base None ) [] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () Base None ) [] [(interfaceFunc2 [] [] () () None ())] () )] [] [] [] ) )] ) (DerivedType Container [] () [] [(Declaration (AttrType TypeProcedure [] () interfaceSub1 None ) [(SimpleAttribute AttrNoPass ) (SimpleAttribute AttrPointer )] [(pp1 [] [] () () None ())] () ) (Declaration (AttrType TypeProcedure [] () interfaceFunc1 None ) [(SimpleAttribute AttrNoPass ) (SimpleAttribute AttrPointer )] [(pp2 [] [] () () None ())] () ) (Declaration (AttrType TypeProcedure [] () interfaceFunc2 None ) [(SimpleAttribute AttrNoPass ) (SimpleAttribute AttrPointer )] [(pp3 [] [] () () None ())] () )] [] )] [] [] ) (Program example () [(Use [] m1 [] .false. () ) (Use [] m2 [] .false. () ) (Use [] m3 [] .false. () )] [] [(Declaration (AttrType TypeType [] () Container None ) [] [(c1 [] [] () () None ())] () )] [(Associate 0 pp1 [(c1 [])] sub1 () ) (Associate 0 pp2 [(c1 [])] func1 () ) (Associate 0 pp3 [(c1 [])] func2 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (SubroutineCall 0 pp1 [(c1 [])] [(() 10 () 0) (() (FuncCallOrArray Base [] [(() 11 () 0)] [] [] [] ) () 0)] [] [] () ) (Print 0 () [(String "func1" ()) (FuncCallOrArray int [] [(() (FuncCallOrArray pp2 [(c1 [])] [] [] [] [] ) () 0)] [] [] [] )] () ) (Print 0 () [(String "func2" ()) (FuncCallOrArray pp3 [(c1 [])] [(() (FuncCallOrArray Base [] [(() 5 () 0)] [] [] [] ) () 0)] [] [] [] )] () )] [] )] ) lfortran-0.64.0/tests/reference/ast-do_concurrent1-5fba0ee.json0000664000175000017500000000073715227365530024545 0ustar alastairalastair{ "basename": "ast-do_concurrent1-5fba0ee", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do_concurrent1.f90", "infile_hash": "455e5c83afb64c2316e774aadd27b3dbc48f7ee10948365b50d4e90f", "outfile": null, "outfile_hash": null, "stdout": "ast-do_concurrent1-5fba0ee.stdout", "stdout_hash": "41f5b2b2c7e84cc8cc5f59eade38977ef46539b619a0508a54e17c91", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-types_02-48df0cb.stdout0000664000175000017500000000531115227365530023556 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 f32) i32.const 1 local.set 0 f32.const 1.000000 local.set 1 local.get 0 f32.convert_i32_s local.set 1 i32.const 0 call 0 return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/ast-string_02-604c7cc.stdout0000664000175000017500000000470715227365530023643 0ustar alastairalastair(TranslationUnit [(Program string_02 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeCharacter [(len 15 Value)] () () None ) [] [(surname [] [] () () None ()) (firstname [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 6 Value)] () () None ) [] [(title [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 25 Value)] () () None ) [] [(greetings [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 title (String "Mr. " ()) () ) (Assignment 0 firstname (String "Rowan " ()) () ) (Assignment 0 surname (String "Atkinson" ()) () ) (Assignment 0 greetings (String "A big hello from Mr. Bean" ()) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 0 () [(String "Here is " ()) title firstname surname] () ) (Print 0 () [greetings] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/wat-wasm_bind_js-d9f341f.json0000664000175000017500000000071415227365530024127 0ustar alastairalastair{ "basename": "wat-wasm_bind_js-d9f341f", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/wasm_bind_js.f90", "infile_hash": "e26eef4b7e209dcce2ee67f743a603d31dacb3a2f880959d0520ab0b", "outfile": null, "outfile_hash": null, "stdout": "wat-wasm_bind_js-d9f341f.stdout", "stdout_hash": "f8931d739d3d15c5609c413d1b5281a677ff5825751ee9fc9c296062", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope2-64078e2.stdout0000664000175000017500000000332215227365530027336 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 1 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. )] () Public .false. .false. () ), x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/julia-case_03-b4597f9.stdout0000664000175000017500000000101715227365530023515 0ustar alastairalastairfunction main() local a::Int32 = 1 local b::Int32 = 2 local marks::Int32 marks = 94 if marks ≥ 40 + b println("Pass!") elseif marks ≤ 39 - a println("Failed!") else println("Invalid marks") end println("Your marks are ", " ", marks) marks = -1 if marks ≥ 40 + b println("Pass!") elseif 0 ≤ marks ≤ 39 - a println("Failed!") else println("Invalid marks") end println("Your marks are ", " ", marks) end main() lfortran-0.64.0/tests/reference/julia-goto_01-f5b96fb.stdout0000664000175000017500000000015515227365530023704 0ustar alastairalastairfunction main() local a::Int32 a = 5 @goto label_1 @label label_1 println(a) end main() lfortran-0.64.0/tests/reference/asr-bits_01-2906c1d.json0000664000175000017500000000073715227365530022640 0ustar alastairalastair{ "basename": "asr-bits_01-2906c1d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bits_01.f90", "infile_hash": "4fdd6c630a9f2559417372a42cca1dc1c98fa7af4e4a5442ebf9ca96", "outfile": null, "outfile_hash": null, "stdout": "asr-bits_01-2906c1d.stdout", "stdout_hash": "cc11fd2915ee4a4307628d44a5216f208a71ff481cb5cf96019dcd4a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-end_sub_name-b8abc97.json0000664000175000017500000000074015227365530024157 0ustar alastairalastair{ "basename": "asr-end_sub_name-b8abc97", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/end_sub_name.f90", "infile_hash": "e009a66d5776bac360c38e64071c0d20593c8162a0c40cbf5bf4e5c2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-end_sub_name-b8abc97.stderr", "stderr_hash": "8ae9de8fb9af77931f3d42b61fe8c02ed1ae3c97af115ef36c01cfec", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-block_data1-d563f39.stdout0000664000175000017500000000600115227365530024117 0ustar alastairalastair(TranslationUnit [(BlockData init (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Implicit [(ImplicitSpec (AttrType TypeInteger [] () () None ) [(LetterSpec a z )] )] () )] [(Declaration () [(AttrCommon [(range [(x0 [] [] () x0 None ()) (x1 [] [] () x1 None ())])] )] [] () )] [(DataStmt 0 [(DataStmtSet [x0 x1] [1 10] )] () )] ) (Program block_data1 () [] [(Implicit [(ImplicitSpec (AttrType TypeInteger [] () () None ) [(LetterSpec a z )] )] () )] [(Declaration () [(AttrCommon [(range [(x0 [] [] () x0 None ()) (x1 [] [] () x1 None ())])] )] [] () )] [(Print 0 () [(String "Printing Even number in the Range: " ()) x0 (String " to " ()) x1] () ) (DoLoop 0 () 0 i x0 x1 () [(If 0 () (/= (FuncCallOrArray mod [] [(() i () 0) (() 2 () 0)] [] [] [] ) 0) [(Cycle 0 () () )] [] () () () ) (Write 0 [(()) (())] [] [i] () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/julia-arrays_03_func-7271066.json0000664000175000017500000000075515227365530024400 0ustar alastairalastair{ "basename": "julia-arrays_03_func-7271066", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/arrays_03_func.f90", "infile_hash": "9feab893fd240821f352bd8b0c12cb132cf39c706950d08f5a41cc54", "outfile": null, "outfile_hash": null, "stdout": "julia-arrays_03_func-7271066.stdout", "stdout_hash": "36668a9b901903a1f4bdf1ca84002218176776fbfd1b58563b5fbde4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-global_scope3-45d8bdc.json0000664000175000017500000000073415227365530024257 0ustar alastairalastair{ "basename": "ast-global_scope3-45d8bdc", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/global_scope3.f90", "infile_hash": "60cea65abfbb2228d16f175ea192462ae2379d7a9da1601cb3de9f3a", "outfile": null, "outfile_hash": null, "stdout": "ast-global_scope3-45d8bdc.stdout", "stdout_hash": "a4607a718fd06859a1e6c80fa4f797a17bd2900ba09788612fd76d33", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_35-5fba3e7.stdout0000664000175000017500000004764415227365530024103 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { m_cli2_21: (Module (SymbolTable 2 { get_args_fixed_length_a_array: (Function (SymbolTable 3 { place: (Variable 3 place [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), strings: (Variable 3 strings [] Unspecified () () Default (Allocatable (Array (String 1 () AssumedLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), strings_a: (Variable 3 strings_a [] Local () () Default (Allocatable (Array (String 1 () DeferredLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_args_fixed_length_a_array (FunctionType [(Allocatable (Array (String 1 () AssumedLength DescriptorString) [(() ())] DescriptorArray ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 strings)] [(Allocate [((Var 3 strings_a) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] (IntegerConstant 5 (Integer 4) Decimal) () (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (If () (IntegerCompare (Var 3 place) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(If () (IntegerCompare (StringLen (ArrayItem (Var 3 strings_a) [(() (ArrayBound (Var 3 strings_a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) ())] (String 1 () DeferredLength DescriptorString) ColMajor () ) (Integer 4) () ) LtE (StringLen (ArrayItem (Var 3 strings) [(() (ArrayBound (Var 3 strings) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) ())] (String 1 () AssumedLength DescriptorString) ColMajor () ) (Integer 4) () ) (Logical 4) () ) [(Assignment (Var 3 strings) (Var 3 strings_a) () .false. .false. )] [(Assignment (Var 3 strings) (ArrayConstructor [] (Array (String 1 (StringLen (ArrayItem (Var 3 strings) [(() (ArrayBound (Var 3 strings) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) ())] (String 1 () AssumedLength DescriptorString) ColMajor () ) (Integer 4) () ) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] PointerArray ) () ColMajor () ) () .false. .false. )] )] [] ) (If () (IntegerCompare (Var 3 place) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 3 strings) (ArrayConstructor [] (Array (String 1 (StringLen (ArrayItem (Var 3 strings) [(() (ArrayBound (Var 3 strings) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) ())] (String 1 () AssumedLength DescriptorString) ColMajor () ) (Integer 4) () ) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] PointerArray ) () ColMajor () ) () .false. .false. )] [] )] () Public .true. .true. () ) }) m_cli2_21 () [] .false. .false. .false. ), modules_35: (Program (SymbolTable 4 { get_args_fixed_length_a_array: (ExternalSymbol 4 get_args_fixed_length_a_array 2 get_args_fixed_length_a_array m_cli2_21 [] get_args_fixed_length_a_array Public ), string: (Variable 4 string [] Local () () Default (Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) modules_35 [m_cli2_21] [(Allocate [((Var 4 string) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] () () ())] () () () ) (Print (StringConstant "executing modules_35" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (SubroutineCall 4 get_args_fixed_length_a_array () [((Var 4 string))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-string_binop-415f1fa.stderr0000664000175000017500000000030515227365530024474 0ustar alastairalastairsemantic error: Binary numeric operators cannot be used on strings --> tests/errors/string_binop.f90:1:10 | 1 | print *, "a" + "b" | ^^^^^^^^^ help: use '//' for string concatenation lfortran-0.64.0/tests/reference/run-format_31-1180df5.stdout0000664000175000017500000000130615227365530023553 0ustar alastairalastair-------------------------------------------------------------------------------- value=4096, value(bits)=00000000000000000001000000000000 , trailz= 12 value= 1, value(bits)=00000000000000000000000000000001 , trailz= 0 00000000000000000001000000000000 0001000000000000 1000000000000 1000000000000 -------------------------------------------------------------------------------- value= 112, value(bits)=00000000000000000000000001110000 , trailz= 4 value= 7, value(bits)=00000000000000000000000000000111 , trailz= 0 00000000000000000001000000000000 0001000000000000 1000000000000 1000000000000 lfortran-0.64.0/tests/reference/ast-data_01-dc2d917.stdout0000664000175000017500000001763115227365530023251 0ustar alastairalastair(TranslationUnit [(Program data_01 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ()) (td [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(y [] [] () () None ()) (z [] [] () () None ()) (c1 [(1 4 DimensionExpr)] [] () () None ()) (bf1 [] [] () () None ()) (xx90 [] [] () () None ()) (xx95 [] [] () () None ()) (b [] [] () () None ()) (p [] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [x td b] [1 4 3] )] () ) (DataStmt 0 [(DataStmtSet [y z] [(Real "2.0") (Real "3.0")] )] () ) (DataStmt 0 [(DataStmtSet [c1] [(Real "0.0") (Real "0.22") (u- (Real "0.14")) (u- (Real "0.21"))] )] () ) (DataStmt 0 [(DataStmtSet [bf1] [(Real "0.8")] ) (DataStmtSet [xx90 xx95] [(Real "0.55") (Real "0.62")] )] () ) (Print 0 () [x y z] () ) (If 0 () (/= x 1) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- y (Real "2.0")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- z (Real "3.0")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray c1 [] [(() 1 () 0)] [] [] [] ) (Real "0.0")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- (FuncCallOrArray c1 [] [(() 2 () 0)] [] [] [] ) (Real "0.22")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (+ (FuncCallOrArray c1 [] [(() 4 () 0)] [] [] [] ) (Real "0.21")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- bf1 (Real "0.8")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- xx90 (Real "0.55")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- xx95 (Real "0.62")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 p (** b (- td 1)) () ) (If 0 () (> (FuncCallOrArray abs [] [(() (- p (Real "27.0")) () 0)] [] [] [] ) (Real "1e-5")) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-types_14-79df2e1.stdout0000664000175000017500000000656215227365530023513 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { iso_fortran_env: (IntrinsicModule lfortran_intrinsic_iso_fortran_env), types_14: (Program (SymbolTable 2 { dp: (ExternalSymbol 2 dp 4 real64 lfortran_intrinsic_iso_fortran_env [] real64 Public ), r: (Variable 2 r [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 2 s [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) types_14 [iso_fortran_env] [(Assignment (Var 2 r) (RealConstant 1.000000 (Real 8) ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-continue_compilation_1-04b6d40.json0000664000175000017500000000101615227365530026023 0ustar alastairalastair{ "basename": "asr-continue_compilation_1-04b6d40", "cmd": "lfortran --semantics-only --continue-compilation --no-color {infile}", "infile": "tests/errors/continue_compilation_1.f90", "infile_hash": "1375a9cc7a5d23c1c5398614d3cbeb9432b68604fa0ec6423ca7d5f7", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-continue_compilation_1-04b6d40.stderr", "stderr_hash": "113e47f2ec08e1cc76a53a167177c43402a6139bcce3acc77e800f5c", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-modules_43-d01691f.stdout0000664000175000017500000007215215227365530023730 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_43: (Program (SymbolTable 5 { add_sources_from_dir: (ExternalSymbol 5 add_sources_from_dir 2 add_sources_from_dir modules_43_fpm_sources [] add_sources_from_dir Public ), sources: (Variable 5 sources [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 5 srcfile_t Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), srcfile_t: (ExternalSymbol 5 srcfile_t 2 srcfile_t modules_43_fpm_sources [] srcfile_t Public ) }) modules_43 [modules_43_fpm_sources] [(Allocate [((Var 5 sources) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] () () ())] () () () ) (SubroutineCall 5 add_sources_from_dir () [((Var 5 sources))] () .false. )] ), modules_43_fpm_sources: (Module (SymbolTable 2 { add_sources_from_dir: (Function (SymbolTable 4 { dir_sources: (Variable 4 dir_sources [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 srcfile_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), exclude_source: (Variable 4 exclude_source [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sources: (Variable 4 sources [] InOut () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 srcfile_t Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) add_sources_from_dir (FunctionType [(Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 sources)] [(Allocate [((Var 4 dir_sources) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] () () ())] () () () ) (If () (LogicalNot (IntrinsicImpureFunction Allocated [(Var 4 sources)] 0 (Logical 4) () ) (Logical 4) () ) [(Assignment (Var 4 sources) (IntrinsicArrayFunction Pack [(Var 4 dir_sources) (ArrayPhysicalCast (LogicalNot (Var 4 exclude_source) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray DescriptorArray (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )] 2 (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) ) () ) () .false. .false. )] [(Assignment (Var 4 sources) (ArrayConstructor [(Var 4 sources) (IntrinsicArrayFunction Pack [(Var 4 dir_sources) (ArrayPhysicalCast (LogicalNot (Var 4 exclude_source) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray DescriptorArray (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )] 2 (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [(() ())] DescriptorArray ) ) () )] (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) ())] DescriptorArray ) () ColMajor () ) () .false. .false. )] )] () Public .true. .true. () ), srcfile_t: (Struct (SymbolTable 3 { digest: (Variable 3 digest [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), exe_name: (Variable 3 exe_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_name: (Variable 3 file_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) srcfile_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 8)] [] .true. .false. ) [] [file_name exe_name digest] [] Source Public .false. .false. .false. [] () () [] ) }) modules_43_fpm_sources () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form1-7fa677f.stdout0000664000175000017500000012321015227365530024244 0ustar alastairalastair(TranslationUnit [(Subroutine dqawse [(f) (a) (b) (alfa) (beta) (integr) (epsabs) (epsrel) (limit) (result) (abserr) (neval) (ier) (alist) (blist) (rlist) (elist) (iord) (last)] [] () () [] [] [] [(Declaration (AttrType TypeDoublePrecision [] () () None ) [] [(a [] [] () () None ()) (abserr [] [] () () None ()) (alfa [] [] () () None ()) (alist [] [] () () None ()) (area [] [] () () None ()) (area1 [] [] () () None ()) (area12 [] [] () () None ()) (area2 [] [] () () None ()) (a1 [] [] () () None ()) (a2 [] [] () () None ()) (b [] [] () () None ()) (beta [] [] () () None ()) (blist [] [] () () None ()) (b1 [] [] () () None ()) (b2 [] [] () () None ()) (centre [] [] () () None ()) (dabs [] [] () () None ()) (dmax1 [] [] () () None ()) (d1mach [] [] () () None ()) (elist [] [] () () None ()) (epmach [] [] () () None ()) (epsabs [] [] () () None ()) (epsrel [] [] () () None ()) (errbnd [] [] () () None ()) (errmax [] [] () () None ()) (error1 [] [] () () None ()) (erro12 [] [] () () None ()) (error2 [] [] () () None ()) (errsum [] [] () () None ()) (f [] [] () () None ()) (resas1 [] [] () () None ()) (resas2 [] [] () () None ()) (result [] [] () () None ()) (rg [] [] () () None ()) (rh [] [] () () None ()) (ri [] [] () () None ()) (rj [] [] () () None ()) (rlist [] [] () () None ()) (uflow [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(ier [] [] () () None ()) (integr [] [] () () None ()) (iord [] [] () () None ()) (iroff1 [] [] () () None ()) (iroff2 [] [] () () None ()) (k [] [] () () None ()) (last [] [] () () None ()) (limit [] [] () () None ()) (maxerr [] [] () () None ()) (nev [] [] () () None ()) (neval [] [] () () None ()) (nrmax [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrExternal )] [(f [] [] () () None ())] () ) (Declaration () [(AttrDimension [] )] [(alist [(1 limit DimensionExpr)] [] () () None ()) (blist [(1 limit DimensionExpr)] [] () () None ()) (rlist [(1 limit DimensionExpr)] [] () () None ()) (elist [(1 limit DimensionExpr)] [] () () None ()) (iord [(1 limit DimensionExpr)] [] () () None ()) (ri [(1 25 DimensionExpr)] [] () () None ()) (rj [(1 25 DimensionExpr)] [] () () None ()) (rh [(1 25 DimensionExpr)] [] () () None ()) (rg [(1 25 DimensionExpr)] [] () () None ())] () )] [(Assignment 0 epmach (FuncCallOrArray d1mach [] [(() 4 () 0)] [] [] [] ) () ) (Assignment 0 uflow (FuncCallOrArray d1mach [] [(() 1 () 0)] [] [] [] ) () ) (Assignment 0 ier 6 () ) (Assignment 0 neval 0 () ) (Assignment 0 last 0 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() 1 () 0)] [] [] [] ) (Real "0.0d+00") () ) (Assignment 0 (FuncCallOrArray elist [] [(() 1 () 0)] [] [] [] ) (Real "0.0d+00") () ) (Assignment 0 (FuncCallOrArray iord [] [(() 1 () 0)] [] [] [] ) 0 () ) (Assignment 0 result (Real "0.0d+00") () ) (Assignment 0 abserr (Real "0.0d+00") () ) (If 0 () (BoolOp (BoolOp (BoolOp (BoolOp (BoolOp (BoolOp (<= b a) Or (BoolOp (== epsabs (Real "0.0d+00")) And (< epsrel (FuncCallOrArray dmax1 [] [(() (* (Real "0.5d+02") epmach) () 0) (() (Real "0.5d-28") () 0)] [] [] [] )) ) ) Or (<= alfa (u- (Real "0.1d+01"))) ) Or (<= beta (u- (Real "0.1d+01"))) ) Or (< integr 1) ) Or (> integr 4) ) Or (< limit 2) ) [(GoTo 0 () 999 [] () )] [] () () () ) (Assignment 0 ier 0 () ) (SubroutineCall 0 dqmomo [] [(() alfa () 0) (() beta () 0) (() ri () 0) (() rj () 0) (() rg () 0) (() rh () 0) (() integr () 0)] [] [] () ) (Assignment 0 centre (* (Real "0.5d+00") (+ b a)) () ) (SubroutineCall 0 dqc25s [] [(() f () 0) (() a () 0) (() b () 0) (() a () 0) (() centre () 0) (() alfa () 0) (() beta () 0) (() ri () 0) (() rj () 0) (() rg () 0) (() rh () 0) (() area1 () 0) (() error1 () 0) (() resas1 () 0) (() integr () 0) (() nev () 0)] [] [] () ) (Assignment 0 neval nev () ) (SubroutineCall 0 dqc25s [] [(() f () 0) (() a () 0) (() b () 0) (() centre () 0) (() b () 0) (() alfa () 0) (() beta () 0) (() ri () 0) (() rj () 0) (() rg () 0) (() rh () 0) (() area2 () 0) (() error2 () 0) (() resas2 () 0) (() integr () 0) (() nev () 0)] [] [] () ) (Assignment 0 last 2 () ) (Assignment 0 neval (+ neval nev) () ) (Assignment 0 result (+ area1 area2) () ) (Assignment 0 abserr (+ error1 error2) () ) (Assignment 0 errbnd (FuncCallOrArray dmax1 [] [(() epsabs () 0) (() (* epsrel (FuncCallOrArray dabs [] [(() result () 0)] [] [] [] )) () 0)] [] [] [] ) () ) (If 0 () (> error2 error1) [(GoTo 0 () 10 [] () )] [] () () () ) (Assignment 0 (FuncCallOrArray alist [] [(() 1 () 0)] [] [] [] ) a () ) (Assignment 0 (FuncCallOrArray alist [] [(() 2 () 0)] [] [] [] ) centre () ) (Assignment 0 (FuncCallOrArray blist [] [(() 1 () 0)] [] [] [] ) centre () ) (Assignment 0 (FuncCallOrArray blist [] [(() 2 () 0)] [] [] [] ) b () ) (Assignment 0 (FuncCallOrArray rlist [] [(() 1 () 0)] [] [] [] ) area1 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() 2 () 0)] [] [] [] ) area2 () ) (Assignment 0 (FuncCallOrArray elist [] [(() 1 () 0)] [] [] [] ) error1 () ) (Assignment 0 (FuncCallOrArray elist [] [(() 2 () 0)] [] [] [] ) error2 () ) (GoTo 0 () 20 [] () ) (Assignment 10 (FuncCallOrArray alist [] [(() 1 () 0)] [] [] [] ) centre () ) (Assignment 0 (FuncCallOrArray alist [] [(() 2 () 0)] [] [] [] ) a () ) (Assignment 0 (FuncCallOrArray blist [] [(() 1 () 0)] [] [] [] ) b () ) (Assignment 0 (FuncCallOrArray blist [] [(() 2 () 0)] [] [] [] ) centre () ) (Assignment 0 (FuncCallOrArray rlist [] [(() 1 () 0)] [] [] [] ) area2 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() 2 () 0)] [] [] [] ) area1 () ) (Assignment 0 (FuncCallOrArray elist [] [(() 1 () 0)] [] [] [] ) error2 () ) (Assignment 0 (FuncCallOrArray elist [] [(() 2 () 0)] [] [] [] ) error1 () ) (Assignment 20 (FuncCallOrArray iord [] [(() 1 () 0)] [] [] [] ) 1 () ) (Assignment 0 (FuncCallOrArray iord [] [(() 2 () 0)] [] [] [] ) 2 () ) (If 0 () (== limit 2) [(Assignment 0 ier 1 () )] [] () () () ) (If 0 () (BoolOp (<= abserr errbnd) Or (== ier 1) ) [(GoTo 0 () 999 [] () )] [] () () () ) (Assignment 0 errmax (FuncCallOrArray elist [] [(() 1 () 0)] [] [] [] ) () ) (Assignment 0 maxerr 1 () ) (Assignment 0 nrmax 1 () ) (Assignment 0 area result () ) (Assignment 0 errsum abserr () ) (Assignment 0 iroff1 0 () ) (Assignment 0 iroff2 0 () ) (DoLoop 0 () 60 last 3 limit () [(Assignment 0 a1 (FuncCallOrArray alist [] [(() maxerr () 0)] [] [] [] ) () ) (Assignment 0 b1 (* (Real "0.5d+00") (+ (FuncCallOrArray alist [] [(() maxerr () 0)] [] [] [] ) (FuncCallOrArray blist [] [(() maxerr () 0)] [] [] [] ))) () ) (Assignment 0 a2 b1 () ) (Assignment 0 b2 (FuncCallOrArray blist [] [(() maxerr () 0)] [] [] [] ) () ) (SubroutineCall 0 dqc25s [] [(() f () 0) (() a () 0) (() b () 0) (() a1 () 0) (() b1 () 0) (() alfa () 0) (() beta () 0) (() ri () 0) (() rj () 0) (() rg () 0) (() rh () 0) (() area1 () 0) (() error1 () 0) (() resas1 () 0) (() integr () 0) (() nev () 0)] [] [] () ) (Assignment 0 neval (+ neval nev) () ) (SubroutineCall 0 dqc25s [] [(() f () 0) (() a () 0) (() b () 0) (() a2 () 0) (() b2 () 0) (() alfa () 0) (() beta () 0) (() ri () 0) (() rj () 0) (() rg () 0) (() rh () 0) (() area2 () 0) (() error2 () 0) (() resas2 () 0) (() integr () 0) (() nev () 0)] [] [] () ) (Assignment 0 neval (+ neval nev) () ) (Assignment 0 area12 (+ area1 area2) () ) (Assignment 0 erro12 (+ error1 error2) () ) (Assignment 0 errsum (- (+ errsum erro12) errmax) () ) (Assignment 0 area (- (+ area area12) (FuncCallOrArray rlist [] [(() maxerr () 0)] [] [] [] )) () ) (If 0 () (BoolOp (== a a1) Or (== b b2) ) [(GoTo 0 () 30 [] () )] [] () () () ) (If 0 () (BoolOp (== resas1 error1) Or (== resas2 error2) ) [(GoTo 0 () 30 [] () )] [] () () () ) (If 0 () (BoolOp (< (FuncCallOrArray dabs [] [(() (- (FuncCallOrArray rlist [] [(() maxerr () 0)] [] [] [] ) area12) () 0)] [] [] [] ) (* (Real "0.1d-04") (FuncCallOrArray dabs [] [(() area12 () 0)] [] [] [] ))) And (>= erro12 (* (Real "0.99d+00") errmax)) ) [(Assignment 0 iroff1 (+ iroff1 1) () )] [] () () () ) (If 0 () (BoolOp (> last 10) And (> erro12 errmax) ) [(Assignment 0 iroff2 (+ iroff2 1) () )] [] () () () ) (Assignment 30 (FuncCallOrArray rlist [] [(() maxerr () 0)] [] [] [] ) area1 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() last () 0)] [] [] [] ) area2 () ) (Assignment 0 errbnd (FuncCallOrArray dmax1 [] [(() epsabs () 0) (() (* epsrel (FuncCallOrArray dabs [] [(() area () 0)] [] [] [] )) () 0)] [] [] [] ) () ) (If 0 () (<= errsum errbnd) [(GoTo 0 () 35 [] () )] [] () () () ) (If 0 () (== last limit) [(Assignment 0 ier 1 () )] [] () () () ) (If 0 () (BoolOp (>= iroff1 6) Or (>= iroff2 20) ) [(Assignment 0 ier 2 () )] [] () () () ) (If 0 () (<= (FuncCallOrArray dmax1 [] [(() (FuncCallOrArray dabs [] [(() a1 () 0)] [] [] [] ) () 0) (() (FuncCallOrArray dabs [] [(() b2 () 0)] [] [] [] ) () 0)] [] [] [] ) (* (+ (Real "0.1d+01") (* (Real "0.1d+03") epmach)) (+ (FuncCallOrArray dabs [] [(() a2 () 0)] [] [] [] ) (* (Real "0.1d+04") uflow)))) [(Assignment 0 ier 3 () )] [] () () () ) (If 35 () (> error2 error1) [(GoTo 0 () 40 [] () )] [] () () () ) (Assignment 0 (FuncCallOrArray alist [] [(() last () 0)] [] [] [] ) a2 () ) (Assignment 0 (FuncCallOrArray blist [] [(() maxerr () 0)] [] [] [] ) b1 () ) (Assignment 0 (FuncCallOrArray blist [] [(() last () 0)] [] [] [] ) b2 () ) (Assignment 0 (FuncCallOrArray elist [] [(() maxerr () 0)] [] [] [] ) error1 () ) (Assignment 0 (FuncCallOrArray elist [] [(() last () 0)] [] [] [] ) error2 () ) (GoTo 0 () 50 [] () ) (Assignment 40 (FuncCallOrArray alist [] [(() maxerr () 0)] [] [] [] ) a2 () ) (Assignment 0 (FuncCallOrArray alist [] [(() last () 0)] [] [] [] ) a1 () ) (Assignment 0 (FuncCallOrArray blist [] [(() last () 0)] [] [] [] ) b1 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() maxerr () 0)] [] [] [] ) area2 () ) (Assignment 0 (FuncCallOrArray rlist [] [(() last () 0)] [] [] [] ) area1 () ) (Assignment 0 (FuncCallOrArray elist [] [(() maxerr () 0)] [] [] [] ) error2 () ) (Assignment 0 (FuncCallOrArray elist [] [(() last () 0)] [] [] [] ) error1 () ) (SubroutineCall 50 dqpsrt [] [(() limit () 0) (() last () 0) (() maxerr () 0) (() errmax () 0) (() elist () 0) (() iord () 0) (() nrmax () 0)] [] [] () ) (If 0 () (BoolOp (/= ier 0) Or (<= errsum errbnd) ) [(GoTo 0 () 70 [] () )] [] () () () )] () () ) (Assignment 70 result (Real "0.0d+00") () ) (DoLoop 0 () 80 k 1 last () [(Assignment 0 result (+ result (FuncCallOrArray rlist [] [(() k () 0)] [] [] [] )) () )] () () ) (Assignment 0 abserr errsum () ) (Return 999 () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-arrays_01-5f1c776.json0000664000175000017500000000074515227365530023211 0ustar alastairalastair{ "basename": "asr-arrays_01-5f1c776", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01.f90", "infile_hash": "f7df4142feb383f836dfa072a60673922e8873b5695f893be8329b89", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_01-5f1c776.stdout", "stdout_hash": "bd8d2ac52f256df5d934cbcb51d61ebeb398e26d4128e148679bfc70", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-case_03-e03f722.json0000664000175000017500000000073715227365530022614 0ustar alastairalastair{ "basename": "asr-case_03-e03f722", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_03.f90", "infile_hash": "4fc1bb48b2136f22bb44b7c69aaa05a43b4ed2e4b8464c433340295d", "outfile": null, "outfile_hash": null, "stdout": "asr-case_03-e03f722.stdout", "stdout_hash": "0aeffd166add28ba914cbca7790cdb5d11e09e2b047617bda536b3ff", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-read_97-ddfad35.stdout0000664000175000017500000000446015227365530023421 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { read_97: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) read_97 [] [(FileRead 0 () (StringConstant "(I2)" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () [(Var 2 x)] () .true. () () () ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_openmp-pragma1-f8a3fde.json0000664000175000017500000000074115227365530024532 0ustar alastairalastair{ "basename": "ast_openmp-pragma1-f8a3fde", "cmd": "lfortran --show-ast --no-color --openmp {infile} -o {outfile}", "infile": "tests/pragma1.f90", "infile_hash": "0b9eea06186cb7eb1866b55256263d4e562835c40920f35b92ed18ee", "outfile": null, "outfile_hash": null, "stdout": "ast_openmp-pragma1-f8a3fde.stdout", "stdout_hash": "5fe83e4aa643e6315c760999d691cf2c8e2d454961a668974dbbd005", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_interface4-034a306.stdout0000664000175000017500000002770515227365530025602 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { driver: (Function (SymbolTable 2 { driver2: (Function (SymbolTable 4 { }) driver2 (FunctionType [(FunctionType [(Integer 4) (Real 4) (Real 8)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 f)] [] () Public .false. .false. () ), f: (Function (SymbolTable 3 { f_arg_0: (Variable 3 f_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f_arg_1: (Variable 3 f_arg_1 [] Unspecified () () Default (Real 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f_arg_2: (Variable 3 f_arg_2 [] Unspecified () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4) (Real 4) (Real 8)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 f_arg_0) (Var 3 f_arg_1) (Var 3 f_arg_2)] [] () Public .false. .false. () ), i: (Variable 2 i [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) driver (FunctionType [(Real 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 f) (Var 2 n)] [(SubroutineCall 2 f () [((Var 2 n)) ((Var 2 i)) ((Var 2 j))] () .false. ) (SubroutineCall 2 driver2 () [((Var 2 f))] () .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-dim_assgn_test-2643606.json0000664000175000017500000000107515227365530024240 0ustar alastairalastair{ "basename": "asr-dim_assgn_test-2643606", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/warnings/dim_assgn_test.f90", "infile_hash": "1aa9b8592b310c0a601a031ae7716b75aea5ee9f31645db207e99bee", "outfile": null, "outfile_hash": null, "stdout": "asr-dim_assgn_test-2643606.stdout", "stdout_hash": "2c582b59b60f7e49fa634e8acc9d3237cc8427af6470f56e1ddbe85c", "stderr": "asr-dim_assgn_test-2643606.stderr", "stderr_hash": "7f0949fe00196320d96335fc4ef87d1dfb2831ecbc544435e0b7f2ed", "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor18-618bfdc.stdout0000664000175000017500000000257115227365530027257 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor18: (Program (SymbolTable 2 { y: (Variable 2 y [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor18 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-common1-bbe229a.json0000664000175000017500000000072115227365530023077 0ustar alastairalastair{ "basename": "asr-common1-bbe229a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/common1.f90", "infile_hash": "8f3a2e387c1b0481198ba4f773ea74e1bed5023a9fb121822a194e6e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-common1-bbe229a.stderr", "stderr_hash": "3cc7683d6060350e6774028f82341d10b6efd92fc722e7b5f71630cb", "returncode": 2 }lfortran-0.64.0/tests/reference/julia-subroutines_02-8f01adf.stdout0000664000175000017500000000200615227365530025302 0ustar alastairalastairfunction f(a::Int32, b::Base.RefValue{Int32}) b[] = a + 1 end function g(a::Int32, b::Base.RefValue{Int32}) b[] = a - 1 end function h(a::Int32, b::Base.RefValue{Int32}) g(a, b) end function main() local i::Int32 local j::Int32 i = 1 j = 1 __j_ref__= Ref(j) f(i, __j_ref__) j = __j_ref__[] println(i, " ", j) if i ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if j ≠ 2 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) g(i, __j_ref__) j = __j_ref__[] println(i, " ", j) if i ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if j ≠ 0 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) h(i, __j_ref__) j = __j_ref__[] println(i, " ", j) if i ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if j ≠ 0 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/ast-subroutine1-fdc40b3.json0000664000175000017500000000072615227365530024014 0ustar alastairalastair{ "basename": "ast-subroutine1-fdc40b3", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subroutine1.f90", "infile_hash": "e209c22328b423e75d6801f3c0ef19bc120936196435dff2cb19df31", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutine1-fdc40b3.stdout", "stdout_hash": "522465bcf29ea6cee23fd91313c1d21c73a291d11690341df76680ca", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_07-240b0d5.stdout0000664000175000017500000001714315227365530024432 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_07: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sp: (Variable 2 sp [] Local (TypeInquiry Kind (Real 4) (RealConstant 0.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sp2: (Variable 2 sp2 [] Local (TypeInquiry Kind (Real 4) (RealConstant 0.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_07 [] [(Assignment (Var 2 a) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 b) (Cast (Var 2 a) RealToReal (Real 8) () () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/run-print3-b6beca0.stdout0000664000175000017500000000003415227365530023406 0ustar alastairalastair x is 24 x is 24 ok ok lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor23-be2fde1.stdout0000664000175000017500000000364115227365530027325 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor23: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor23 [] [(Assignment (Var 2 x) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit_interface3-4503c6d.json0000664000175000017500000000102515227365530025303 0ustar alastairalastair{ "basename": "asr-implicit_interface3-4503c6d", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/implicit_interface3.f90", "infile_hash": "6914373182ded05c9b4169762408bc670588735da361b66e2e7cfc2c", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_interface3-4503c6d.stdout", "stdout_hash": "ef1c5cd26552df26a96fc5b1d5d8f1e82dec8434813157f8a52a2850", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-assign_to1-e0b6dcb.json0000664000175000017500000000075115227365530023661 0ustar alastairalastair{ "basename": "ast-assign_to1-e0b6dcb", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/assign_to1.f", "infile_hash": "9dbe8770330acd15438625f1425b45ce1f593b85ba08bc96601b1ddd", "outfile": null, "outfile_hash": null, "stdout": "ast-assign_to1-e0b6dcb.stdout", "stdout_hash": "875a120cceb0cdf1fba755f101bf72b2be5e73c537a021c671587708", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-arrays_05-f639a33.json0000664000175000017500000000073615227365530023530 0ustar alastairalastair{ "basename": "julia-arrays_05-f639a33", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/arrays_05.f90", "infile_hash": "09eac1191b2e8a76fafedf1307b2d1240ffbc5f632c08afa847df805", "outfile": null, "outfile_hash": null, "stdout": "julia-arrays_05-f639a33.stdout", "stdout_hash": "c610b43606aff8e273a85df76f3bb842651b5613e1fa718c57ee8ce6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-string_02-bc2a3b9.stdout0000664000175000017500000001562015227365530023711 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { string_02: (Program (SymbolTable 2 { firstname: (Variable 2 firstname [] Local () () Default (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), greetings: (Variable 2 greetings [] Local () () Default (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), surname: (Variable 2 surname [] Local () () Default (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), title: (Variable 2 title [] Local () () Default (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_02 [] [(Assignment (Var 2 title) (StringConstant "Mr. " (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 firstname) (StringConstant "Rowan " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 surname) (StringConstant "Atkinson" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 greetings) (StringConstant "A big hello from Mr. Bean" (String 1 (IntegerConstant 25 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Here is " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 title) (Var 2 firstname) (Var 2 surname)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (Var 2 greetings) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics5-1cd2db1.stderr0000664000175000017500000000026615227365530024330 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Ior must be the same --> tests/errors/intrinsics5.f90:2:14 | 2 | print *, ior(1, 1_8) | ^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-loop_test4-17c3803.stdout0000664000175000017500000001524115227365530023762 0ustar alastairalastair(TranslationUnit [(Program test () [] [] [] [(DoLoop 0 () 240 k (- (+ 1 (/ 1 2)) (** 3 4)) mp () [(Assignment 0 (FuncCallOrArray con [] [(() k () 0)] [] [] [] ) (u- (FuncCallOrArray datmat [] [(() k () 0) (() np () 0)] [] [] [] )) () ) (DoLoop 0 () 220 j (/ (FuncCallOrArray f [] [] [] [] [] ) 2) n () [(Assignment 220 (FuncCallOrArray w [] [(() j () 0)] [] [] [] ) (+ (FuncCallOrArray datmat [] [(() k () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray con [] [(() k () 0)] [] [] [] )) () )] () () ) (DoLoop 0 () 240 i (/ (FuncCallOrArray f [] [(() 2 () 0) (() 3 () 0)] [(x 5) (z (String "o\"k'(" ()))] [] [] ) 2) n () [(Assignment 0 temp (Real "0.0d0") () ) (DoLoop 0 () 230 j (+ (+ (+ 1 2) (/ (+ 1 3) 4)) (FuncCallOrArray f [] [(() (+ 3 2) () 0)] [(k (+ 4 (FuncCallOrArray sum [] [(() (FuncCallOrArray a [] [(() () 1 0) (() () 1 0) (() () 1 0) (() 4 () 0)] [] [] [] ) () 0)] [] [] [] )))] [] [] )) n () [(Assignment 230 temp (+ temp (* (FuncCallOrArray w [] [(() j () 0)] [] [] [] ) (FuncCallOrArray simi [] [(() j () 0) (() i () 0)] [] [] [] ))) () )] () () ) (If 0 () (== k mp) [(Assignment 0 temp (u- temp) () )] [] () () () ) (Assignment 240 (FuncCallOrArray a [] [(() i () 0) (() k () 0)] [] [] [] ) temp () )] () () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-binop_03-d0adef1.stdout0000664000175000017500000001513015227365530023753 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I8\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R8\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc2 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %x = alloca i64, align 8 %y = alloca double, align 8 store i64 665663010, i64* %x, align 8 %3 = load i64, i64* %x, align 8 %simplified_pow_operation = mul i64 %3, %3 store i64 %simplified_pow_operation, i64* %x, align 8 %4 = alloca i64, align 8 %5 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %4, i32 0, i32 0, i32 0, i32 0, i32 0, i64* %x) %6 = load i64, i64* %4, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %5, i8** %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %6, i64* %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %10 = load i8*, i8** %9, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %12 = load i64, i64* %11, align 8 %13 = trunc i64 %12 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %14 = icmp eq i8* %5, null br i1 %14, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %5) br label %free_done free_done: ; preds = %free_nonnull, %.entry %15 = load i64, i64* %x, align 8 %16 = icmp ne i64 %15, 443107242882260100 br i1 %16, label %then, label %else then: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done br label %ifcont ifcont: ; preds = %else, %then store double 0x41C3D69B11000000, double* %y, align 8 %17 = load double, double* %y, align 8 %simplified_pow_operation1 = fmul double %17, %17 store double %simplified_pow_operation1, double* %y, align 8 %18 = alloca i64, align 8 %19 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %18, i32 0, i32 0, i32 0, i32 0, i32 0, double* %y) %20 = load i64, i64* %18, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 store i8* %19, i8** %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 store i64 %20, i64* %22, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 %24 = load i8*, i8** %23, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 %26 = load i64, i64* %25, align 8 %27 = trunc i64 %26 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %24, i32 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %28 = icmp eq i8* %19, null br i1 %28, label %free_done4, label %free_nonnull3 free_nonnull3: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %2, i8* %19) br label %free_done4 free_done4: ; preds = %free_nonnull3, %ifcont %29 = load double, double* %y, align 8 %30 = fsub double %29, 0x439898EEC2459972 %31 = call double @llvm.fabs.f64(double %30) %32 = fcmp ogt double %31, 0x3BFD83C940000000 br i1 %32, label %then5, label %else6 then5: ; preds = %free_done4 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont7 else6: ; preds = %free_done4 br label %ifcont7 ifcont7: ; preds = %else6, %then5 br label %return return: ; preds = %ifcont7 br label %FINALIZE_SYMTABLE_binop_03 FINALIZE_SYMTABLE_binop_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) ; Function Attrs: nounwind readnone speculatable willreturn declare double @llvm.fabs.f64(double) #0 attributes #0 = { nounwind readnone speculatable willreturn } lfortran-0.64.0/tests/reference/asr-bindc4-22df995.json0000664000175000017500000000073415227365530022553 0ustar alastairalastair{ "basename": "asr-bindc4-22df995", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc4.f90", "infile_hash": "421dc94d9239b11a66352b4cd31b78bb82ad39b738ca161fe2192d35", "outfile": null, "outfile_hash": null, "stdout": "asr-bindc4-22df995.stdout", "stdout_hash": "e6e8f426255b46d735cbc562aec9c1f61825e2340233a51c1333d366", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-assign_to2-6015b09.stdout0000664000175000017500000000302415227365530023730 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (sum [] [] () () None ()) (ZERO [] [] () () None ())] () )] [(Assign 10 30 next () ) (Assignment 0 sum ZERO () ) (Assignment 0 i 1 () ) (GoTo 20 next () [30 50 70] () ) (If 30 () (< 0 1) [(GoTo 0 () 70 [] () )] [] () () () ) (Print 50 () [50] () ) (Assign 0 50 next () ) (Print 70 () [70] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-intrinsics_04-524ec3a.stdout0000664000175000017500000005144415227365530024517 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_04: (Program (SymbolTable 2 { dp: (ExternalSymbol 2 dp 4 real64 lfortran_intrinsic_iso_fortran_env [] real64 Public ), sp: (ExternalSymbol 2 sp 4 real32 lfortran_intrinsic_iso_fortran_env [] real32 Public ), x: (Variable 2 x [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_04 [iso_fortran_env] [(Assignment (Var 2 x) (RealConstant 1.500000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 x) (IntrinsicElementalFunction Tan [(Var 2 x)] 0 (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealConstant 14.101420 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Tan [(RealConstant 1.500000 (Real 4) )] 0 (Real 4) (RealConstant 14.101420 (Real 4) ) ) Sub (RealConstant 14.101420 (Real 4) ) (Real 4) (RealConstant -0.000000 (Real 4) ) )] 0 (Real 4) (RealConstant 0.000000 (Real 4) ) ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Tan [(RealBinOp (Cast (IntrinsicElementalFunction Tan [(RealConstant 1.500000 (Real 4) )] 0 (Real 4) (RealConstant 14.101420 (Real 4) ) ) RealToReal (Real 8) (RealConstant 14.101420 (Real 8) ) () ) Add (IntrinsicElementalFunction Tan [(RealBinOp (Var 2 x) Add (IntrinsicElementalFunction Tan [(Var 2 x)] 0 (Real 8) () ) (Real 8) () )] 0 (Real 8) () ) (Real 8) () )] 0 (Real 8) () ) Sub (Cast (RealConstant 2.254825 (Real 4) ) RealToReal (Real 8) (RealConstant 2.254825 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 z) (ComplexConstructor (RealConstant 1.500000 (Real 8) ) (RealConstant 3.500000 (Real 8) ) (Complex 8) (ComplexConstant 1.500000 3.500000 (Complex 8) ) ) () .false. .false. ) (Assignment (Var 2 z) (IntrinsicElementalFunction Tan [(Var 2 z)] 0 (Complex 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Real [(Var 2 z)] 0 (Real 8) () ) Sub (RealConstant 0.000258 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Real [(IntrinsicElementalFunction Tan [(ComplexConstructor (RealConstant 1.500000 (Real 4) ) (RealConstant 3.500000 (Real 4) ) (Complex 4) (ComplexConstant 1.500000 3.500000 (Complex 4) ) )] 0 (Complex 4) (ComplexConstant 0.000258 1.001807 (Complex 4) ) )] 0 (Real 4) (RealConstant 0.000258 (Real 4) ) ) Sub (RealConstant 0.000258 (Real 4) ) (Real 4) (RealConstant 0.000000 (Real 4) ) )] 0 (Real 4) (RealConstant 0.000000 (Real 4) ) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Aimag [(Var 2 z)] 0 (Real 8) () ) Sub (RealConstant 1.001807 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) () ) [(ErrorStop () )] [] )] ), iso_fortran_env: (IntrinsicModule lfortran_intrinsic_iso_fortran_env) }) [] ) lfortran-0.64.0/tests/reference/llvm-return_03-3f7087d.stdout0000664000175000017500000000704215227365530023764 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [12 x i8] c"early return" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data, i32 0, i32 0), i64 12 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.1 = private constant [13 x i8] c"normal return" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([13 x i8], [13 x i8]* @string_const_data.1, i32 0, i32 0), i64 13 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @main.main_out = internal global i32 999 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.3 = private constant [12 x i8] c"main1 called" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data.3, i32 0, i32 0), i64 12 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) call void @main1(i32* @main.main_out) %2 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %2, i32 12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } define void @main1(i32* %out_var) { .entry: %i = alloca i32, align 4 store i32 10, i32* %i, align 4 %0 = load i32, i32* %i, align 4 %1 = icmp sgt i32 %0, 5 br i1 %1, label %then, label %else then: ; preds = %.entry %2 = load i32, i32* %i, align 4 store i32 %2, i32* %out_var, align 4 %3 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %3, i32 12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %return unreachable_after_return: ; No predecessors! br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %unreachable_after_return %4 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %4, i32 13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %5 = load i32, i32* %i, align 4 store i32 %5, i32* %out_var, align 4 br label %return return: ; preds = %ifcont, %then br label %FINALIZE_SYMTABLE_main1 FINALIZE_SYMTABLE_main1: ; preds = %return ret void } declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast_f90-common1-ee77de6.stdout0000664000175000017500000000042515227365530024151 0ustar alastairalastairprogram common1 implicit real (a-z) real :: A, B common /sample/ A, B common /c/ c, /b/ d, e, f, /c/ g, h, i(5) common x, y, z(10) A = 10 B = 20 call pass() stop end program common1 subroutine pass() real :: A, B common /sample/ A, B print *, A, B return end subroutine pass lfortran-0.64.0/tests/reference/ast-program_02-2faf7cf.stdout0000664000175000017500000000271015227365530024141 0ustar alastairalastair(TranslationUnit [(Module program_02_mod (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [] [] [] ) (Program program_02 () [(Use [] program_02_mod [] .false. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] [(Subroutine f1 [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) (Function f2 [] [(AttrType TypeInteger [] () () None )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 f2 3 () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/llvm-expr6-914a051.json0000664000175000017500000000070715227365530022541 0ustar alastairalastair{ "basename": "llvm-expr6-914a051", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/expr6.f90", "infile_hash": "722af2f789e614d9acf6975aae8260e4949a360066d5aa53a3f05944", "outfile": null, "outfile_hash": null, "stdout": "llvm-expr6-914a051.stdout", "stdout_hash": "8d9bac4bc2121dd065ef1e0e8ddd38e035922ff7112dd751e19ed9c4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-real_dp_01-e53c6fb.stdout0000664000175000017500000000540515227365530024205 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [9 x i8] c"R4,R8,R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %v = alloca double, align 8 %x = alloca float, align 4 %zero = alloca float, align 4 store float 0.000000e+00, float* %zero, align 4 store double 0x3FF0CCCCC0000000, double* %v, align 8 store float 0x3FF0CCCCC0000000, float* %x, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* %x, double* %v, float* %zero) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_real_dp_01 FINALIZE_SYMTABLE_real_dp_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-template_add_02-1dafc5f.stdout0000664000175000017500000021046315227365530025114 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_add_02: (Program (SymbolTable 13 { add_t: (ExternalSymbol 13 add_t 2 add_t template_add_02_m [] add_t Public ), func_arg_real: (ExternalSymbol 13 func_arg_real 2 func_arg_real template_add_02_m [] func_arg_real Public ), r: (ExternalSymbol 13 r 2 r template_add_02_m [] r Public ), test_template: (ExternalSymbol 13 test_template 2 test_template template_add_02_m [] test_template Public ), ~add: (ExternalSymbol 13 ~add 2 ~add template_add_02_m [] ~add Public ) }) template_add_02 [template_add_02_m] [(SubroutineCall 13 test_template () [] () .false. )] ), template_add_02_m: (Module (SymbolTable 2 { add_t: (Template (SymbolTable 5 { add_generic: (Function (SymbolTable 7 { x: (Variable 7 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 7 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_generic (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [f] [(Var 7 x) (Var 7 y)] [(Assignment (Var 7 z) (FunctionCall 5 f () [((Var 7 x)) ((Var 7 y))] (TypeParameter t ) () () ) () .false. .false. )] (Var 7 z) Public .true. .true. () ), f: (Function (SymbolTable 6 { x: (Variable 6 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 6 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 6 x) (Var 6 y)] [] (Var 6 z) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_t [t f] [(Require r [t f] )] ), func_arg_int: (Function (SymbolTable 9 { x: (Variable 9 x [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 9 y [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 9 z [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func_arg_int (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 x) (Var 9 y)] [(Assignment (Var 9 z) (IntegerBinOp (Var 9 x) Add (Var 9 y) (Integer 4) () ) () .false. .false. )] (Var 9 z) Private .true. .true. () ), func_arg_real: (Function (SymbolTable 8 { x: (Variable 8 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 8 z [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func_arg_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 x) (Var 8 y)] [(Assignment (Var 8 z) (RealBinOp (Var 8 x) Add (Var 8 y) (Real 4) () ) () .false. .false. )] (Var 8 z) Private .true. .true. () ), r: (Requirement (SymbolTable 3 { f: (Function (SymbolTable 4 { x: (Variable 4 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 4 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 4 x) (Var 4 y)] [] (Var 4 z) Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) r [t f] [] ), test_template: (Function (SymbolTable 10 { add_real: (Function (SymbolTable 12 { x: (Variable 12 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 12 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 12 z [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~add_intrinsic] [(Var 12 x) (Var 12 y)] [(Assignment (Var 12 z) (FunctionCall 10 ~add_intrinsic () [((Var 12 x)) ((Var 12 y))] (Real 4) () () ) () .false. .false. )] (Var 12 z) Public .true. .true. () ), x: (Variable 10 x [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 10 y [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 10 ~add [10 ~add_intrinsic] Public ), ~add_intrinsic: (Function (SymbolTable 11 { arg0: (Variable 11 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 11 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 11 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 11 arg0) (Var 11 arg1)] [(Assignment (Var 11 ret) (RealBinOp (Var 11 arg0) Add (Var 11 arg1) (Real 4) () ) () .false. .false. )] (Var 11 ret) Public .true. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 10 x) (RealConstant 5.100000 (Real 4) ) () .false. .false. ) (Assignment (Var 10 y) (RealConstant 7.200000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "The result is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 10 add_real () [((Var 10 x)) ((Var 10 y))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (FunctionCall 10 add_real () [((Var 10 x)) ((Var 10 y))] (Real 4) () () ) Sub (RealConstant 12.300000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] () Public .false. .false. () ), ~add: (CustomOperator 2 ~add [2 func_arg_real] Public ) }) template_add_02_m () [template_add_02_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-assign_to2-127a642.json0000664000175000017500000000077215227365530023364 0ustar alastairalastair{ "basename": "asr-assign_to2-127a642", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/assign_to2.f90", "infile_hash": "a929e60f25d1d3c3b1ef485c7d9b5dca6f7bebcfffc66ed010f309d3", "outfile": null, "outfile_hash": null, "stdout": "asr-assign_to2-127a642.stdout", "stdout_hash": "76b34f07cf462e44d55fca6f1f085773844fe8067a109ae699563c61", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_06-8523892.json0000664000175000017500000000076115227365530023742 0ustar alastairalastair{ "basename": "asr-intrinsics_06-8523892", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_06.f90", "infile_hash": "c551ff5e24ea7b1b86a697b75ab52b3a9fb897ec0ff8d13f6a8afba5", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_06-8523892.stdout", "stdout_hash": "9dc1c9b8d45c2a3ec372ab51ed68a052d230d8637b40f91e702c2e1b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_05-321b5d3.stderr0000664000175000017500000000033515227365530023340 0ustar alastairalastairsemantic error: Rank mismatch in array reference: the array `x` has rank `1`, but is referenced as rank `2` --> tests/errors/array_05.f90:12:14 | 12 | allocate(type_01%x(1, 2)) | ^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-do_concurrent_reduce2-1f96d95.stdout0000664000175000017500000000571115227365530026243 0ustar alastairalastair(TranslationUnit [(Subroutine sum_reduce [(a) (s) (t)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(a [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(s [] [] () () None ()) (t [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(N [] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 N (FuncCallOrArray size [] [(() a () 0)] [] [] [] ) () ) (Assignment 0 s 0 () ) (Assignment 0 t 0 () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 N () )] () [(ConcurrentReduce ReduceAdd [s t] )] [(Assignment 0 s (+ s (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () ) (Assignment 0 t (+ t (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-implicit1-418fb10.stdout0000664000175000017500000000247515227365530024321 0ustar alastairalastairprogram implicit1 ! AST only implicit none implicit none implicit none implicit none (external) implicit none (type) implicit none (external, type) implicit none (type, external) implicit real (a-h,o-z) implicit real(dp) (a-h,o-z) implicit real(8) (a-h,o-z) implicit real(8) (a-h,o-z) implicit double precision (a-h,o-z) implicit character (c,o-z) implicit character(len=id) (a-z) implicit integer (i-n) implicit integer (i,j,k,l,m,n) implicit integer (i,j-l,m,n) implicit integer(dp) (a-h,o-z) implicit integer(8) (i,j-l,m,n) implicit integer (A,C) implicit integer(4) (C,D-x) implicit integer(4) (C,D-x) implicit logical (l,u-z) implicit logical(dp) (a-h,o-z) implicit logical(4) (l,u-z) implicit logical(4) (l,u-z) implicit complex (z) implicit complex(dp) (a-h,o-z) implicit complex (C) implicit complex(4) (z) implicit complex(4) (z) implicit type(BLOB) (A) implicit class(X) (A-b) implicit real(4) (a),real(4 + 4) (b),real(d) (d),real(d(2)) (a-z) implicit integer(4) (a),integer(4 + 4) (b),integer(d) (d),integer(d(2)) (a-z) implicit logical(4) (a),logical(4 + 4) (b),logical(d) (d),logical(d(2)) (a-z) implicit complex(4) (a),complex(4 + 4) (b),complex(d) (d),complex(d(2)) (a-z) implicit character(len=4, kind=c_char) (a) implicit character(len=4, kind=c_char) (a) implicit character(kind=c_char) (a) end program implicit1 lfortran-0.64.0/tests/reference/asr-logical3-b6316c6.stdout0000664000175000017500000003255515227365530023452 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { logical3: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) logical3 [] [(Assignment (Var 2 a) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (Assignment (Var 2 b) (LogicalConstant .false. (Logical 4) ) () .false. .false. ) (If () (LogicalBinOp (Var 2 a) And (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 1 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] [(Print (StringConstant "Line 1 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) (If () (LogicalBinOp (Var 2 a) Or (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 2 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 2 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (If () (LogicalBinOp (Var 2 a) Xor (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line xor - Condition is true" (String 1 (IntegerConstant 28 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line xor - Condition is false" (String 1 (IntegerConstant 29 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (Assignment (Var 2 a) (LogicalConstant .false. (Logical 4) ) () .false. .false. ) (Assignment (Var 2 b) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (If () (LogicalNot (LogicalBinOp (Var 2 a) And (Var 2 b) (Logical 4) () ) (Logical 4) () ) [(Print (StringConstant "Line 3 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 3 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (If () (LogicalBinOp (Var 2 b) NEqv (Var 2 a) (Logical 4) () ) [(Print (StringConstant "Line 4 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 4 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (If () (LogicalBinOp (Var 2 b) Eqv (Var 2 a) (Logical 4) () ) [(Print (StringConstant "Line 5 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] [(Print (StringConstant "Line 5 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) (Assignment (Var 2 a) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (Assignment (Var 2 b) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (If () (LogicalBinOp (Var 2 a) And (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 6 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 6 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (If () (LogicalBinOp (Var 2 a) Or (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 7 - Condition is true" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "Line 7 - Condition is false" (String 1 (IntegerConstant 27 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] ) (If () (LogicalBinOp (Var 2 a) Xor (Var 2 b) (Logical 4) () ) [(Print (StringConstant "Line 8 xor - Condition is true" (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (ErrorStop () )] [(Print (StringConstant "Line 8 xor - Condition is false" (String 1 (IntegerConstant 31 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_24-257ddde.stdout0000664000175000017500000000072315227365530023725 0ustar alastairalastairtest: 1.0000 0.33333333333333331 12346. 0.12345669999999999E-7 123456789012345.00 1.2345678901234560 -42.000000000000000 0.0000000000000000 42 -1000 T F Hello G format! 1.2300000000000000 -4.5599999999999996 1.10000000000000012.20000000000000023.2999999999999998 0.12345678901234501E+19 -0.12345678901234500E+22 0.1234000E-4 1.000000 1.230000 1234568. 0.1234000E-03 1234568. 1.000000 1.230000 1234568. 0.1234000E-03 lfortran-0.64.0/tests/reference/asr-implicit_call_01-e42aa0d.json0000664000175000017500000000077615227365530024637 0ustar alastairalastair{ "basename": "asr-implicit_call_01-e42aa0d", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/errors/implicit_call_01.f90", "infile_hash": "2ed640dba2654e545e8e66737ea33f5e1c943c7d894d9cfcacab7225", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_call_01-e42aa0d.stderr", "stderr_hash": "f9e8970a1b966caf17e63d203fe457cf7114d017867859c35849b3a9", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-select_type_02-6e04a0b.stdout0000664000175000017500000010267615227365530024647 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_type_collection: (Module (SymbolTable 2 { point: (Struct (SymbolTable 3 { x: (Variable 3 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) point (StructType [(Real 4) (Real 4)] [] .true. .false. ) [] [x y] [] Source Public .false. .false. .false. [] () () [] ) }) derived_type_collection () [] .false. .false. .false. ), select_type_02: (Program (SymbolTable 4 { 1_color_point_color: (ExternalSymbol 4 1_color_point_color 6 color color_point [] color Public ), 1_point_3d_z: (ExternalSymbol 4 1_point_3d_z 5 z point_3d [] z Public ), 1_point_x: (ExternalSymbol 4 1_point_x 3 x derived_type_collection [point] x Public ), 1_point_y: (ExternalSymbol 4 1_point_y 3 y derived_type_collection [point] y Public ), color_point: (Struct (SymbolTable 6 { color: (Variable 6 color [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) color_point (StructType [(Integer 4)] [] .true. .false. ) [] [color] [] Source Public .false. .false. .false. [] () 4 point [] ), cp: (Variable 4 cp [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 4 color_point Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), p: (Variable 4 p [] Local () () Default (StructType [(Real 4) (Real 4)] [] .true. .false. ) 4 point Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), p3d: (Variable 4 p3d [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 4 point_3d Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), p_or_cp: (Variable 4 p_or_cp [] Local () () Default (Pointer (StructType [(Real 4) (Real 4)] [] .false. .false. ) ) 4 point Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), point: (ExternalSymbol 4 point 2 point derived_type_collection [] point Public ), point_3d: (Struct (SymbolTable 5 { z: (Variable 5 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) point_3d (StructType [(Real 4)] [] .true. .false. ) [] [z] [] Source Public .false. .false. .false. [] () 4 point [] ), ~select_type_block_: (Block (SymbolTable 7 { 1_point_x: (ExternalSymbol 7 1_point_x 3 x derived_type_collection [point] x Public ), 1_point_y: (ExternalSymbol 7 1_point_y 3 y derived_type_collection [point] y Public ), an: (Variable 7 an [] Local () () Default (Pointer (StructType [(Real 4) (Real 4)] [] .false. .false. ) ) 4 point Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~select_type_block_ [(Associate (Var 7 an) (Cast (Var 4 p_or_cp) ClassToClass (Pointer (StructType [(Real 4) (Real 4)] [] .false. .false. ) ) () (Var 7 an) ) ) (Print (StringFormat () [(StringConstant "point: " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Var 7 an) 7 1_point_x (Real 4) () ) (StructInstanceMember (Var 7 an) 7 1_point_y (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), ~select_type_block_1: (Block (SymbolTable 8 { 1_color_point_color: (ExternalSymbol 8 1_color_point_color 6 color color_point [] color Public ), 1_point_x: (ExternalSymbol 8 1_point_x 3 x derived_type_collection [point] x Public ), 1_point_y: (ExternalSymbol 8 1_point_y 3 y derived_type_collection [point] y Public ), an: (Variable 8 an [] Local () () Default (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) 4 color_point Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~select_type_block_1 [(Associate (Var 8 an) (Cast (Var 4 p_or_cp) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 8 an) ) ) (Print (StringFormat () [(StringConstant "color_point: " (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Var 8 an) 8 1_point_x (Real 4) () ) (StructInstanceMember (Var 8 an) 8 1_point_y (Real 4) () ) (StructInstanceMember (Var 8 an) 8 1_color_point_color (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) select_type_02 [derived_type_collection] [(Assignment (StructInstanceMember (Var 4 p) 4 1_point_x (Real 4) () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 p) 4 1_point_y (Real 4) () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 p3d) 4 1_point_x (Real 4) () ) (RealConstant 3.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 p3d) 4 1_point_y (Real 4) () ) (RealConstant 4.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 p3d) 4 1_point_3d_z (Real 4) () ) (RealConstant 5.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 cp) 4 1_point_x (Real 4) () ) (RealConstant 6.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 cp) 4 1_point_y (Real 4) () ) (RealConstant 7.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 4 cp) 4 1_color_point_color (Integer 4) () ) (IntegerConstant 8 (Integer 4) Decimal) () .false. .false. ) (Associate (Var 4 p_or_cp) (Var 4 cp) ) (SelectType (Var 4 p_or_cp) an [(ClassStmt 4 point [(BlockCall -1 4 ~select_type_block_ )] ) (TypeStmtName 4 color_point [(BlockCall -1 4 ~select_type_block_1 )] )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-array_05_cc-37bfc03.stderr0000664000175000017500000000070115227365530024066 0ustar alastairalastairsemantic error: Rank mismatch in array reference: the array `x` has rank `1`, but is referenced as rank `2` --> tests/errors/array_05_cc.f90:12:14 | 12 | allocate(type_01%x(1, 2)) | ^^^^^^^^^^^^^^^ semantic error: Rank mismatch in array reference: the array `x` has rank `1`, but is referenced as rank `2` --> tests/errors/array_05_cc.f90:13:14 | 13 | allocate(type_01%x(2, 1)) | ^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-array6-fe9aa62.json0000664000175000017500000000070715227365530022747 0ustar alastairalastair{ "basename": "ast-array6-fe9aa62", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array6.f90", "infile_hash": "bd74956aa588e4b340d6de16fc0b67a51fbf31518393a6cb4e7d2901", "outfile": null, "outfile_hash": null, "stdout": "ast-array6-fe9aa62.stdout", "stdout_hash": "daf1e34e185a4b9e4e5d6e2c747b92f7a3315250c853cd8f02ff356c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_add_01b-bd911f4.json0000664000175000017500000000077215227365530024545 0ustar alastairalastair{ "basename": "asr-template_add_01b-bd911f4", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_add_01b.f90", "infile_hash": "49bc85b4565cd612b81222b7a375987b68351569f3e6e67914e6c505", "outfile": null, "outfile_hash": null, "stdout": "asr-template_add_01b-bd911f4.stdout", "stdout_hash": "98d24e2e872a379ca9024a8bc06daa030ae2eac2470959d0acaee497", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-nested_05-00beea9.stdout0000664000175000017500000003151515227365530023671 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { nested_05: (Program (SymbolTable 5 { b: (ExternalSymbol 5 b 2 b nested_05_a [] b Public ) }) nested_05 [nested_05_a] [(SubroutineCall 5 b () [] () .false. )] ), nested_05_a: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { c: (Function (SymbolTable 4 { }) c (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(Var 3 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 3 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 3 x) (IntegerConstant 4 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 y) (RealConstant 3.500000 (Real 4) ) () .false. .false. )] () Public .false. .false. () ), x: (Variable 3 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 y) (RealConstant 5.500000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(Var 3 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 3 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (SubroutineCall 3 c () [] () .false. ) (Print (StringFormat () [(Var 3 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 3 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) nested_05_a () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-allocate_03-85e4091.stderr0000664000175000017500000000036615227365530023763 0ustar alastairalastairruntime error: allocate with source= requires an allocated/associated source expression --> tests/errors/allocate_03.f90:7:27 | 7 | allocate(obj, source = src) | ^^^ source expression is not allocated/associated lfortran-0.64.0/tests/reference/run-scalar_allocation_check_03-a66333c.json0000664000175000017500000000076215227365530026525 0ustar alastairalastair{ "basename": "run-scalar_allocation_check_03-a66333c", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/scalar_allocation_check_03.f90", "infile_hash": "bf42de38aa218f1c7ac50e28a2823b54baa8da6ffb1516e27b1b92b1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-scalar_allocation_check_03-a66333c.stderr", "stderr_hash": "22ca5280865788e39acbde9fab7c5eb732c66b38f4f109ea597ff8ea", "returncode": 1 }lfortran-0.64.0/tests/reference/ast_f90-doconcurrentloop_02-2418c04.json0000664000175000017500000000101615227365530025663 0ustar alastairalastair{ "basename": "ast_f90-doconcurrentloop_02-2418c04", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/doconcurrentloop_02.f90", "infile_hash": "972a21c452523a0a3060e6b1a0c75e868f5dd660ea5763358ccade86", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-doconcurrentloop_02-2418c04.stdout", "stdout_hash": "1dac082ef96d3cdf03e2bdc4cce01528ddbcedb71c26845c26ac8bc7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-nint_overflow-bf5738b.json0000664000175000017500000000074315227365530024357 0ustar alastairalastair{ "basename": "asr-nint_overflow-bf5738b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/nint_overflow.f90", "infile_hash": "887b0d5e99be9d33310deee68d28e0b7207e7e7c2ac8ede95f302925", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-nint_overflow-bf5738b.stderr", "stderr_hash": "3dfc23e5fabee4c3980707d1c40d9c9f9e241ca9c769becaa9c86f13", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-array_06-5f5f77a.stderr0000664000175000017500000000031115227365530023434 0ustar alastairalastairsemantic error: Rank mismatch in array reference: the array `str` has rank `1`, but is referenced as rank `2` --> tests/errors/array_06.f90:5:5 | 5 | str(1, 2)(:) = '1234' | ^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/llvm-real_dp_param-bac42bc.json0000664000175000017500000000076415227365530024562 0ustar alastairalastair{ "basename": "llvm-real_dp_param-bac42bc", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/real_dp_param.f90", "infile_hash": "c3f349aae44d8efd8afc0b6bd017d9fdc88a0e652d6f7b3c35622828", "outfile": null, "outfile_hash": null, "stdout": "llvm-real_dp_param-bac42bc.stdout", "stdout_hash": "9723af18f23ec688a910302da5f76f73278111e445554b94d923f396", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_14-8de1244.stderr0000664000175000017500000000027015227365530026074 0ustar alastairalastairruntime error: Argument 1 of subroutine f_integer____0 is unallocated. --> tests/errors/array_bounds_check_14.f90:16:12 | 16 | call f(x) | ^ This is unallocated lfortran-0.64.0/tests/reference/pass_select_case-case_07-90772d0.json0000664000175000017500000000101415227365530025244 0ustar alastairalastair{ "basename": "pass_select_case-case_07-90772d0", "cmd": "lfortran --pass=select_case --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_07.f90", "infile_hash": "d24e71ceb6ad09214f850e8c025c9e3c26ca3ba21ee2f94dae6d8fed", "outfile": null, "outfile_hash": null, "stdout": "pass_select_case-case_07-90772d0.stdout", "stdout_hash": "b1235ab9c94c0586ba2fd77e4b069e28d278e3499afa5f5b2f4204fd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope4-2d4061d.json0000664000175000017500000000101415227365530027030 0ustar alastairalastair{ "basename": "pass_global_stmts-global_scope4-2d4061d", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope4.f90", "infile_hash": "da0256e95ad866af376d9ded3cd439463cb1e47dffac6aa88c0bbadf", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-global_scope4-2d4061d.stdout", "stdout_hash": "9cdea6c5b35324e681a285045c89cec68f4d2410c3519452405f6442", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-assign_to1-e0b6dcb.stdout0000664000175000017500000000031115227365530024222 0ustar alastairalastair(TranslationUnit [(Program assign1 () [] [] [] [(Assign 10 10 next () )] [] )] ) lfortran-0.64.0/tests/reference/asr-complex_sub_test-f54ef56.json0000664000175000017500000000077215227365530025051 0ustar alastairalastair{ "basename": "asr-complex_sub_test-f54ef56", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_sub_test.f90", "infile_hash": "9f572986fbed1d55d70fd8cd6941a7aaff7a29b92b0b8eada122ac20", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_sub_test-f54ef56.stdout", "stdout_hash": "a169dc606c86508d75e3c1fd3d084e719c57bdaf671f0af3e3a8237f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_assignment-58b5a6f.stdout0000664000175000017500000000370215227365530026250 0ustar alastairalastair(TranslationUnit [(Program implicit_program_lfortran () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ()) (b [] [] () () None ()) (c [] [] () () None ()) (d [] [] () () None ()) (k [] [] () () None ())] () )] [(Assignment 0 a 1 () ) (Assignment 0 b 2 () ) (Assignment 0 c (/ (* a b) 2) () ) (Assignment 0 d (* c c) () ) (Print 0 () [a b c d] () ) (DoLoop 0 () 80 k 1 20 () [(Print 0 () [1] () )] () () ) (If 120 () (< a b) [(Assignment 0 a (* 2 b) () )] [(Assignment 0 b (* 33 c) () )] () () () )] [] )] ) lfortran-0.64.0/tests/reference/ast-fixed_form_interface-a8dfdb0.stdout0000664000175000017500000002261415227365530026332 0ustar alastairalastair(TranslationUnit [(Program fixed_form_interface () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (arr [(1 5 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(output_unit [] [] () () None ())] () ) (DerivedType element [] () [] [(Declaration (AttrType TypeCharacter [(len 2 Value)] () () None ) [] [(symbol [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(atomic_number [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(atomic_mass [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(quantity [] [] () () None ())] () )] [] ) (DerivedType chemical_compound [] () [] [(Declaration (AttrType TypeCharacter [(len 30 Value)] () () None ) [] [(name [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 10 Value)] () () None ) [] [(formula [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(molecular_weight [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () element None ) [(SimpleAttribute AttrAllocatable ) (AttrDimension [(() () DimensionExpr)] )] [(elements [] [] () () None ())] () )] [] ) (Interface (InterfaceHeader) () [(InterfaceProc (Subroutine my_subroutine [(a)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(a [] [] () () None ())] () )] [] [] [] ) ) (InterfaceProc (Function my_function [(b)] [] res () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(res [] [] () () None ())] () )] [] [] [] ) )] ) (Declaration (AttrType TypeInteger [] () () None ) [] [(num [] [] () 2 Equal ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(() () DimensionExpr)] ) (SimpleAttribute AttrAllocatable )] [(factors [] [] () () None ())] () )] [(Allocate 0 [(() (FuncCallOrArray factors [] [(() num () 0)] [] [] [] ) () 0)] [] () ) (Assignment 0 factors (ArrayInitializer () () [3 4] ) () ) (Deallocate 0 [(() factors () 0)] [] () ) (Format 1 "tr1,a" () ) (Print 0 1 [factors] () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 10 2 )] () [] [(Assignment 0 (FuncCallOrArray arr [] [(() i () 0)] [] [] [] ) i () )] () () ) (Flush 0 [output_unit] [] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-nullify_01-09aa501.json0000664000175000017500000000075015227365530023344 0ustar alastairalastair{ "basename": "asr-nullify_01-09aa501", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_01.f90", "infile_hash": "5869e698f080612903a66a6001fa03b7b3390371a5a9eef3ca48a545", "outfile": null, "outfile_hash": null, "stdout": "asr-nullify_01-09aa501.stdout", "stdout_hash": "7da585765939250f5af498429273a327a272873ce687eacb3e5b5cb3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutines_06-1ab6665.json0000664000175000017500000000076415227365530024270 0ustar alastairalastair{ "basename": "asr-subroutines_06-1ab6665", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_06.f90", "infile_hash": "29e8f662721c0da49f12396843b768130d3ec0293c22c9b527c2c053", "outfile": null, "outfile_hash": null, "stdout": "asr-subroutines_06-1ab6665.stdout", "stdout_hash": "bcc2f689ba95f2343c6b05d30e4f7ed7d6d41331a0dfe1eb6cc110e4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-derived_types_02-2a5b79b.json0000664000175000017500000000076015227365530025305 0ustar alastairalastair{ "basename": "ast_f90-derived_types_02-2a5b79b", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/derived_types_02.f90", "infile_hash": "97982d2ac648e6b5260dc06a91a3e121668752f5b642ff81d4efba5f", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-derived_types_02-2a5b79b.stdout", "stdout_hash": "3dbdac0f60c4fc3563710a095e5a071aac2c72198db93e4c7ee8a1ca", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_08-3680946.json0000664000175000017500000000077215227365530024426 0ustar alastairalastair{ "basename": "asr-derived_types_08-3680946", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_08.f90", "infile_hash": "4a51a56bca5f067223957705f8a8642e29e5decf9059e675b67d5df0", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_08-3680946.stdout", "stdout_hash": "5b433acb7b62e7a949f30ca68768f3fd9c8399fdbda1bc611b2024ee", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-modules_04-e9ab16a.stdout0000664000175000017500000000057515227365530024543 0ustar alastairalastairmodule modules_04_a implicit none contains subroutine b() print *, "b()" end subroutine b end module modules_04_a program modules_04 use, intrinsic :: iso_fortran_env implicit none call f() contains subroutine f() use modules_04_a, only: b call b() end subroutine f integer function g() use modules_04_a, only: b call b() g = 5 end function g end program modules_04 lfortran-0.64.0/tests/reference/run-stdin_read_blank_lines_01-029176a.json0000664000175000017500000000061015227365530026302 0ustar alastairalastair{ "basename": "run-stdin_read_blank_lines_01-029176a", "cmd": "lfortran --no-color {infile}", "infile": "tests/stdin_read_blank_lines_01.f90", "infile_hash": "d9e3a87e9dbf9ed1dd379267bbfd108020fb16df86d961f6e2bd402e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-complex_div_test-0a2468c.json0000664000175000017500000000077515227365530025135 0ustar alastairalastair{ "basename": "llvm-complex_div_test-0a2468c", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_div_test.f90", "infile_hash": "0bbb7100f12786a5fc5022ab6cfd9f97cc6ede016ed0bdab03eda670", "outfile": null, "outfile_hash": null, "stdout": "llvm-complex_div_test-0a2468c.stdout", "stdout_hash": "5087456b6dc1ab4106e3d337dd2986ad8a7a0c286bfade0719395077", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_cmake_02-d8d8f4d.stdout0000664000175000017500000000153315227365530025232 0ustar alastairalastair(TranslationUnit [(Program TESTFortran90 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(stop [] [] () () None ())] (TriviaNode [] [(Semicolon)] ) )] [(Assignment 0 stop 1 (TriviaNode [] [(Semicolon)] ) ) (WhileLoop 0 () (== stop 0) [] (TriviaNode [] [(Semicolon)] ) () )] [] )] ) lfortran-0.64.0/tests/reference/asr_openmp-openmp_39-aaf2ba8.json0000664000175000017500000000077415227365530025003 0ustar alastairalastair{ "basename": "asr_openmp-openmp_39-aaf2ba8", "cmd": "lfortran --show-asr --no-color --openmp {infile} -o {outfile}", "infile": "tests/../integration_tests/openmp_39.f90", "infile_hash": "ad3526cfb8a0d0c158dce1e8db3e86ea6516fd68238496485fb00d1a", "outfile": null, "outfile_hash": null, "stdout": "asr_openmp-openmp_39-aaf2ba8.stdout", "stdout_hash": "f751d0879d35df0fa41a840c980a330fdaa5085c7c49714ac621df4a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-global_scope6-3cbd5d2.stdout0000664000175000017500000000120515227365530025001 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 0 define void @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i32, align 4 store i32 6, i32* @x, align 4 %0 = load i32, i32* @x, align 4 %1 = mul i32 2, %0 store i32 %1, i32* %__lfortran_evaluate_11, align 4 %2 = load i32, i32* @x, align 4 %3 = add i32 %2, 1 store i32 %3, i32* @x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return ret void } lfortran-0.64.0/tests/reference/ast-do_concurrent_reduce3-9c6ccff.stdout0000664000175000017500000000737415227365530026467 0ustar alastairalastair(TranslationUnit [(Subroutine sum_reduce [(a) (s)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(a [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(s [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(N [] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 N (FuncCallOrArray size [] [(() a () 0)] [] [] [] ) () ) (Assignment 0 s 0 () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 N () )] () [(ConcurrentReduce ReduceMul [s] )] [(Assignment 0 s (+ s (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 N () )] () [(ConcurrentReduce ReduceMIN [s] )] [(Assignment 0 s (+ s (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 N () )] () [(ConcurrentReduce ReduceMAX [s] )] [(Assignment 0 s (+ s (FuncCallOrArray a [] [(() i () 0)] [] [] [] )) () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-expr8-613d1f3.json0000664000175000017500000000071715227365530023122 0ustar alastairalastair{ "basename": "ast_f90-expr8-613d1f3", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/expr8.f90", "infile_hash": "b0f7cfaa460c9319f7cc7b0fa470fbbce940f7f4eef3156b55897b51", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-expr8-613d1f3.stdout", "stdout_hash": "b0f7cfaa460c9319f7cc7b0fa470fbbce940f7f4eef3156b55897b51", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-empty-7fa10d2.json0000664000175000017500000000070415227365530022605 0ustar alastairalastair{ "basename": "ast-empty-7fa10d2", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/empty.f90", "infile_hash": "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", "outfile": null, "outfile_hash": null, "stdout": "ast-empty-7fa10d2.stdout", "stdout_hash": "96f8556c9cb61453515e3955eedbbf2df06a14d49367a43b0ee0774e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-preprocess_01-20f7efb.stdout0000664000175000017500000000672115227365530024577 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocess_01: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocess_01 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 x) (IntegerConstant 18 (Integer 4) Decimal) () .false. .false. ) (Print (StringConstant "Else condition" (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Assignment (Var 2 x) (IntegerConstant 30 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntegerConstant 10000 (Integer 4) Decimal) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-program_without_line_05-1440b57.stdout0000664000175000017500000000142115227365530026424 0ustar alastairalastair(TranslationUnit [(Subroutine x [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [] [] [] ) (Program __xx_main () [] [(ImplicitNone [] () )] [] [(SubroutineCall 0 y [] [] [] [] () )] [] ) (Subroutine y [] [] () () [] [] [] [] [(Print 0 () [(String "x" ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-array_constructor_with_different_types-bffc811.json0000664000175000017500000000105615227365530031624 0ustar alastairalastair{ "basename": "asr-array_constructor_with_different_types-bffc811", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_constructor_with_different_types.f90", "infile_hash": "0e407db91aa33a696329aa0e1867057fce840c163fe57885fd109654", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_constructor_with_different_types-bffc811.stderr", "stderr_hash": "483a4f9a004ffdba3852458d072b3f6ef0251b068762beeec58c2a34", "returncode": 2 }lfortran-0.64.0/tests/reference/julia-arrays_05-f639a33.stdout0000664000175000017500000000053515227365530024076 0ustar alastairalastairfunction main() local i::Int32 local numbers::Array{Float32, 1} = [1.50000000e+00, 3.20000005e+00, 4.50000000e+00, 8.99999976e-01, 7.19999981e+00] for i ∈ 1:5 numbers[i] = Float32(i) * 2.00000000000000000e+00 end numbers .= [1.50000000e+00, 3.20000005e+00, 4.50000000e+00, 8.99999976e-01, 7.19999981e+00] end main() lfortran-0.64.0/tests/reference/ast-line_continuation_03-8570dc1.json0000664000175000017500000000100615227365530025415 0ustar alastairalastair{ "basename": "ast-line_continuation_03-8570dc1", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/line_continuation_03.f90", "infile_hash": "e87783d3a61e68a07124b8821a85b1916933fb83e5fbc63d09e3f32d", "outfile": null, "outfile_hash": null, "stdout": "ast-line_continuation_03-8570dc1.stdout", "stdout_hash": "384a6183b9e02125b7c7be63aee3413ec4216c8b7a21a07132c2daa7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run_dbg-runtime_stacktrace_01-c6f5e06.stderr0000664000175000017500000000044715227365530027037 0ustar alastairalastair File "tests/errors/runtime_stacktrace_01.f90", line 3 print *, main() File "tests/errors/runtime_stacktrace_01.f90", line 10 print *, g() File "tests/errors/runtime_stacktrace_01.f90", line 20 call f() File "tests/errors/runtime_stacktrace_01.f90", line 14 stop 1 STOP 1 lfortran-0.64.0/tests/reference/run-array_bounds_check_02-3ebca53.json0000664000175000017500000000074315227365530025676 0ustar alastairalastair{ "basename": "run-array_bounds_check_02-3ebca53", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_02.f90", "infile_hash": "eaa31b185f0a51c3937f0238d112eb0fc90b3e410e59da7fe194c389", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_02-3ebca53.stderr", "stderr_hash": "33f1e7c5644bec60a2a7b39185cfa26e49eee32b3634224e8110040c", "returncode": 1 }lfortran-0.64.0/tests/reference/ast_f90-common3-fab0cfa.stdout0000664000175000017500000000042515227365530024267 0ustar alastairalastairsubroutine test() implicit none real :: a, b, c, d common a, b common a, b common a, b common a, /b1/ c, d, // b common a, /b1/ c, d, // b common b(2:4) common b(:4) common b(4) common /b1/ c, d, // a, b common /b1/ c, d, // a, b common /b1/ c, d, // a, b end subroutine test lfortran-0.64.0/tests/reference/asr-common_05-f767179.json0000664000175000017500000000074515227365530023134 0ustar alastairalastair{ "basename": "asr-common_05-f767179", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/common_05.f90", "infile_hash": "103a9b01bea9140a57317be18066e13d520ad14dc9edf4c0ff39c458", "outfile": null, "outfile_hash": null, "stdout": "asr-common_05-f767179.stdout", "stdout_hash": "af57fbdd125e390f28b4368e800843071aa04e7570840ab48ac34dfa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dimension_attr-1c00ad6.json0000664000175000017500000000075215227365530024461 0ustar alastairalastair{ "basename": "asr-dimension_attr-1c00ad6", "cmd": "lfortran --fixed-form --show-asr --no-color {infile} -o {outfile}", "infile": "tests/dimension_attr.f", "infile_hash": "94df0a120cc268f419253b89bd601cc62c0c40b1ff86e8eb05849b4b", "outfile": null, "outfile_hash": null, "stdout": "asr-dimension_attr-1c00ad6.stdout", "stdout_hash": "d725155e7d9f5d478ca431e2f48b7ec77ab6616cad481e570f1e3fad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-recursion_03-8300fac.stdout0000664000175000017500000012533515227365530024341 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 9 { r: (Variable 9 r [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), solver: (ExternalSymbol 9 solver 2 solver recursion_03 [] solver Public ), solver_caller: (ExternalSymbol 9 solver_caller 2 solver_caller recursion_03 [] solver_caller Public ), sub1: (ExternalSymbol 9 sub1 2 sub1 recursion_03 [] sub1 Public ) }) main [recursion_03] [(Assignment (Var 9 r) (FunctionCall 9 sub1 () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 3 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "r =" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 9 r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), recursion_03: (Module (SymbolTable 2 { solver: (Function (SymbolTable 5 { f: (Function (SymbolTable 6 { f: (Variable 6 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 6 f) Public .false. .false. () ), f_val: (Variable 5 f_val [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iter: (Variable 5 iter [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), solver: (Variable 5 solver [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solver (FunctionType [(FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [sub1] [(Var 5 f) (Var 5 iter)] [(Assignment (Var 5 f_val) (FunctionCall 5 f () [] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "before:" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 f_val)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 5 solver) (FunctionCall 2 sub1 () [((IntegerConstant 2 (Integer 4) Decimal)) ((IntegerBinOp (Var 5 iter) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 5 f_val) (FunctionCall 5 f () [] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "after:" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 f_val)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] (Var 5 solver) Public .false. .false. () ), solver_caller: (Function (SymbolTable 3 { f: (Function (SymbolTable 4 { f: (Variable 4 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 4 f) Public .false. .false. () ), iter: (Variable 3 iter [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), solver_caller: (Variable 3 solver_caller [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solver_caller (FunctionType [(FunctionType [] (Integer 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solver] [(Var 3 f) (Var 3 iter)] [(Assignment (Var 3 solver_caller) (FunctionCall 2 solver () [((Var 3 f)) ((Var 3 iter))] (Integer 4) () () ) () .false. .false. )] (Var 3 solver_caller) Public .true. .true. () ), sub1: (Function (SymbolTable 7 { getx: (Function (SymbolTable 8 { getx: (Variable 8 getx [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) getx (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(StringConstant "x in getx" (String 1 (IntegerConstant 9 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 7 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 8 getx) (Var 7 x) () .false. .false. )] (Var 8 getx) Public .false. .false. () ), iter: (Variable 7 iter [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sub1: (Variable 7 sub1 [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 7 tmp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 7 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub1 (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solver_caller] [(Var 7 y) (Var 7 iter)] [(Assignment (Var 7 x) (Var 7 y) () .false. .false. ) (Print (StringConstant "in sub1" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (If () (IntegerCompare (Var 7 iter) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 7 sub1) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Return)] [] ) (Assignment (Var 7 tmp) (FunctionCall 7 getx () [] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 7 sub1) (FunctionCall 2 solver_caller () [((Var 7 getx)) ((Var 7 iter))] (Integer 4) () () ) () .false. .false. )] (Var 7 sub1) Public .false. .false. () ) }) recursion_03 () [recursion_03] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-block_02-82f9e5f.stderr0000664000175000017500000000026315227365530023420 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/block_02.f90:7:14 | 7 | IF (A.EQ.15) GO TO 1 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/run-write_01-c968b4a.json0000664000175000017500000000067415227365530023140 0ustar alastairalastair{ "basename": "run-write_01-c968b4a", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/write_01.f90", "infile_hash": "467bcb588e761b464036e6b211484c96b738855f975d3621d88ee707", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-write_01-c968b4a.stderr", "stderr_hash": "b52244f7416c7199e45b6045c78b6dbda3e373673899ec05bf934bed", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-class_01-704dee8.stderr0000664000175000017500000000035015227365530023415 0ustar alastairalastairwarning: Change of value in conversion from 'real(8)' to 'real(4)' --> tests/../integration_tests/class_01.f90:4:16 | 4 | real :: pi = 3.1415926535897931d0 ! Class-wide private constant | ^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/fortran-real_to_integer_cast_fortran_codegen-d0b1495.json0000664000175000017500000000105315227365530031650 0ustar alastairalastair{ "basename": "fortran-real_to_integer_cast_fortran_codegen-d0b1495", "cmd": "lfortran --show-fortran --no-color {infile} -o {outfile}", "infile": "tests/real_to_integer_cast_fortran_codegen.f90", "infile_hash": "c22935c412aa471b719040d7dfe20e17562f068b634cfe1d80a82cbc", "outfile": null, "outfile_hash": null, "stdout": "fortran-real_to_integer_cast_fortran_codegen-d0b1495.f90", "stdout_hash": "bde59f8f082b356562ffd4aa721dad8c382393f080a05256c953f59e", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/asr-string_01-bda4726.json0000664000175000017500000000074515227365530023265 0ustar alastairalastair{ "basename": "asr-string_01-bda4726", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_01.f90", "infile_hash": "e7d4974d8a9b9704bf0c02d7943d916b40c591de3c9e89d30de28d7d", "outfile": null, "outfile_hash": null, "stdout": "asr-string_01-bda4726.stdout", "stdout_hash": "7a10e39c7c940def0d49b5274c220439086573baf54ea9dbe1d825df", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format8-4e5a9c0.json0000664000175000017500000000066215227365530023055 0ustar alastairalastair{ "basename": "run-format8-4e5a9c0", "cmd": "lfortran --no-color {infile}", "infile": "tests/format8.f90", "infile_hash": "30908958fbdff81f81f462b9361840b83c87df049d3b81311709b494", "outfile": null, "outfile_hash": null, "stdout": "run-format8-4e5a9c0.stdout", "stdout_hash": "fa723c58541506da3d4ef67cccca0883504118610c2a5a645389c13f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-redeclaration1-b66ed3a.stderr0000664000175000017500000000034215227365530024760 0ustar alastairalastairsemantic error: Symbol is already declared in the same scope --> tests/errors/redeclaration1.f90:4:12 | 4 | real :: j, idx1 | ^^^^ redeclaration | 3 | integer :: idx1 | ~~~~ original declaration lfortran-0.64.0/tests/reference/asr-incompatible_ranks_allocatable_arr1-5e5233d.stderr0000664000175000017500000000025615227365530031043 0ustar alastairalastairsemantic error: Incompatible ranks 2 and 1 in assignment --> tests/errors/incompatible_ranks_allocatable_arr1.f90:8:5 | 8 | arr1 = [1, 2, 3] | ^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-string_binop-415f1fa.json0000664000175000017500000000074015227365530024145 0ustar alastairalastair{ "basename": "asr-string_binop-415f1fa", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/string_binop.f90", "infile_hash": "4e6301859ddd78b04a2a25c7024ec1a91d427fe1e12477c3d337dc6f", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-string_binop-415f1fa.stderr", "stderr_hash": "b5d483b65a65764781e8af477c3eecc912b46d8ad9eb26cdb8d29319", "returncode": 2 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err6-47462f4.stderr0000664000175000017500000000021115227365530025631 0ustar alastairalastairC preprocessor error: Unexpected token '(', expected ')' --> tests/errors/cpp_err6.f90:2:13 | 2 | #if 1 + (1+2 ( | ^^^ lfortran-0.64.0/tests/reference/asr-intrinsics_28-7703b7d.stdout0000664000175000017500000003037315227365530024452 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { debug: (Program (SymbolTable 2 { a: (Variable 2 a [] Local (IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local (IntegerUnaryMinus (IntegerConstant 20 (Integer 4) Decimal) (Integer 4) (IntegerConstant -20 (Integer 4) Decimal) ) (IntegerConstant -20 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local (IntegerConstant 30 (Integer 4) Decimal) (IntegerConstant 30 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local (IntegerUnaryMinus (IntegerConstant 40 (Integer 4) Decimal) (Integer 4) (IntegerConstant -40 (Integer 4) Decimal) ) (IntegerConstant -40 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local (IntegerConstant 50 (Integer 4) Decimal) (IntegerConstant 50 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) debug [] [(If () (IntegerCompare (IntrinsicElementalFunction Min [(Var 2 a) (Var 2 b) (Var 2 c) (Var 2 d) (Var 2 e) (Var 2 f)] 0 (Integer 4) (IntegerConstant -40 (Integer 4) Decimal) ) NotEq (IntegerUnaryMinus (IntegerConstant 40 (Integer 4) Decimal) (Integer 4) (IntegerConstant -40 (Integer 4) Decimal) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Max [(Var 2 a) (Var 2 b) (Var 2 c) (Var 2 d) (Var 2 e) (Var 2 f)] 0 (Integer 4) (IntegerConstant 50 (Integer 4) Decimal) ) NotEq (IntegerConstant 50 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Max [(Var 2 a) (Var 2 b)] 0 (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) NotEq (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Min [(Var 2 a) (Var 2 b)] 0 (Integer 4) (IntegerConstant -20 (Integer 4) Decimal) ) NotEq (IntegerUnaryMinus (IntegerConstant 20 (Integer 4) Decimal) (Integer 4) (IntegerConstant -20 (Integer 4) Decimal) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction Max [(Var 2 a) (Var 2 b) (Var 2 c)] 0 (Integer 4) (IntegerConstant 30 (Integer 4) Decimal) ) NotEq (IntegerConstant 30 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-fixed_form_if_variations-b4dcd1e.stdout0000664000175000017500000001376615227365530027233 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { a: (Variable 2 a [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 a)] [(Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), main: (Program (SymbolTable 3 { }) main [] [(If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) [(Print (StringConstant "first branch" (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (GoToTarget 10 10 )] [(Print (StringConstant "second branch" (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) (GoToTarget 50 50 ) (SubroutineCall 1 f () [((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) (If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Lt (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) [(Return)] [] ) (If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Gt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(GoTo 50 50 )] [] ) (If () (IntegerCompare (IntegerConstant 0 (Integer 4) Decimal) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) [(SubroutineCall 1 f () [((IntegerConstant 2 (Integer 4) Decimal))] () .false. )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_clojure-subroutine1-be16026.json0000664000175000017500000000077415227365530025400 0ustar alastairalastair{ "basename": "asr_clojure-subroutine1-be16026", "cmd": "lfortran --show-asr --no-color --no-indent --clojure {infile} -o {outfile}", "infile": "tests/subroutine1.f90", "infile_hash": "e209c22328b423e75d6801f3c0ef19bc120936196435dff2cb19df31", "outfile": null, "outfile_hash": null, "stdout": "asr_clojure-subroutine1-be16026.stdout", "stdout_hash": "ffaa0c23e1b53ff7a76e764944d6c65672de4be14db204869afeb881", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array9-fe1439d.json0000664000175000017500000000070715227365530022674 0ustar alastairalastair{ "basename": "ast-array9-fe1439d", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array9.f90", "infile_hash": "7107510b84a7e22f82d8f1f61617c399bc53b8a0fb59a5453419889c", "outfile": null, "outfile_hash": null, "stdout": "ast-array9-fe1439d.stdout", "stdout_hash": "0713345f733a9e9bdd7064dcce8ae13e9748c685edbb5c44cd3deee5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp4-0611905.json0000664000175000017500000000074415227365530024345 0ustar alastairalastair{ "basename": "asr_preprocess-cpp4-0611905", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp4.f90", "infile_hash": "cdfb40699075b2ba0ddb610fe1bc708cecd3e38d14adcc946b2ca70a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp4-0611905.stderr", "stderr_hash": "b215b344a6a7ea30b40d38cf92f756b1982a66068232a12de9e62cbc", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-private2-d3a4771.stderr0000664000175000017500000000022515227365530023457 0ustar alastairalastairsemantic error: Private variable `y` cannot be imported --> tests/errors/private2.f90:7:21 | 7 | use foo2, only: y | ^ lfortran-0.64.0/tests/reference/asr-callback_02-aec5457.json0000664000175000017500000000075315227365530023517 0ustar alastairalastair{ "basename": "asr-callback_02-aec5457", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/callback_02.f90", "infile_hash": "880452ed794b4467313ba9a87318b17fe757a084b2a39129209153d3", "outfile": null, "outfile_hash": null, "stdout": "asr-callback_02-aec5457.stdout", "stdout_hash": "055f40d0b6ded2ad84238090a22ebe7b6f7311513a5b7cb9196ba943", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-print3-5f4fc26.json0000664000175000017500000000070715227365530022702 0ustar alastairalastair{ "basename": "asr-print3-5f4fc26", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/print3.f90", "infile_hash": "891fa35fc5d09524ef73c8c3b92bcd5a4bede01e35fdf0f116df99b2", "outfile": null, "outfile_hash": null, "stdout": "asr-print3-5f4fc26.stdout", "stdout_hash": "24453133194d572ef3372e1390712a55fed672be741c751440824745", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-string_13-8952a13.json0000664000175000017500000000075015227365530023314 0ustar alastairalastair{ "basename": "llvm-string_13-8952a13", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/string_13.f90", "infile_hash": "25354bac77715f94447d94e23c5c51c4ece9145b600155f8a5cb4c9f", "outfile": null, "outfile_hash": null, "stdout": "llvm-string_13-8952a13.stdout", "stdout_hash": "c0374a8fdcf48dc96584c24875b0c4256ad0b9fd5cfa618ff10bf548", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-subroutine5-272e7be.json0000664000175000017500000000071115227365530023735 0ustar alastairalastair{ "basename": "cpp-subroutine5-272e7be", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/subroutine5.f90", "infile_hash": "88c62ffd8f005d7a511511e43da68f25e8fe795a75fec462baa25885", "outfile": null, "outfile_hash": null, "stdout": "cpp-subroutine5-272e7be.stdout", "stdout_hash": "af1e1aa50982757b2781271f2e6bdfdf657c3dd0937a7da523277c0b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor16-b846504.json0000664000175000017500000000077315227365530026465 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor16-b846504", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor16.f90", "infile_hash": "706f1e5cb790684841189022e27d4df5631d981e6351e1c6fd390bcd", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor16-b846504.stdout", "stdout_hash": "23fa2d8fc374a24481d0ea1a812f9b1c3fc53a18ed15a8daf4741c3a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err4-9f3b813.json0000664000175000017500000000076015227365530025365 0ustar alastairalastair{ "basename": "asr_preprocess-cpp_err4-9f3b813", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp_err4.f90", "infile_hash": "7562759fab91efdac8434ae7acf76334560c5235c769ef2c269782d9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp_err4-9f3b813.stderr", "stderr_hash": "35a4de2e06089dca4cd7a5883ca6df059946058807125341cc995627", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-array_01-6a86c32.json0000664000175000017500000000072415227365530023015 0ustar alastairalastair{ "basename": "asr-array_01-6a86c32", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_01.f90", "infile_hash": "d8217a9cb0fccab262234a2cd78ace42dd2ef8ef8412a6d3de9012aa", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_01-6a86c32.stderr", "stderr_hash": "590ff828b48820966380e2e27f1e5af17dda38e3bb542aee4d7f6e6a", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-modules_11-1131557.stdout0000664000175000017500000000402515227365530023553 0ustar alastairalastair(TranslationUnit [(Module modules_11_module11 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () 1 Equal ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(j [] [] () 2 Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(Subroutine access_internally [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Print 0 () [(String "i = " ()) i] () )] [] [] )] ) (Program access_externally () [(Use [] modules_11_module11 [] .false. () )] [(ImplicitNone [] () )] [] [(Print 0 () [(String "j = " ()) j] () ) (SubroutineCall 0 access_internally [] [] [] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/fortran-int_to_complex_cast_in_comparison-2b60771.json0000664000175000017500000000104215227365530031150 0ustar alastairalastair{ "basename": "fortran-int_to_complex_cast_in_comparison-2b60771", "cmd": "lfortran --show-fortran --no-color {infile} -o {outfile}", "infile": "tests/int_to_complex_cast_in_comparison.f90", "infile_hash": "d941d05c4d0af6960eed2a5e192da5e3b6cef03b0467f23682b10222", "outfile": null, "outfile_hash": null, "stdout": "fortran-int_to_complex_cast_in_comparison-2b60771.f90", "stdout_hash": "a00d1e900fe5e7816b5ab2e4cb60fb660201b2c3ad3146b2a07eb7d7", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/ast-associate_01-4a4ac5c.stdout0000664000175000017500000002146515227365530024362 0ustar alastairalastair(TranslationUnit [(Program associate_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrAllocatable )] [(a [(() () DimensionExpr)] [] () () None ()) (b [(() () DimensionExpr) (() () DimensionExpr)] [] () () None ()) (c [(() () DimensionExpr) (() () DimensionExpr) (() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrPointer )] [(x [(() () DimensionExpr)] [] () () None ()) (y [(() () DimensionExpr) (() () DimensionExpr) (() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(a_1 [] [] () () None ()) (c_234 [] [] () () None ()) (c_121 [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(n [] [] () () None ())] () )] [(Assignment 0 a_1 0 () ) (Assignment 0 n 10 () ) (Allocate 0 [(() (FuncCallOrArray a [] [(() 5 () 0)] [] [] [] ) () 0)] [] () ) (Allocate 0 [(() (FuncCallOrArray b [] [(() n () 0) (() n () 0)] [] [] [] ) () 0) (() (FuncCallOrArray c [] [(() n () 0) (() 5 () 0) (() n () 0)] [] [] [] ) () 0)] [] () ) (AssociateBlock 1 loop [(x [] [] () a Arrow ()) (y [] [] () c Arrow ()) (z [] [] () (FuncCallOrArray c [] [(() () 1 0) (() 2 () 0) (() () 1 0)] [] [] [] ) Arrow ())] [(Assignment 0 (FuncCallOrArray x [] [(() 1 () 0)] [] [] [] ) (+ a_1 5) () ) (Assignment 0 (FuncCallOrArray y [] [(() 2 () 0) (() 3 () 0) (() 4 () 0)] [] [] [] ) 3 () ) (Assignment 0 (FuncCallOrArray z [] [(() 1 () 0) (() 1 () 0)] [] [] [] ) 17 () ) (If 0 () (/= (FuncCallOrArray size [] [(() z () 0)] [] [] [] ) 100) [(ErrorStop 0 () () () )] [] () () () )] () () ) (Assignment 0 a_1 (FuncCallOrArray a [] [(() 1 () 0)] [] [] [] ) () ) (If 0 () (== (FuncCallOrArray a [] [(() 1 () 0)] [] [] [] ) 5) [(GoTo 0 () 1 [] () )] [] () () () ) (Assignment 0 c_234 (FuncCallOrArray c [] [(() 2 () 0) (() 3 () 0) (() 4 () 0)] [] [] [] ) () ) (Assignment 0 c_121 (FuncCallOrArray c [] [(() 1 () 0) (() 2 () 0) (() 1 () 0)] [] [] [] ) () ) (If 0 () (/= a_1 (Real "10.")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (/= c_234 (Real "3.")) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (/= c_121 (Real "17.")) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-intrinsics_34-c5cfc20.stdout0000664000175000017500000003534315227365530024601 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_34: (Program (SymbolTable 2 { dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (RealConstant 3.143000 (Real 4) ) (RealConstant 3.143000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (Cast (RealConstant 2.330000 (Real 4) ) RealToReal (Real 8) (RealConstant 2.330000 (Real 8) ) () ) (RealConstant 2.330000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_34 [] [(Print (StringFormat () [(TypeInquiry Epsilon (Real 4) (Var 2 x) (Real 4) (RealConstant 0.000000 (Real 4) ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(TypeInquiry Epsilon (Real 8) (Var 2 y) (Real 8) (RealConstant 0.000000 (Real 8) ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(RealBinOp (TypeInquiry Epsilon (Real 8) (RealConstant 1.000000 (Real 8) ) (Real 8) (RealConstant 0.000000 (Real 8) ) ) Pow (Cast (RealConstant 0.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.500000 (Real 8) ) () ) (Real 8) (RealConstant 0.000000 (Real 8) ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (TypeInquiry Epsilon (Real 4) (Var 2 x) (Real 4) (RealConstant 0.000000 (Real 4) ) ) Sub (RealConstant 0.000000 (Real 4) ) (Real 4) (RealConstant 0.000000 (Real 4) ) )] 0 (Real 4) (RealConstant 0.000000 (Real 4) ) ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (TypeInquiry Epsilon (Real 8) (Var 2 y) (Real 8) (RealConstant 0.000000 (Real 8) ) ) Sub (RealConstant 0.000000 (Real 8) ) (Real 8) (RealConstant 0.000000 (Real 8) ) )] 0 (Real 8) (RealConstant 0.000000 (Real 8) ) ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (RealBinOp (TypeInquiry Epsilon (Real 8) (RealConstant 1.000000 (Real 8) ) (Real 8) (RealConstant 0.000000 (Real 8) ) ) Pow (RealConstant 0.500000 (Real 8) ) (Real 8) (RealConstant 0.000000 (Real 8) ) ) Sub (RealConstant 0.000000 (Real 8) ) (Real 8) (RealConstant 0.000000 (Real 8) ) )] 0 (Real 8) (RealConstant 0.000000 (Real 8) ) ) Gt (RealConstant 0.000000 (Real 8) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/rename_symbol-collect_occurence1-98d138a.json0000664000175000017500000000100415227365530027177 0ustar alastairalastair{ "basename": "rename_symbol-collect_occurence1-98d138a", "cmd": "lfortran --rename-symbol --no-color {infile} -o {outfile}", "infile": "tests/collect_occurence1.f90", "infile_hash": "acffed461dbe1cc05dfd5085fa5344e0c755f1139a7f9c24cb4656e1", "outfile": null, "outfile_hash": null, "stdout": "rename_symbol-collect_occurence1-98d138a.stdout", "stdout_hash": "fa4ac473422f7e302b0cbda18f562c23a9675d915087e0d2b7ff1e01", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_size_02-94fb4d3.json0000664000175000017500000000074315227365530024134 0ustar alastairalastair{ "basename": "asr-array_size_02-94fb4d3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_size_02.f90", "infile_hash": "dec46004e57793955ce8aada1f3ec5dd21b7f5abe9f436f1cd9a341d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_size_02-94fb4d3.stderr", "stderr_hash": "954027eda0ea7fcdede13263e3b29773db3374152d90a6b0f455d1c0", "returncode": 2 }lfortran-0.64.0/tests/reference/run-format_22-e96df3d.stdout0000664000175000017500000000077115227365530023734 0ustar alastairalastairb format for integer(4) 10101 * ** *** **** 10101 10101 10101 10101 10101 10101 -1 in b32 format: "11111111111111111111111111111111" -1 in b0 format: "11111111111111111111111111111111" 10 in b32 format: " 1010" 11 in b0 format: "1011" 1100100 **** ***** 1100100 0 0 b format for integer(8) 11111 11111 1010 1010 0 0 b format for integer(1) 1011 1011 1010 1010 0 0 b format for integer(2) 1001 1001 **** ***** 0 0 lfortran-0.64.0/tests/reference/asr-fn2-b585098.json0000664000175000017500000000067615227365530022022 0ustar alastairalastair{ "basename": "asr-fn2-b585098", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/fn2.f90", "infile_hash": "9f61561c47397aa03014fe07094ac838ada4865e513025e384edae00", "outfile": null, "outfile_hash": null, "stdout": "asr-fn2-b585098.stdout", "stdout_hash": "76fcc6917a296b63106e0c57f2b758cd1f4b918b9d174b9101525c94", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor18-618bfdc.json0000664000175000017500000000077315227365530026710 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor18-618bfdc", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor18.f90", "infile_hash": "9ad52cd56e9f372994097685554ad24df69eb9bf87e99ebf0a005fb2", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor18-618bfdc.stdout", "stdout_hash": "1b713c3eb8d802fd39db3d4174281d1bed1eb979d2616d08753844c8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope7-d6ec187.stdout0000664000175000017500000000655615227365530027521 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (Var 1 x) (Integer 4) () ) () .false. .false. ) (Assignment (Var 1 x) (IntegerBinOp (Var 1 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .false. .false. () ), x: (Variable 1 x [] Local (IntegerConstant 6 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-string2-3425046.json0000664000175000017500000000071215227365530022617 0ustar alastairalastair{ "basename": "asr-string2-3425046", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/string2.f90", "infile_hash": "c88731a5e438f48d75ee2eb7b97ef6c1165c37ec28aa82b22ff6d49f", "outfile": null, "outfile_hash": null, "stdout": "asr-string2-3425046.stdout", "stdout_hash": "2ca7d2cc6ad441bdbc5bd9e5287a91952ead20b62b330f6cf86bf877", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor21-aded728.stdout0000664000175000017500000000234715227365530027253 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor21: (Program (SymbolTable 2 { }) preprocessor21 [] [(Print (StringConstant "Atleast one of VAR1 and VAR2 isn't defined" (String 1 (IntegerConstant 42 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Neither of VAR3 or VAR4 is defined" (String 1 (IntegerConstant 34 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Both VAR5 and VAR6 are defined or neither is defined." (String 1 (IntegerConstant 53 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-logical3-b6316c6.json0000664000175000017500000000106115227365530023065 0ustar alastairalastair{ "basename": "asr-logical3-b6316c6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/logical3.f90", "infile_hash": "d7f7994a85ee59f1b3b80060886eeeb7390f9733461bd9349e4bb7c0", "outfile": null, "outfile_hash": null, "stdout": "asr-logical3-b6316c6.stdout", "stdout_hash": "3c51651b7747ab597c1872e3219bdbefaf4f96f3010722d52b8a02f3", "stderr": "asr-logical3-b6316c6.stderr", "stderr_hash": "d7e28e54d198e14f86c18ab4c4ad128018b9bc6523fb945b05607a57", "returncode": 0 }lfortran-0.64.0/tests/reference/pass_init_expr-array13-db4fb0f.stdout0000664000175000017500000001452415227365530025712 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array13: (Program (SymbolTable 2 { __1_k: (Variable 2 __1_k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), numbers: (Variable 2 numbers [] Local () () Save (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array13 [] [(Assignment (Var 2 __1_k) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 __1_k) ())] (Integer 4) RowMajor () ) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __1_k) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 __1_k) ())] (Integer 4) RowMajor () ) (IntegerConstant 4 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __1_k) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 __1_k) ())] (Integer 4) RowMajor () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __1_k) (IntegerConstant 4 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 __1_k) ())] (Integer 4) RowMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __1_k) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 __1_k) ())] (Integer 4) RowMajor () ) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-string_11-e6c763f.stdout0000664000175000017500000004722315227365530024040 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @string_const_data = private constant [14 x i8] c"This is a test" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([14 x i8], [14 x i8]* @string_const_data, i32 0, i32 0), i64 14 }> @string_const_data.1 = private constant [4 x i8] c"test" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.1, i32 0, i32 0), i64 4 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.3 = private constant [17 x i8] c"test is not found" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([17 x i8], [17 x i8]* @string_const_data.3, i32 0, i32 0), i64 17 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [13 x i8] c"S-DESC-24,I4\00", align 1 @string_const_data.5 = private constant [24 x i8] c"test is found at index: " @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([24 x i8], [24 x i8]* @string_const_data.5, i32 0, i32 0), i64 24 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @_lcompilers_index_str(%string_descriptor* %str, %string_descriptor* %substr, i32* %back, i32* %kind) { .entry: %StrSlice_StrView4 = alloca %string_descriptor, align 8 %StrSlice_StrView = alloca %string_descriptor, align 8 %_lcompilers_index_str = alloca i32, align 4 %found = alloca i32, align 4 %i = alloca i32, align 4 %j = alloca i32, align 4 %k = alloca i32, align 4 %pos = alloca i32, align 4 store i32 0, i32* %_lcompilers_index_str, align 4 store i32 1, i32* %i, align 4 store i32 1, i32* %found, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %1 = load i64, i64* %0, align 8 %2 = trunc i64 %1 to i32 %3 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %4 = load i64, i64* %3, align 8 %5 = trunc i64 %4 to i32 %6 = icmp slt i32 %2, %5 br i1 %6, label %then, label %else then: ; preds = %.entry store i32 0, i32* %found, align 4 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then br label %loop.head loop.head: ; preds = %ifcont10, %ifcont %7 = load i32, i32* %i, align 4 %8 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 %11 = add i32 %10, 1 %12 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %13 = load i64, i64* %12, align 8 %14 = trunc i64 %13 to i32 %15 = sub i32 %11, %14 %16 = icmp sle i32 %7, %15 %17 = load i32, i32* %found, align 4 %18 = icmp eq i32 %17, 1 %19 = and i1 %16, %18 br i1 %19, label %loop.body, label %loop.end11 loop.body: ; preds = %loop.head store i32 0, i32* %k, align 4 store i32 1, i32* %j, align 4 br label %loop.head1 loop.head1: ; preds = %ifcont7, %loop.body %20 = load i32, i32* %j, align 4 %21 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %22 = load i64, i64* %21, align 8 %23 = trunc i64 %22 to i32 %24 = icmp sle i32 %20, %23 %25 = load i32, i32* %found, align 4 %26 = icmp eq i32 %25, 1 %27 = and i1 %24, %26 br i1 %27, label %loop.body2, label %loop.end loop.body2: ; preds = %loop.head1 %28 = load i32, i32* %i, align 4 %29 = load i32, i32* %k, align 4 %30 = add i32 %28, %29 store i32 %30, i32* %pos, align 4 %31 = load i32, i32* %pos, align 4 %32 = load i32, i32* %pos, align 4 %33 = sext i32 %31 to i64 %34 = sext i32 %32 to i64 %35 = sub i64 %34, %33 %36 = add i64 %35, 1 %37 = icmp slt i64 %36, 0 %38 = select i1 %37, i64 0, i64 %36 %39 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %40 = load i8*, i8** %39, align 8 %41 = sext i32 %31 to i64 %42 = sub i64 %41, 1 %StrSliceGEP = getelementptr i8, i8* %40, i64 %42 %43 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 store i8* %StrSliceGEP, i8** %43, align 8 %44 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 store i64 %38, i64* %44, align 8 %45 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 %46 = load i8*, i8** %45, align 8 %47 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 %48 = load i64, i64* %47, align 8 %49 = load i32, i32* %j, align 4 %50 = load i32, i32* %j, align 4 %51 = sext i32 %49 to i64 %52 = sext i32 %50 to i64 %53 = sub i64 %52, %51 %54 = add i64 %53, 1 %55 = icmp slt i64 %54, 0 %56 = select i1 %55, i64 0, i64 %54 %57 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 0 %58 = load i8*, i8** %57, align 8 %59 = sext i32 %49 to i64 %60 = sub i64 %59, 1 %StrSliceGEP3 = getelementptr i8, i8* %58, i64 %60 %61 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 0 store i8* %StrSliceGEP3, i8** %61, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 1 store i64 %56, i64* %62, align 8 %63 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 0 %64 = load i8*, i8** %63, align 8 %65 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 1 %66 = load i64, i64* %65, align 8 %67 = call i32 @str_compare(i8* %46, i64 %48, i8* %64, i64 %66) %68 = icmp ne i32 %67, 0 br i1 %68, label %then5, label %else6 then5: ; preds = %loop.body2 store i32 0, i32* %found, align 4 br label %ifcont7 else6: ; preds = %loop.body2 br label %ifcont7 ifcont7: ; preds = %else6, %then5 %69 = load i32, i32* %j, align 4 %70 = add i32 %69, 1 store i32 %70, i32* %j, align 4 %71 = load i32, i32* %k, align 4 %72 = add i32 %71, 1 store i32 %72, i32* %k, align 4 br label %loop.head1 loop.end: ; preds = %loop.head1 %73 = load i32, i32* %found, align 4 %74 = icmp eq i32 %73, 1 br i1 %74, label %then8, label %else9 then8: ; preds = %loop.end %75 = load i32, i32* %i, align 4 store i32 %75, i32* %_lcompilers_index_str, align 4 %76 = load i32, i32* %back, align 4 store i32 %76, i32* %found, align 4 br label %ifcont10 else9: ; preds = %loop.end store i32 1, i32* %found, align 4 br label %ifcont10 ifcont10: ; preds = %else9, %then8 %77 = load i32, i32* %i, align 4 %78 = add i32 %77, 1 store i32 %78, i32* %i, align 4 br label %loop.head loop.end11: ; preds = %loop.head br label %return return: ; preds = %loop.end11 br label %FINALIZE_SYMTABLE__lcompilers_index_str FINALIZE_SYMTABLE__lcompilers_index_str: ; preds = %return %79 = load i32, i32* %_lcompilers_index_str, align 4 ret i32 %79 } define i32 @_lcompilers_index_str1(%string_descriptor* %str, %string_descriptor* %substr, i32* %back, i32* %kind) { .entry: %StrSlice_StrView4 = alloca %string_descriptor, align 8 %StrSlice_StrView = alloca %string_descriptor, align 8 %_lcompilers_index_str1 = alloca i32, align 4 %found = alloca i32, align 4 %i = alloca i32, align 4 %j = alloca i32, align 4 %k = alloca i32, align 4 %pos = alloca i32, align 4 store i32 0, i32* %_lcompilers_index_str1, align 4 store i32 1, i32* %i, align 4 store i32 1, i32* %found, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %1 = load i64, i64* %0, align 8 %2 = trunc i64 %1 to i32 %3 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %4 = load i64, i64* %3, align 8 %5 = trunc i64 %4 to i32 %6 = icmp slt i32 %2, %5 br i1 %6, label %then, label %else then: ; preds = %.entry store i32 0, i32* %found, align 4 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then br label %loop.head loop.head: ; preds = %ifcont10, %ifcont %7 = load i32, i32* %i, align 4 %8 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 %11 = add i32 %10, 1 %12 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %13 = load i64, i64* %12, align 8 %14 = trunc i64 %13 to i32 %15 = sub i32 %11, %14 %16 = icmp sle i32 %7, %15 %17 = load i32, i32* %found, align 4 %18 = icmp eq i32 %17, 1 %19 = and i1 %16, %18 br i1 %19, label %loop.body, label %loop.end11 loop.body: ; preds = %loop.head store i32 0, i32* %k, align 4 store i32 1, i32* %j, align 4 br label %loop.head1 loop.head1: ; preds = %ifcont7, %loop.body %20 = load i32, i32* %j, align 4 %21 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 1 %22 = load i64, i64* %21, align 8 %23 = trunc i64 %22 to i32 %24 = icmp sle i32 %20, %23 %25 = load i32, i32* %found, align 4 %26 = icmp eq i32 %25, 1 %27 = and i1 %24, %26 br i1 %27, label %loop.body2, label %loop.end loop.body2: ; preds = %loop.head1 %28 = load i32, i32* %i, align 4 %29 = load i32, i32* %k, align 4 %30 = add i32 %28, %29 store i32 %30, i32* %pos, align 4 %31 = load i32, i32* %pos, align 4 %32 = load i32, i32* %pos, align 4 %33 = sext i32 %31 to i64 %34 = sext i32 %32 to i64 %35 = sub i64 %34, %33 %36 = add i64 %35, 1 %37 = icmp slt i64 %36, 0 %38 = select i1 %37, i64 0, i64 %36 %39 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %40 = load i8*, i8** %39, align 8 %41 = sext i32 %31 to i64 %42 = sub i64 %41, 1 %StrSliceGEP = getelementptr i8, i8* %40, i64 %42 %43 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 store i8* %StrSliceGEP, i8** %43, align 8 %44 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 store i64 %38, i64* %44, align 8 %45 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 %46 = load i8*, i8** %45, align 8 %47 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 %48 = load i64, i64* %47, align 8 %49 = load i32, i32* %j, align 4 %50 = load i32, i32* %j, align 4 %51 = sext i32 %49 to i64 %52 = sext i32 %50 to i64 %53 = sub i64 %52, %51 %54 = add i64 %53, 1 %55 = icmp slt i64 %54, 0 %56 = select i1 %55, i64 0, i64 %54 %57 = getelementptr %string_descriptor, %string_descriptor* %substr, i32 0, i32 0 %58 = load i8*, i8** %57, align 8 %59 = sext i32 %49 to i64 %60 = sub i64 %59, 1 %StrSliceGEP3 = getelementptr i8, i8* %58, i64 %60 %61 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 0 store i8* %StrSliceGEP3, i8** %61, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 1 store i64 %56, i64* %62, align 8 %63 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 0 %64 = load i8*, i8** %63, align 8 %65 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView4, i32 0, i32 1 %66 = load i64, i64* %65, align 8 %67 = call i32 @str_compare(i8* %46, i64 %48, i8* %64, i64 %66) %68 = icmp ne i32 %67, 0 br i1 %68, label %then5, label %else6 then5: ; preds = %loop.body2 store i32 0, i32* %found, align 4 br label %ifcont7 else6: ; preds = %loop.body2 br label %ifcont7 ifcont7: ; preds = %else6, %then5 %69 = load i32, i32* %j, align 4 %70 = add i32 %69, 1 store i32 %70, i32* %j, align 4 %71 = load i32, i32* %k, align 4 %72 = add i32 %71, 1 store i32 %72, i32* %k, align 4 br label %loop.head1 loop.end: ; preds = %loop.head1 %73 = load i32, i32* %found, align 4 %74 = icmp eq i32 %73, 1 br i1 %74, label %then8, label %else9 then8: ; preds = %loop.end %75 = load i32, i32* %i, align 4 store i32 %75, i32* %_lcompilers_index_str1, align 4 %76 = load i32, i32* %back, align 4 store i32 %76, i32* %found, align 4 br label %ifcont10 else9: ; preds = %loop.end store i32 1, i32* %found, align 4 br label %ifcont10 ifcont10: ; preds = %else9, %then8 %77 = load i32, i32* %i, align 4 %78 = add i32 %77, 1 store i32 %78, i32* %i, align 4 br label %loop.head loop.end11: ; preds = %loop.head br label %return return: ; preds = %loop.end11 br label %FINALIZE_SYMTABLE__lcompilers_index_str1 FINALIZE_SYMTABLE__lcompilers_index_str1: ; preds = %return %79 = load i32, i32* %_lcompilers_index_str1, align 4 ret i32 %79 } declare i32 @str_compare(i8*, i64, i8*, i64) define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %call_arg_value1 = alloca i32, align 4 %call_arg_value = alloca i32, align 4 %2 = call i8* @_lfortran_get_default_allocator() %teststring = alloca %string_descriptor, align 8 %mystring = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store %string_descriptor zeroinitializer, %string_descriptor* %mystring, align 1 %3 = getelementptr %string_descriptor, %string_descriptor* %mystring, i32 0, i32 1 store i64 30, i64* %3, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %mystring, i32 0, i32 0 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 30) store i8* %6, i8** %4, align 8 store %string_descriptor zeroinitializer, %string_descriptor* %teststring, align 1 %7 = getelementptr %string_descriptor, %string_descriptor* %teststring, i32 0, i32 1 store i64 10, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %teststring, i32 0, i32 0 %9 = call i8* @_lfortran_get_default_allocator() %10 = call i8* @_lfortran_malloc_alloc(i8* %9, i64 10) store i8* %10, i8** %8, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %mystring, i32 0, i32 0 %12 = getelementptr %string_descriptor, %string_descriptor* %mystring, i32 0, i32 1 %13 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_strcpy_alloc(i8* %2, i8** %11, i64* %12, i8 0, i8 0, i8* %13, i64 14, i32 1) %14 = getelementptr %string_descriptor, %string_descriptor* %teststring, i32 0, i32 0 %15 = getelementptr %string_descriptor, %string_descriptor* %teststring, i32 0, i32 1 %16 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_strcpy_alloc(i8* %2, i8** %14, i64* %15, i8 0, i8 0, i8* %16, i64 4, i32 1) store i32 0, i32* %call_arg_value, align 4 store i32 4, i32* %call_arg_value1, align 4 %17 = call i32 @_lcompilers_index_str(%string_descriptor* %mystring, %string_descriptor* %teststring, i32* %call_arg_value, i32* %call_arg_value1) %18 = icmp eq i32 %17, 0 br i1 %18, label %then, label %else then: ; preds = %.entry %19 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %19, i32 17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %ifcont else: ; preds = %.entry %20 = alloca i64, align 8 store i32 0, i32* %call_arg_value, align 4 store i32 4, i32* %call_arg_value1, align 4 %21 = call i32 @_lcompilers_index_str1(%string_descriptor* %mystring, %string_descriptor* %teststring, i32* %call_arg_value, i32* %call_arg_value1) %22 = alloca i32, align 4 store i32 %21, i32* %22, align 4 %23 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @serialization_info, i32 0, i32 0), i64* %20, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.6, i32* %22) %24 = load i64, i64* %20, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %23, i8** %25, align 8 %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %24, i64* %26, align 8 %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %28 = load i8*, i8** %27, align 8 %29 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %30 = load i64, i64* %29, align 8 %31 = trunc i64 %30 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %28, i32 %31, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %32 = icmp eq i8* %23, null br i1 %32, label %free_done, label %free_nonnull free_nonnull: ; preds = %else call void @_lfortran_free_alloc(i8* %2, i8* %23) br label %free_done free_done: ; preds = %free_nonnull, %else br label %ifcont ifcont: ; preds = %free_done, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_string_11 FINALIZE_SYMTABLE_string_11: ; preds = %return br label %Finalize_Variable_mystring Finalize_Variable_mystring: ; preds = %FINALIZE_SYMTABLE_string_11 %33 = getelementptr %string_descriptor, %string_descriptor* %mystring, i32 0, i32 0 %34 = load i8*, i8** %33, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %34) br label %Finalize_Variable_teststring Finalize_Variable_teststring: ; preds = %Finalize_Variable_mystring %35 = getelementptr %string_descriptor, %string_descriptor* %teststring, i32 0, i32 0 %36 = load i8*, i8** %35, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %36) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_strcpy_alloc(i8*, i8**, i64*, i8, i8, i8*, i64, i32) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-int_dp-9b89d9f.json0000664000175000017500000000073715227365530023147 0ustar alastairalastair{ "basename": "llvm-int_dp-9b89d9f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/int_dp.f90", "infile_hash": "f59edf2644a27d68d7127283dbb961288e4041e2de16284795b100de", "outfile": null, "outfile_hash": null, "stdout": "llvm-int_dp-9b89d9f.stdout", "stdout_hash": "1a77e40ae8be629218f6ff9992c46d80c83ce781db827783358aafcb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-select_type1-36bfefb.stdout0000664000175000017500000000764715227365530024607 0ustar alastairalastair(TranslationUnit [(Program select_type1 () [] [(ImplicitNone [] () )] [] [(SelectType 0 () uptr (FuncCallOrArray value [(iter [])] [] [] [] [] ) [(TypeStmtType (AttrType TypeInteger [] () () None ) () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] ) (TypeStmtType (AttrType TypeReal [] () () None ) () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] ) (TypeStmtType (AttrType TypeCharacter [(() () Star)] () () None ) () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] ) (TypeStmtName point () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] ) (ClassStmt point2 () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] ) (ClassDefault () [(Print 0 () [(FuncCallOrArray key [(iter [])] [] [] [] [] ) (String " = " ()) uptr] () )] )] () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-bindc_06-1fdaca6.json0000664000175000017500000000074215227365530023174 0ustar alastairalastair{ "basename": "asr-bindc_06-1fdaca6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc_06.f90", "infile_hash": "440638103af48bc45af28612b54a8986473962b10a857a1054bf9450", "outfile": null, "outfile_hash": null, "stdout": "asr-bindc_06-1fdaca6.stdout", "stdout_hash": "51922f88b8440885874e4ed7036ed2db19b4bdf88c276bf7b7304c91", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-class_02-b56b852.stdout0000664000175000017500000006617615227365530023374 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { circle_test: (Program (SymbolTable 7 { main: (ExternalSymbol 7 main 2 main class_circle2 [] main Public ) }) circle_test [class_circle2] [(SubroutineCall 7 main () [] () .false. )] ), class_circle2: (Module (SymbolTable 2 { circle: (Struct (SymbolTable 3 { circle_area: (StructMethodDeclaration 3 circle_area () circle_area 2 circle_area Source .false. .false. ), circle_print: (StructMethodDeclaration 3 circle_print () circle_print 2 circle_print Source .false. .false. ), radius: (Variable 3 radius [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle (StructType [(Real 4)] [] .true. .false. ) [] [radius] [] Source Private .false. .false. .false. [] () () [] ), circle_area: (Function (SymbolTable 4 { 1_circle_radius: (ExternalSymbol 4 1_circle_radius 3 radius class_circle2 [circle] radius Public ), circle_area: (Variable 4 circle_area [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 4 this [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 circle Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle_area (FunctionType [(StructType [(Real 4)] [] .false. .false. )] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 this)] [(Assignment (Var 4 circle_area) (RealBinOp (Var 2 pi) Mul (RealBinOp (StructInstanceMember (Var 4 this) 4 1_circle_radius (Real 4) () ) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 4 circle_area) Private .true. .true. () ), circle_print: (Function (SymbolTable 5 { 1_circle_circle_area: (ExternalSymbol 5 1_circle_circle_area 3 circle_area class_circle2 [circle] circle_area Public ), 1_circle_radius: (ExternalSymbol 5 1_circle_radius 3 radius class_circle2 [circle] radius Public ), area: (Variable 5 area [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), this: (Variable 5 this [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 circle Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle_print (FunctionType [(StructType [(Real 4)] [] .false. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 this)] [(Assignment (Var 5 area) (FunctionCall 5 1_circle_circle_area () [((Var 5 this))] (Real 4) () (Var 5 this) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "Circle: r = " (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Var 5 this) 5 1_circle_radius (Real 4) () ) (StringConstant " area = " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 area)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Private .false. .false. () ), main: (Function (SymbolTable 6 { 1_circle_circle_print: (ExternalSymbol 6 1_circle_circle_print 3 circle_print class_circle2 [circle] circle_print Public ), 1_circle_radius: (ExternalSymbol 6 1_circle_radius 3 radius class_circle2 [circle] radius Public ), c: (Variable 6 c [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 2 circle Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 6 c) (StructConstructor 2 circle [((RealConstant 1.000000 (Real 4) ))] (StructType [(Real 4)] [] .true. .false. ) () ) () .false. .false. ) (Assignment (StructInstanceMember (Var 6 c) 6 1_circle_radius (Real 4) () ) (RealConstant 1.500000 (Real 4) ) () .false. .false. ) (SubroutineCall 6 1_circle_circle_print () [((Var 6 c))] (Var 6 c) .false. )] () Public .true. .true. () ), pi: (Variable 2 pi [] Local (Cast (RealConstant 3.141593 (Real 8) ) RealToReal (Real 4) (RealConstant 3.141593 (Real 4) ) () ) (RealConstant 3.141593 (Real 4) ) Save (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) class_circle2 () [class_circle2] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_01_size-352da98.json0000664000175000017500000000076415227365530024241 0ustar alastairalastair{ "basename": "asr-arrays_01_size-352da98", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_size.f90", "infile_hash": "cb58e1bbc81b8cb3e39e493299f8ce73339c3bfe6f97ec12ea102145", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_01_size-352da98.stdout", "stdout_hash": "39c0af9c8f700f8220bee3516c8d881ba18f42f0f30d2711dc843954", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character_parameter_padding_trimming-ea91653.stderr0000664000175000017500000000270415227365530031322 0ustar alastairalastairwarning: The LHS character len=2 and the RHS character len=5 are not equal. --> tests/character_parameter_padding_trimming.f90:16:5 | 16 | character(len=2), parameter :: x_trim = "apple" !> char length on right is 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the RHS character len to match the LHS character len warning: The LHS character len=3 and the RHS character len=4 are not equal. --> tests/character_parameter_padding_trimming.f90:17:5 | 17 | character(len=3), parameter :: y_trim = "Ball" !> char length on right is 4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the RHS character len to match the LHS character len warning: The LHS character len=5 and the RHS character len=7 are not equal. --> tests/character_parameter_padding_trimming.f90:18:5 | 18 | character(len=5), parameter :: z_trim = x_trim // y_trim // x_trim !> char length on right is 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the RHS character len to match the LHS character len warning: The LHS character len=1 and the RHS character len=2 are not equal. --> tests/character_parameter_padding_trimming.f90:19:5 | 19 | character(len=1), parameter :: p_trim(3) = "25" !> char length on right is 2 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the RHS character len to match the LHS character len lfortran-0.64.0/tests/reference/asr-func_arg_array-609769c.json0000664000175000017500000000074615227365530024320 0ustar alastairalastair{ "basename": "asr-func_arg_array-609769c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/func_arg_array.f90", "infile_hash": "585115ceaab8814376b2532bf714e97b7bfe97787c158d257d79b778", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-func_arg_array-609769c.stderr", "stderr_hash": "1c2ceda2d3debb6eeca06ba8de41d75291e63259a93986ffeae8b60a", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-implicit10-f531a25.stdout0000664000175000017500000007121315227365530023716 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a: (Function (SymbolTable 2 { a: (Variable 2 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 2 d1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e1: (Variable 2 e1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f1: (Variable 2 f1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 2 g [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 2 h [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 2 l [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 2 o [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p: (Variable 2 p [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [d1 e1 f1] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 d1)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e1)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 f1))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [e1] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e1))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (ArrayItem (Var 2 y) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 x) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 3.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 d) (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 3.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 f) (Cast (IntegerConstant 4 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 4.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 h) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 5.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 i) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 6.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 l) (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 7.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 m) (Cast (IntegerConstant 8 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 8.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 o) (Cast (IntegerConstant 9 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 9.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 p) (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 10.000000 (Real 8) ) () ) () .false. .false. )] (Var 2 a) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/llvm-generic_name_01-d3550a6.json0000664000175000017500000000077215227365530024476 0ustar alastairalastair{ "basename": "llvm-generic_name_01-d3550a6", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/generic_name_01.f90", "infile_hash": "cf72bd4f491d240363b4f763c22fc7dbd88483b3a7e5303471f65b40", "outfile": null, "outfile_hash": null, "stdout": "llvm-generic_name_01-d3550a6.stdout", "stdout_hash": "d234d25eb0558c1ba9fe38fb862b2295e26f9742767f59270f3b4272", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do1-a0276c3.json0000664000175000017500000000072415227365530022055 0ustar alastairalastair{ "basename": "ast-do1-a0276c3", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/do1.f", "infile_hash": "1337b06bc7bd2e8399bbec53c3b338a85a7390b1ee48f071715f020d", "outfile": null, "outfile_hash": null, "stdout": "ast-do1-a0276c3.stdout", "stdout_hash": "4cc27315386ac0c92b34381b4bcc0ff2fa8d1904b234ea8af47c12a5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-enum_01-3bcfd6d.json0000664000175000017500000000075115227365530023750 0ustar alastairalastair{ "basename": "fortran-enum_01-3bcfd6d", "cmd": "lfortran --show-fortran --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/enum_01.f90", "infile_hash": "5dba9f630102c9e10a43f8075bc95880e0892b33a7fb16524b5ea275", "outfile": null, "outfile_hash": null, "stdout": "fortran-enum_01-3bcfd6d.f90", "stdout_hash": "61380be62dbeca8ee13ec945530ec15c3b2f906d1f23c631f3c487d5", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/asr-modules_33-b589c22.stdout0000664000175000017500000035006415227365530023734 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { fpm_cmd_install: (Module (SymbolTable 2 { build_model: (ExternalSymbol 2 build_model 4 build_model fpm_modules_33 [] build_model Public ) }) fpm_cmd_install () [fpm_modules_33] .false. .false. .false. ), fpm_dependency_modules_33: (Module (SymbolTable 7 { add_project: (Function (SymbolTable 13 { error: (Variable 13 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 7 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), package: (Variable 13 package [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 7 package_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 13 self [] InOut () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) 7 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_project (FunctionType [(StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 self) (Var 13 package) (Var 13 error)] [] () Public .true. .true. () ), add_project_dependencies: (Function (SymbolTable 14 { error: (Variable 14 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 7 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), main: (Variable 14 main [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), root: (Variable 14 root [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 14 self [] InOut () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) 7 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_project_dependencies (FunctionType [(StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) (String 1 () AssumedLength DescriptorString) (Logical 4) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 14 self) (Var 14 root) (Var 14 main) (Var 14 error)] [] () Public .true. .true. () ), dependency_config_t: (Struct (SymbolTable 8 { name: (Variable 8 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 8 path [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name path] [] Source Public .false. .false. .false. [] () () [] ), dependency_node_t: (Struct (SymbolTable 9 { done: (Variable 9 done [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), proj_dir: (Variable 9 proj_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), revision: (Variable 9 revision [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), update: (Variable 9 update [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_node_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [] [proj_dir revision done update] [] Source Public .false. .false. .false. [] () 7 dependency_config_t [] ), dependency_tree_t: (Struct (SymbolTable 10 { add: (GenericProcedure 10 add [10 add_project 10 add_project_dependencies] Public ), add_project: (StructMethodDeclaration 10 add_project () add_project 7 add_project Source .false. .false. ), add_project_dependencies: (StructMethodDeclaration 10 add_project_dependencies () add_project_dependencies 7 add_project_dependencies Source .false. .false. ), cache: (Variable 10 cache [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dep: (Variable 10 dep [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 7 dependency_node_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dep_dir: (Variable 10 dep_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ndep: (Variable 10 ndep [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 10 unit [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), update: (GenericProcedure 10 update [10 update_dependency] Public ), update_dependency: (StructMethodDeclaration 10 update_dependency () update_dependency 7 update_dependency Source .false. .false. ), verbosity: (Variable 10 verbosity [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_tree_t (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [unit verbosity dep_dir ndep dep cache] [] Source Public .false. .false. .false. [] () () [] ), error_t: (Struct (SymbolTable 11 { message: (Variable 11 message [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) error_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [message] [] Source Public .false. .false. .false. [] () () [] ), package_config_t: (Struct (SymbolTable 12 { name: (Variable 12 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) package_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name] [] Source Public .false. .false. .false. [] () () [] ), update_dependency: (Function (SymbolTable 15 { error: (Variable 15 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 7 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 15 name [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 15 self [] InOut () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) 7 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) update_dependency (FunctionType [(StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) (String 1 () AssumedLength DescriptorString) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 15 self) (Var 15 name) (Var 15 error)] [] () Public .true. .true. () ) }) fpm_dependency_modules_33 () [] .true. .false. .false. ), fpm_model_modules_33: (Module (SymbolTable 17 { dependency_tree_t: (ExternalSymbol 17 dependency_tree_t 7 dependency_tree_t fpm_dependency_modules_33 [] dependency_tree_t Public ), fpm_model_t: (Struct (SymbolTable 18 { build_prefix: (Variable 18 build_prefix [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c_compile_flags: (Variable 18 c_compile_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_compile_flags: (Variable 18 cxx_compile_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), deps: (Variable 18 deps [] Local () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 17 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fortran_compile_flags: (Variable 18 fortran_compile_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), include_tests: (Variable 18 include_tests [] Local (LogicalConstant .true. (Logical 4) ) (LogicalConstant .true. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_flags: (Variable 18 link_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), package_name: (Variable 18 package_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_model_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Logical 4)] [] .true. .false. ) [dependency_tree_t] [package_name fortran_compile_flags c_compile_flags cxx_compile_flags link_flags build_prefix deps include_tests] [] Source Public .false. .false. .false. [] () () [] ) }) fpm_model_modules_33 () [fpm_dependency_modules_33] .true. .false. .false. ), fpm_modules_33: (Module (SymbolTable 4 { build_model: (Function (SymbolTable 5 { 1_add: (ExternalSymbol 5 1_add 10 add 1_dependency_tree_t [] add Private ), 1_dependency_tree_t: (ExternalSymbol 5 1_dependency_tree_t 7 dependency_tree_t fpm_dependency_modules_33 [] dependency_tree_t Private ), 1_dependency_tree_t_add_project: (ExternalSymbol 5 1_dependency_tree_t_add_project 10 add_project fpm_dependency_modules_33 [dependency_tree_t] add_project Public ), 1_fpm_model_t_deps: (ExternalSymbol 5 1_fpm_model_t_deps 18 deps fpm_model_modules_33 [fpm_model_t] deps Public ), error: (Variable 5 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 4 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), model: (Variable 5 model [] Out () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Logical 4)] [] .true. .false. ) 4 fpm_model_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), package: (Variable 5 package [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 4 package_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) build_model (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Logical 4)] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 model) (Var 5 package) (Var 5 error)] [(SubroutineCall 5 1_dependency_tree_t_add_project 5 1_add [((StructInstanceMember (Var 5 model) 5 1_fpm_model_t_deps (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () )) ((Var 5 package)) ((Var 5 error))] (StructInstanceMember (Var 5 model) 5 1_fpm_model_t_deps (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () ) .false. )] () Public .true. .true. () ), error_t: (ExternalSymbol 4 error_t 7 error_t fpm_dependency_modules_33 [] error_t Public ), fpm_model_t: (ExternalSymbol 4 fpm_model_t 17 fpm_model_t fpm_model_modules_33 [] fpm_model_t Public ), package_config_t: (ExternalSymbol 4 package_config_t 7 package_config_t fpm_dependency_modules_33 [] package_config_t Public ) }) fpm_modules_33 () [fpm_dependency_modules_33 fpm_model_modules_33] .true. .false. .false. ), modules_33: (Program (SymbolTable 19 { }) modules_33 [] [(Print (StringConstant "running modules_33 program" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-pragma2-604d549.json0000664000175000017500000000071215227365530022650 0ustar alastairalastair{ "basename": "asr-pragma2-604d549", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/pragma2.f90", "infile_hash": "c76c30115a39aa0c98b24173c8517df1fb525bf101023b12dc38ca3e", "outfile": null, "outfile_hash": null, "stdout": "asr-pragma2-604d549.stdout", "stdout_hash": "a28f1e9d08aff4766a88482cc8aa671f09a1e2e5d93c15ce8fa7de33", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dint_args-0823aa1.json0000664000175000017500000000072715227365530023337 0ustar alastairalastair{ "basename": "asr-dint_args-0823aa1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dint_args.f90", "infile_hash": "2070168962f7bf0a98cb987d443506650737beb6909ff2319b0ab779", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dint_args-0823aa1.stderr", "stderr_hash": "2ef1e87d1dd172a51e033ddada381c518c2e6f939ed7e3222a24225b", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-loop_unroll_large-c6b628b.json0000664000175000017500000000077515227365530025203 0ustar alastairalastair{ "basename": "asr-loop_unroll_large-c6b628b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/loop_unroll_large.f90", "infile_hash": "6dea35d299ef0d2baadd87d2ed6132d3e57e15e85a4bef2d609d1d22", "outfile": null, "outfile_hash": null, "stdout": "asr-loop_unroll_large-c6b628b.stdout", "stdout_hash": "368ad08fd7a8e0ad26379c9c4de723dbff4dc3835757c77b1e45a585", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-subroutine7-27bdbfe.json0000664000175000017500000000072615227365530024110 0ustar alastairalastair{ "basename": "ast-subroutine7-27bdbfe", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subroutine7.f90", "infile_hash": "3a15750c9d608f1988e0dd13f8d956be28a72297be5ef3137777cf2f", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutine7-27bdbfe.stdout", "stdout_hash": "9d2a2173aee6b279a7a3b6a420347b530471957afeb7c66b70719f76", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_34-c5cfc20.json0000664000175000017500000000076115227365530024224 0ustar alastairalastair{ "basename": "asr-intrinsics_34-c5cfc20", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_34.f90", "infile_hash": "b5ac9ea3ec2758f2b774401a5e70d007023974e74b9903bfb4bcb384", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_34-c5cfc20.stdout", "stdout_hash": "052b4764232f56681b13b742ae415d8a3a3150e411ed45e6d03295fa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit9-b56b139.stdout0000664000175000017500000005775615227365530023673 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a: (Function (SymbolTable 2 { a: (Variable 2 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 2 h [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 2 l [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 2 o [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p: (Variable 2 p [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), q: (Variable 2 q [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [d e] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 d)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [e] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 d) (Var 2 e)] [(Assignment (ArrayItem (Var 2 y) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 x) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 3.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 b) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 d) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 f) (Cast (IntegerConstant 4 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 4 (Integer 8) Decimal) () ) () .false. .false. ) (Assignment (Var 2 h) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 i) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 6.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 l) (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 7.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 m) (Cast (IntegerConstant 8 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 8.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 o) (Cast (IntegerConstant 9 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 9.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 p) (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToComplex (Complex 8) (ComplexConstant 10.000000 0.000000 (Complex 8) ) () ) () .false. .false. ) (Assignment (Var 2 q) (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 11.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 r) (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 12.000000 (Real 8) ) () ) () .false. .false. )] (Var 2 a) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-array10-1f60f5f.json0000664000175000017500000000071215227365530022734 0ustar alastairalastair{ "basename": "asr-array10-1f60f5f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array10.f90", "infile_hash": "e8d36796501eef9e4d715dd3dbe300523148b047e92967b60757e132", "outfile": null, "outfile_hash": null, "stdout": "asr-array10-1f60f5f.stdout", "stdout_hash": "c66015e031e5ed5b9886007232e9cd3449c678aecdb9496871b83356", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-substring-59dd84f.json0000664000175000017500000000072015227365530023510 0ustar alastairalastair{ "basename": "ast-substring-59dd84f", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/substring.f90", "infile_hash": "c8a378c73c450c69e6694f02f51b2e1706ee25ae2e9645c28fd98788", "outfile": null, "outfile_hash": null, "stdout": "ast-substring-59dd84f.stdout", "stdout_hash": "5ce0edb1c1102420bfc100af59a72b8b5505be81563698c68d39067c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-nested_04-39da8f9.stdout0000664000175000017500000002052315227365530024014 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__b__y = global i32 0 @__module___lcompilers_created__nested_context__b__yy = global float 0.000000e+00 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [3 x i8] c"b()" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data, i32 0, i32 0), i64 3 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_nested_04_a_b(i32* %x) { .entry: %call_arg_value = alloca i32, align 4 %b = alloca i32, align 4 %y = alloca i32, align 4 %yy = alloca float, align 4 store float 0x401A666660000000, float* %yy, align 4 %0 = load i32, i32* %x, align 4 store i32 %0, i32* %y, align 4 %1 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %1, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %2 = load i32, i32* %y, align 4 store i32 %2, i32* @__module___lcompilers_created__nested_context__b__y, align 4 %3 = load float, float* %yy, align 4 store float %3, float* @__module___lcompilers_created__nested_context__b__yy, align 4 store i32 6, i32* %call_arg_value, align 4 %4 = call i32 @b.__module_nested_04_a_c(i32* %call_arg_value) store i32 %4, i32* %b, align 4 %5 = load i32, i32* @__module___lcompilers_created__nested_context__b__y, align 4 store i32 %5, i32* %y, align 4 %6 = load float, float* @__module___lcompilers_created__nested_context__b__yy, align 4 store float %6, float* %yy, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return %7 = load i32, i32* %b, align 4 ret i32 %7 } define i32 @b.__module_nested_04_a_c(i32* %z) { .entry: %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %c = alloca i32, align 4 %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %z) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry %12 = alloca i64, align 8 %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %12, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @__module___lcompilers_created__nested_context__b__y) %14 = load i64, i64* %12, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %13, i8** %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %14, i64* %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %18 = load i8*, i8** %17, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %20 = load i64, i64* %19, align 8 %21 = trunc i64 %20 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %22 = icmp eq i8* %13, null br i1 %22, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %13) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %23 = alloca i64, align 8 %24 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %23, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__yy) %25 = load i64, i64* %23, align 8 %26 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %24, i8** %26, align 8 %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %25, i64* %27, align 8 %28 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %29 = load i8*, i8** %28, align 8 %30 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %31 = load i64, i64* %30, align 8 %32 = trunc i64 %31 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %29, i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %33 = icmp eq i8* %24, null br i1 %33, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %0, i8* %24) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %34 = load i32, i32* %z, align 4 store i32 %34, i32* %c, align 4 br label %return return: ; preds = %free_done6 br label %FINALIZE_SYMTABLE_c FINALIZE_SYMTABLE_c: ; preds = %return %35 = load i32, i32* %c, align 4 ret i32 %35 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %test = alloca i32, align 4 store i32 5, i32* %call_arg_value, align 4 %2 = call i32 @__module_nested_04_a_b(i32* %call_arg_value) store i32 %2, i32* %test, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nested_04 FINALIZE_SYMTABLE_nested_04: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-allocate_05-48fb994.json0000664000175000017500000000075315227365530023506 0ustar alastairalastair{ "basename": "asr-allocate_05-48fb994", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/allocate_05.f90", "infile_hash": "4aec5c0fcf89fa53670beb1afa8af66e589841696723e0f2f4d966ba", "outfile": null, "outfile_hash": null, "stdout": "asr-allocate_05-48fb994.stdout", "stdout_hash": "b1ca6e0d2aabf8c34654c73a6d80ce2095f4bbc5bf18baae7da54ebc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-int_dp_param-f284039.stdout0000664000175000017500000000537215227365530024521 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @int_dp_param.u = internal global i32 2147483647 @int_dp_param.v = internal global i64 2147483647 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [6 x i8] c"I4,I8\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %prec1 = alloca i32, align 4 store i32 4, i32* %prec1, align 4 %prec2 = alloca i32, align 4 store i32 8, i32* %prec2, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @int_dp_param.u, i64* @int_dp_param.v) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_int_dp_param FINALIZE_SYMTABLE_int_dp_param: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-submodule_02-9152b7b.json0000664000175000017500000000075615227365530023703 0ustar alastairalastair{ "basename": "asr-submodule_02-9152b7b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/submodule_02.f90", "infile_hash": "9ccb7a7264e9e91b29172a78a9dd1ba10f228c6d32082b5391653881", "outfile": null, "outfile_hash": null, "stdout": "asr-submodule_02-9152b7b.stdout", "stdout_hash": "944c5df5f25765d18e28769446b7771b3102ae05233432cd81af4e5f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_14-302666f.stdout0000664000175000017500000010115715227365530024363 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_14: (Program (SymbolTable 2 { i1: (Variable 2 i1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k1: (Variable 2 k1 [] Local (IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k10: (Variable 2 k10 [] Local (IntrinsicElementalFunction SelectedCharKind [(StringConstant "default" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) )] 0 (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) ) (IntegerConstant 1 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k11: (Variable 2 k11 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k12: (Variable 2 k12 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k2: (Variable 2 k2 [] Local (IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k3: (Variable 2 k3 [] Local (IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 8) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k4: (Variable 2 k4 [] Local (IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 8 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k5: (Variable 2 k5 [] Local (IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 10 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k6: (Variable 2 k6 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k7: (Variable 2 k7 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k8: (Variable 2 k8 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 8) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k9: (Variable 2 k9 [] Local (IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 2 s1 [] Local () () Default (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_14 [] [(Assignment (Var 2 s1) (StringConstant "default" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 i1) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 5 (Integer 8) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k3)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 8 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k4)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(IntegerConstant 10 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (Var 2 k5)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k6)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k7)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 8) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k8)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (Var 2 k9)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedCharKind [(StringConstant "default" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) )] 0 (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) ) (Var 2 k10)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedIntKind [(Var 2 i1)] 0 (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(Var 2 i1) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedCharKind [(Var 2 s1)] 0 (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (Var 2 k11)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(IntrinsicElementalFunction SelectedRealKind [(IntegerConstant 10 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (Var 2 k12)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_travel_01-cd2b445.stdout0000664000175000017500000052116515227365530025522 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_travel_01: (Program (SymbolTable 22 { add_real: (ExternalSymbol 22 add_real 2 add_real template_travel_01_math [] add_real Public ), operations: (ExternalSymbol 22 operations 5 operations template_travel_01_travel [] operations Public ), slash_real: (ExternalSymbol 22 slash_real 2 slash_real template_travel_01_math [] slash_real Public ), test_template: (ExternalSymbol 22 test_template 18 test_template template_travel_01_m [] test_template Public ), travel_tmpl: (ExternalSymbol 22 travel_tmpl 5 travel_tmpl template_travel_01_travel [] travel_tmpl Public ) }) template_travel_01 [template_travel_01_m template_travel_01_math template_travel_01_travel] [(SubroutineCall 22 test_template () [] () .false. )] ), template_travel_01_m: (Module (SymbolTable 18 { add_real: (ExternalSymbol 18 add_real 2 add_real template_travel_01_math [] add_real Public ), operations: (ExternalSymbol 18 operations 5 operations template_travel_01_travel [] operations Public ), slash_real: (ExternalSymbol 18 slash_real 2 slash_real template_travel_01_math [] slash_real Public ), test_template: (Function (SymbolTable 19 { __asr_avg_s_from_t: (Function (SymbolTable 23 { avg: (Variable 23 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 23 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 23 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 23 t1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 23 t2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr_avg_s_from_t (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 23 d1) (Var 23 t1) (Var 23 d2) (Var 23 t2)] [(Assignment (Var 23 avg) (FunctionCall 18 slash_real () [((FunctionCall 18 add_real () [((Var 23 d1)) ((Var 23 d2))] (Real 4) () () )) ((FunctionCall 18 add_real () [((Var 23 t1)) ((Var 23 t2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 23 avg) Public .true. .true. () ), avg_real_s_from_s: (Function (SymbolTable 21 { avg: (Variable 21 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 21 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 21 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 21 s1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 21 s2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_real_s_from_s (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [__asr_avg_s_from_t] [(Var 21 d1) (Var 21 s1) (Var 21 d2) (Var 21 s2)] [(Assignment (Var 21 avg) (FunctionCall 19 __asr_avg_s_from_t () [((Var 21 d1)) ((FunctionCall 18 slash_real () [((Var 21 d1)) ((Var 21 s1))] (Real 4) () () )) ((Var 21 d2)) ((FunctionCall 18 slash_real () [((Var 21 d2)) ((Var 21 s2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 21 avg) Private .true. .true. () ), avg_real_s_from_t: (Function (SymbolTable 20 { avg: (Variable 20 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 20 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 20 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 20 t1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 20 t2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_real_s_from_t (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 20 d1) (Var 20 t1) (Var 20 d2) (Var 20 t2)] [(Assignment (Var 20 avg) (FunctionCall 18 slash_real () [((FunctionCall 18 add_real () [((Var 20 d1)) ((Var 20 d2))] (Real 4) () () )) ((FunctionCall 18 add_real () [((Var 20 t1)) ((Var 20 t2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 20 avg) Public .true. .true. () ), s1: (Variable 19 s1 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 19 s2 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 19 s1) (FunctionCall 19 avg_real_s_from_t () [((RealConstant 1.000000 (Real 4) )) ((RealConstant 3.000000 (Real 4) )) ((RealConstant 1.500000 (Real 4) )) ((RealConstant 4.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 19 s2) (FunctionCall 19 avg_real_s_from_s () [((RealConstant 1.100000 (Real 4) )) ((RealConstant 0.500000 (Real 4) )) ((RealConstant 2.000000 (Real 4) )) ((RealConstant 0.750000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "s1=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 19 s1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "s2=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 19 s2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), travel_tmpl: (ExternalSymbol 18 travel_tmpl 5 travel_tmpl template_travel_01_travel [] travel_tmpl Public ) }) template_travel_01_m () [template_travel_01_math template_travel_01_travel template_travel_01_m] .false. .false. .false. ), template_travel_01_math: (Module (SymbolTable 2 { add_real: (Function (SymbolTable 3 { total: (Variable 3 total [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 x) (Var 3 y)] [(Assignment (Var 3 total) (RealBinOp (Var 3 x) Add (Var 3 y) (Real 4) () ) () .false. .false. )] (Var 3 total) Public .true. .true. () ), slash_real: (Function (SymbolTable 4 { total: (Variable 4 total [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) slash_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 x) (Var 4 y)] [(Assignment (Var 4 total) (RealBinOp (Var 4 x) Div (Var 4 y) (Real 4) () ) () .false. .false. )] (Var 4 total) Public .true. .true. () ) }) template_travel_01_math () [] .false. .false. .false. ), template_travel_01_travel: (Module (SymbolTable 5 { add_real: (ExternalSymbol 5 add_real 2 add_real template_travel_01_math [] add_real Public ), operations: (Requirement (SymbolTable 6 { d: (Variable 6 d [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d_divided_by_s: (Function (SymbolTable 10 { d: (Variable 10 d [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 10 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 10 quotient [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_s (FunctionType [(TypeParameter d ) (TypeParameter s )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 10 n) (Var 10 d)] [] (Var 10 quotient) Private .true. .true. () ), d_divided_by_t: (Function (SymbolTable 9 { d: (Variable 9 d [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 9 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 9 quotient [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_t (FunctionType [(TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 9 n) (Var 9 d)] [] (Var 9 quotient) Private .true. .true. () ), plus_d: (Function (SymbolTable 7 { l: (Variable 7 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 7 r [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 7 total [] ReturnVar () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_d (FunctionType [(TypeParameter d ) (TypeParameter d )] (TypeParameter d ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 7 l) (Var 7 r)] [] (Var 7 total) Private .true. .true. () ), plus_t: (Function (SymbolTable 8 { l: (Variable 8 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 8 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 8 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 8 l) (Var 8 r)] [] (Var 8 total) Private .true. .true. () ), s: (Variable 6 s [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 6 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) operations [d t s plus_d plus_t d_divided_by_t d_divided_by_s] [] ), slash_real: (ExternalSymbol 5 slash_real 2 slash_real template_travel_01_math [] slash_real Public ), travel_tmpl: (Template (SymbolTable 11 { avg_s_from_s: (Function (SymbolTable 17 { avg: (Variable 17 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 17 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 17 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 17 s1 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 17 s2 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_s (FunctionType [(TypeParameter d ) (TypeParameter s ) (TypeParameter d ) (TypeParameter s )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [d_divided_by_s avg_s_from_t] [(Var 17 d1) (Var 17 s1) (Var 17 d2) (Var 17 s2)] [(Assignment (Var 17 avg) (FunctionCall 11 avg_s_from_t () [((Var 17 d1)) ((FunctionCall 11 d_divided_by_s () [((Var 17 d1)) ((Var 17 s1))] (TypeParameter t ) () () )) ((Var 17 d2)) ((FunctionCall 11 d_divided_by_s () [((Var 17 d2)) ((Var 17 s2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 17 avg) Private .true. .true. () ), avg_s_from_t: (Function (SymbolTable 16 { avg: (Variable 16 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 16 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 16 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 16 t1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 16 t2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_t (FunctionType [(TypeParameter d ) (TypeParameter t ) (TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus_d plus_t d_divided_by_t] [(Var 16 d1) (Var 16 t1) (Var 16 d2) (Var 16 t2)] [(Assignment (Var 16 avg) (FunctionCall 11 d_divided_by_t () [((FunctionCall 11 plus_d () [((Var 16 d1)) ((Var 16 d2))] (TypeParameter d ) () () )) ((FunctionCall 11 plus_t () [((Var 16 t1)) ((Var 16 t2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 16 avg) Public .true. .true. () ), d: (Variable 11 d [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d_divided_by_s: (Function (SymbolTable 15 { d: (Variable 15 d [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 15 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 15 quotient [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_s (FunctionType [(TypeParameter d ) (TypeParameter s )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 15 n) (Var 15 d)] [] (Var 15 quotient) Private .true. .true. () ), d_divided_by_t: (Function (SymbolTable 14 { d: (Variable 14 d [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 14 n [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), quotient: (Variable 14 quotient [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_t (FunctionType [(TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 14 n) (Var 14 d)] [] (Var 14 quotient) Private .true. .true. () ), plus_d: (Function (SymbolTable 12 { l: (Variable 12 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 12 r [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 12 total [] ReturnVar () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_d (FunctionType [(TypeParameter d ) (TypeParameter d )] (TypeParameter d ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 12 l) (Var 12 r)] [] (Var 12 total) Private .true. .true. () ), plus_t: (Function (SymbolTable 13 { l: (Variable 13 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 13 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 13 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 13 l) (Var 13 r)] [] (Var 13 total) Private .true. .true. () ), s: (Variable 11 s [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 11 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) travel_tmpl [d t s plus_d plus_t d_divided_by_t d_divided_by_s] [(Require operations [d t s plus_d plus_t d_divided_by_t d_divided_by_s] )] ) }) template_travel_01_travel () [template_travel_01_math template_travel_01_travel] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-boz_01-def9db5.stdout0000664000175000017500000002010415227365530023447 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [18 x i8] c"I4,I4,I4,I4,I4,R4\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %boz_1 = alloca i32, align 4 %boz_2 = alloca i32, align 4 %boz_3 = alloca i32, align 4 %boz_4 = alloca i32, align 4 %boz_5 = alloca i32, align 4 %boz_6 = alloca float, align 4 store i32 93, i32* %boz_1, align 4 store i32 1255, i32* %boz_2, align 4 store i32 2748, i32* %boz_3, align 4 store i32 180150001, i32* %boz_4, align 4 store i32 180150001, i32* %boz_5, align 4 store float 0x36DA000000000000, float* %boz_6, align 4 %3 = load i32, i32* %boz_4, align 4 %4 = load i32, i32* %boz_5, align 4 %5 = icmp ne i32 %3, %4 br i1 %5, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %6 = load i32, i32* %boz_1, align 4 %7 = icmp ne i32 %6, 93 br i1 %7, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %8 = load i32, i32* %boz_2, align 4 %9 = icmp ne i32 %8, 1255 br i1 %9, label %then4, label %else5 then4: ; preds = %ifcont3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %ifcont3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 %10 = load i32, i32* %boz_3, align 4 %11 = icmp ne i32 %10, 2748 br i1 %11, label %then7, label %else8 then7: ; preds = %ifcont6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont9 else8: ; preds = %ifcont6 br label %ifcont9 ifcont9: ; preds = %else8, %then7 %12 = load i32, i32* %boz_4, align 4 %13 = icmp ne i32 %12, 180150001 br i1 %13, label %then10, label %else11 then10: ; preds = %ifcont9 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont12 else11: ; preds = %ifcont9 br label %ifcont12 ifcont12: ; preds = %else11, %then10 %14 = load i32, i32* %boz_5, align 4 %15 = icmp ne i32 %14, 180150001 br i1 %15, label %then13, label %else14 then13: ; preds = %ifcont12 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %ifcont12 br label %ifcont15 ifcont15: ; preds = %else14, %then13 %16 = alloca i64, align 8 %17 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @serialization_info, i32 0, i32 0), i64* %16, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %boz_1, i32* %boz_2, i32* %boz_3, i32* %boz_4, i32* %boz_5, float* %boz_6) %18 = load i64, i64* %16, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %17, i8** %19, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %18, i64* %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %22 = load i8*, i8** %21, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %24 = load i64, i64* %23, align 8 %25 = trunc i64 %24 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %22, i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %26 = icmp eq i8* %17, null br i1 %26, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont15 call void @_lfortran_free_alloc(i8* %2, i8* %17) br label %free_done free_done: ; preds = %free_nonnull, %ifcont15 br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_boz_01 FINALIZE_SYMTABLE_boz_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/asr-associate_05-4641244.json0000664000175000017500000000075615227365530023517 0ustar alastairalastair{ "basename": "asr-associate_05-4641244", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/associate_05.f90", "infile_hash": "d3e3285cba1bab5ce2798d7c376c75626b7e5d36b0e47dc62a16a0b1", "outfile": null, "outfile_hash": null, "stdout": "asr-associate_05-4641244.stdout", "stdout_hash": "34ced5fb273947cff92809c80578203b3955f3caa63479ea57a26ddd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_57-fd2be24.stdout0000664000175000017500000000055315227365530023726 0ustar alastairalastairkind sp dp ep epsilon: 0.119E-0006 0.222E-0015 0.222E-0015 tiny : 0.118E-0037 0.223E-0307 0.223E-0307 huge : 0.340E+0039 0.180E+0309 0.180E+0309 epsilon: 1.19E-0007 2.22E-0016 2.22E-0016 tiny : 1.18E-0038 2.23E-0308 2.23E-0308 huge : 3.40E+0038 1.80E+0308 1.80E+0308 "0.22222E-200" " 0.22222-200" "2.22222E-201" " 2.22222-201" lfortran-0.64.0/tests/reference/asr-write2-3444284.json0000664000175000017500000000070715227365530022454 0ustar alastairalastair{ "basename": "asr-write2-3444284", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/write2.f90", "infile_hash": "e32f4a7448b2f59536da5f9579270c896bf9d80ebadd03daccc928a1", "outfile": null, "outfile_hash": null, "stdout": "asr-write2-3444284.stdout", "stdout_hash": "7e69afb5e06a658fae4f5dbb3ef8de71b8d3f1d4a1959cbf81376f6a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-expr_07-d5a6b4c.json0000664000175000017500000000073015227365530023333 0ustar alastairalastair{ "basename": "julia-expr_07-d5a6b4c", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/expr_07.f90", "infile_hash": "3104b4735ed58e4c3d370db99249102fa43c866834c04484ea2b7bae", "outfile": null, "outfile_hash": null, "stdout": "julia-expr_07-d5a6b4c.stdout", "stdout_hash": "cf9271a274f8e200abd752d92c0c908cbb4982ca0c3f92352de65f84", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-doloop_03-9c463c5.stdout0000664000175000017500000002335615227365530023560 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { doloop_03: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) doloop_03 [] [(Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [] [] ) (If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Exit () )] [] )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Exit () )] [] ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Cycle () )] [] ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 53 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-write5-2f63ce9.stdout0000664000175000017500000000005215227365530023265 0ustar alastairalastairhibye first , last Hello world! lfortran-0.64.0/tests/reference/ast-data1-58e5b8d.json0000664000175000017500000000070415227365530022461 0ustar alastairalastair{ "basename": "ast-data1-58e5b8d", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/data1.f90", "infile_hash": "958a14b00f4c624f5f8c444b2e93bcf090a57ee3c44143ec6671b5f6", "outfile": null, "outfile_hash": null, "stdout": "ast-data1-58e5b8d.stdout", "stdout_hash": "8771085e2c96c4c9792a3dd6794b346bcc9318d13ed0ec3d91cc09f8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-print_intrinsics-8e5d219.stdout0000664000175000017500000001514615227365530025362 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { print_intrinsics: (Program (SymbolTable 2 { dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 1.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sp: (Variable 2 sp [] Local (TypeInquiry Kind (Real 4) (RealConstant 1.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) print_intrinsics [] [(Print (StringFormat () [(StringConstant "pi=acos(-1.0_sp) =\"" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (IntrinsicElementalFunction Acos [(RealUnaryMinus (RealConstant 1.000000 (Real 4) ) (Real 4) (RealConstant -1.000000 (Real 4) ) )] 0 (Real 4) (RealConstant 3.141593 (Real 4) ) ) (StringConstant "\"" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "pi=acos(-1.0_dp) =\"" (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (IntrinsicElementalFunction Acos [(RealUnaryMinus (RealConstant 1.000000 (Real 8) ) (Real 8) (RealConstant -1.000000 (Real 8) ) )] 0 (Real 8) (RealConstant 3.141593 (Real 8) ) ) (StringConstant "\"" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-where_04-a7fce45.stdout0000664000175000017500000005540115227365530023531 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { compare_solutions: (Function (SymbolTable 3 { absdiff: (Variable 3 absdiff [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reldiff: (Variable 3 reldiff [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compare_solutions (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [solution] [] [(Assignment (Var 3 reldiff) (ArrayConstant 8 [0.00000000e+00, 0.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 3 absdiff) (RealConstant 0.500000 (Real 4) ) () .false. .false. ) (Where (RealCompare (FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () ) NotEq (RealConstant 0.000000 (Real 4) ) (Array (Logical 4) [(() ())] DescriptorArray ) () ) [(Assignment (Var 3 reldiff) (RealBinOp (ArrayBroadcast (Var 3 absdiff) (IntrinsicArrayFunction Shape [(IntrinsicElementalFunction Abs [(FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () )] 0 (Array (Real 4) [(() ())] DescriptorArray ) () )] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [(() ())] DescriptorArray ) () ) Div (IntrinsicElementalFunction Abs [(FunctionCall 2 solution () [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () () )] 0 (Array (Real 4) [(() ())] DescriptorArray ) () ) (Array (Real 4) [(() ())] DescriptorArray ) () ) () .false. .false. )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 3 reldiff) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 5.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 3 reldiff) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 5.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 3 reldiff)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), solution: (Function (SymbolTable 4 { x: (Variable 4 x [] ReturnVar () () Default (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) solution (FunctionType [] (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 4 x) (ArrayConstant 8 [1.00000001e-01, 1.00000001e-01] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. )] (Var 4 x) Public .true. .true. () ) }) main [] [(SubroutineCall 2 compare_solutions () [] () .false. )] ) }) [] ) ././@LongLink0000644000000000000000000000014700000000000011605 Lustar rootrootlfortran-0.64.0/tests/reference/pass_transform_optional_argument_functions-functions_15-581089a.stdoutlfortran-0.64.0/tests/reference/pass_transform_optional_argument_functions-functions_15-581089a.stdo0000664000175000017500000012255715227365530034023 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_15: (Program (SymbolTable 4 { __libasr_created_variable_: (Variable 4 __libasr_created_variable_ [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_1: (Variable 4 __libasr_created_variable_1 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_2: (Variable 4 __libasr_created_variable_2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_3: (Variable 4 __libasr_created_variable_3 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_created_variable_4: (Variable 4 __libasr_created_variable_4 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 4 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 5 { __libasr_is_present_x: (Variable 5 __libasr_is_present_x [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 5 f [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Integer 4) (Logical 4)] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 x) (Var 5 __libasr_is_present_x)] [(Assignment (Var 5 f) (Var 5 __libasr_is_present_x) () .false. .false. )] (Var 5 f) Public .true. .true. () ), sub_1: (ExternalSymbol 4 sub_1 2 sub_1 functions_15_module_1 [] sub_1 Public ) }) functions_15 [functions_15_module_1] [(Assignment (Var 4 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 4 b) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .true. (Logical 4) )) ((RealConstant 12.000000 (Real 4) )) ((LogicalConstant .true. (Logical 4) )) ((IntegerConstant 5 (Integer 4) Decimal)) ((LogicalConstant .true. (Logical 4) )) ((RealConstant 6.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .false. (Logical 4) )) ((Var 4 __libasr_created_variable_1)) ((LogicalConstant .false. (Logical 4) )) ((Var 4 __libasr_created_variable_2)) ((LogicalConstant .false. (Logical 4) )) ((RealConstant 6.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .true. (Logical 4) )) ((Var 4 __libasr_created_variable_3)) ((LogicalConstant .false. (Logical 4) )) ((IntegerConstant 78 (Integer 4) Decimal)) ((LogicalConstant .true. (Logical 4) )) ((RealConstant 117.000000 (Real 4) ))] () .false. ) (SubroutineCall 4 sub_1 () [((Var 4 a)) ((Var 4 b)) ((LogicalConstant .false. (Logical 4) )) ((RealConstant 58.000000 (Real 4) )) ((LogicalConstant .true. (Logical 4) )) ((Var 4 __libasr_created_variable_4)) ((LogicalConstant .false. (Logical 4) )) ((RealConstant 123.000000 (Real 4) ))] () .false. ) (Print (StringFormat () [(Var 4 a) (Var 4 b)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 4 a) NotEq (IntegerConstant 144288208 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Var 4 b) NotEq (RealConstant 1477476.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(FunctionCall 4 f () [((Var 4 __libasr_created_variable_)) ((LogicalConstant .false. (Logical 4) ))] (Logical 4) () () ) (FunctionCall 4 f () [((IntegerConstant 42 (Integer 4) Decimal)) ((LogicalConstant .true. (Logical 4) ))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), functions_15_module_1: (Module (SymbolTable 2 { sub_1: (Function (SymbolTable 3 { __libasr_is_present_d: (Variable 3 __libasr_is_present_d [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_is_present_e: (Variable 3 __libasr_is_present_e [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 3 a [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 3 d [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 3 e [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 3 f [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub_1 (FunctionType [(Integer 4) (Real 4) (Logical 4) (Real 4) (Logical 4) (Integer 4) (Logical 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c) (Var 3 d) (Var 3 __libasr_is_present_d) (Var 3 e) (Var 3 __libasr_is_present_e) (Var 3 f)] [(If () (Var 3 __libasr_is_present_d) [(Assignment (Var 3 a) (Cast (RealBinOp (RealBinOp (Var 3 b) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) Add (Var 3 d) (Real 4) () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (If () (Var 3 __libasr_is_present_e) [(Assignment (Var 3 b) (RealBinOp (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) Add (Cast (Var 3 e) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. )] [(Assignment (Var 3 b) (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) () .false. .false. )] )] [(Assignment (Var 3 a) (Cast (RealBinOp (Var 3 b) Pow (IntegerConstant 2 (Integer 4) Decimal) (Real 4) () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (If () (Var 3 __libasr_is_present_e) [(Assignment (Var 3 b) (RealBinOp (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) Add (Cast (Var 3 e) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. )] [(Assignment (Var 3 b) (RealBinOp (Var 3 b) Mul (Var 3 f) (Real 4) () ) () .false. .false. )] )] )] () Public .true. .true. () ) }) functions_15_module_1 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_error_01b-e284c9a.stderr0000664000175000017500000000055115227365530025500 0ustar alastairalastairsemantic error: Template argument plus_t has not been declared in template specification. --> tests/errors/template_error_01b.f90:19:5 - 41:1 | 19 | template travel_tmpl(D, T, S, plus_D, plus_T, D_divided_by_T, D_divided_by_S) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 41 | | ...^ lfortran-0.64.0/tests/reference/ast-parsing_02-740c1e5.stdout0000664000175000017500000002546715227365530023725 0ustar alastairalastair(TranslationUnit [(Module program_parsing_02_submodule (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(complex [] [] () 1 Equal ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(true [] [] () (Logical .true. ()) Equal ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(false [] [] () (Logical .false. ()) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (DerivedType type [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Declaration (AttrType TypeType [] () type None ) [(SimpleAttribute AttrAllocatable )] [(types [(() () DimensionExpr)] [] () () None ())] () )] [] ) (Interface (InterfaceHeader) () [(InterfaceProc (Subroutine function [(integer) (real)] [(SimpleAttribute AttrModule )] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(integer [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent Out )] [(real [] [] () () None ())] () )] [] [] [] ) )] )] [] [] ) (Submodule program_parsing_02_submodule () program_parsing_02_module (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Procedure function [] [(SimpleAttribute AttrModule )] () [] [] [] [] [(Assignment 0 real (* 2 integer) () )] [] )] ) (Program program_parsing_02 (TriviaNode [(EndOfLine) (EndOfLine)] [] ) [(Use [] program_parsing_02_submodule [(UseSymbol complex character ) (UseSymbol function subroutine ) (UseSymbol true then ) (UseSymbol false else ) (UseSymbol type () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(integer [] [] () () None ()) (real [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () type None ) [] [(types [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 integer character (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! Thanks to https://stackoverflow.com/a/57015100/1876449" )] ) ) (Assignment 0 types (FuncCallOrArray type [] [] [(types (ArrayInitializer () () [(FuncCallOrArray type [] [] [(types (ArrayInitializer () () [(FuncCallOrArray type [] [] [] [] [] ) (FuncCallOrArray type [] [] [] [] [] ) (FuncCallOrArray type [] [] [] [] [] )] ))] [] [] ) (FuncCallOrArray type [] [] [] [] [] )] ))] [] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Block 0 block [] [] [(Declaration (AttrType TypeLogical [] () () None ) [] [(if [] [] () () None ())] () )] [(If 0 endif then [(Assignment 0 if then () )] [(If 0 () else [(Assignment 0 if else () )] [(Assignment 0 if (BoolOp (not (Parenthesis else )) And (not (Parenthesis if )) ) () )] () () () )] () () () ) (Print 0 () [if] () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (AssociateBlock 0 associate [(logical [] [] () character Arrow ()) (complex [] [] () real Arrow ())] [(SubroutineCall 0 subroutine [] [(() logical () 0) (() complex () 0)] [] [] () ) (Print 0 () [(Parenthesis complex )] () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/llvm-read_83-d6544e3.json0000664000175000017500000000074215227365530023013 0ustar alastairalastair{ "basename": "llvm-read_83-d6544e3", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/read_83.f90", "infile_hash": "617992e5d0104cdcfaa0fa8ecf772fc5b51badc6499cc8369e0c9654", "outfile": null, "outfile_hash": null, "stdout": "llvm-read_83-d6544e3.stdout", "stdout_hash": "47f9f2d340cb680fc3a9822dbaedf41c20dee9bc6854d05764f0d4a8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_without_line_04-1467181.stderr0000664000175000017500000000023415227365530026332 0ustar alastairalastairsyntax error: Statement or Declaration expected inside program, found Expression --> tests/errors/program_without_line_04.f90:2:1 | 2 | 2 + 2 | ^^^^^ lfortran-0.64.0/tests/reference/asr-array_size_04-dcfa313.json0000664000175000017500000000074315227365530024203 0ustar alastairalastair{ "basename": "asr-array_size_04-dcfa313", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_size_04.f90", "infile_hash": "2984c2c4ac5b8a12bef7a8728bf6614dd5ac8517764529aeaba03c7c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_size_04-dcfa313.stderr", "stderr_hash": "76e96b7d8e04f7a510ca8009d122eb4cc631ca43c2a2efae3e4d0b85", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-end_module_name-8436c0b.stderr0000664000175000017500000000032215227365530025035 0ustar alastairalastairsyntax error: End module name does not match module name --> tests/errors/end_module_name.f90:1:1 - 3:16 | 1 | module name1 | ^^^^^^^^^^^^... ... | 3 | end module name2 | ...^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-implicit_interface2-5630d9d.json0000664000175000017500000000100315227365530025304 0ustar alastairalastair{ "basename": "asr-implicit_interface2-5630d9d", "cmd": "lfortran --show-asr --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/implicit_interface2.f90", "infile_hash": "17d4faebf0f6b3174637c94c038202e4d7eb71b2311836c34fa78898", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_interface2-5630d9d.stdout", "stdout_hash": "c104aae7be3794e26260ca04dd5061f0a45d55f9ab6a477b669bf141", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_line_limit-0a3f0f0.stdout0000664000175000017500000000217315227365530026344 0ustar alastairalastair(TranslationUnit [(Program test () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ())] () )] [(Print 0 () [(String "this is a test to see if the fixed form parser properly ignores text past column 72" ())] () ) (Print 0 () [(String "test that we can still see the quote in the last column" ())] () ) (Print 0 () [(String "test that we avoid double \" lookahead in col 73 " ())] () ) (Print 0 () [(String " end-of-line double \"" ())] () ) (Assignment 0 a (+ 5 3) () )] [] )] ) lfortran-0.64.0/tests/reference/run-implicit_typing1-40bb07b.stderr0000664000175000017500000000011415227365530025272 0ustar alastairalastairCannot use --disable-implicit-typing and --implicit-typing at the same time lfortran-0.64.0/tests/reference/ast-if2-65737e5.stdout0000664000175000017500000000352415227365530022364 0ustar alastairalastair(TranslationUnit [(Program expr2 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] [(Assignment 0 time 12 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (If 0 () (< time 10) [(Print 0 () [(String "Good morning" ())] () )] [(If 0 () (< time 20) [(Print 0 () [(String "Good day" ())] () )] [(Print 0 () [(String "Good evening" ())] () )] () (TriviaNode [(EOLComment "! Comment 2" )] [(EOLComment "! Comment 3" )] ) () )] (TriviaNode [] [(EOLComment "! Comment 1" )] ) () (TriviaNode [] [(EOLComment "! Comment 4" ) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-critical1-30285fa.stdout0000664000175000017500000000127715227365530024303 0ustar alastairalastairprogram critical1 implicit none integer :: joblist[*], job integer :: a, b integer :: IntegerSample character(len=50) :: Sample if (this_image() == 1) then read(*, *) joblist end if sync all do critical job = joblist[1] joblist[1] = job - 1 end critical ! >>>>>>>> Syntax check(AST) >>>>>>>> critical () IntegerSample = 0 end critical critical (stat = IntegerSample) Sample = "Error message" end critical critical (errmsg = Sample) Sample = "Error message" end critical ! <<<<<<<< Syntax check(AST) <<<<<<<< if (job > 0) then b = a**2 + b**2 else exit end if end do sync all end program critical1 lfortran-0.64.0/tests/reference/lookup_name-function_call1-c233951.stdout0000664000175000017500000000027515227365530026313 0ustar alastairalastair[{"kind":2,"location":{"range":{"start":{"character":5,"line":8},"end":{"character":24,"line":12}},"uri":"tests/function_call1.f90"},"name":"eval_1d","filename":"tests/function_call1.f90"}]lfortran-0.64.0/tests/reference/llvm-sin_03-14abee4.json0000664000175000017500000000073715227365530023014 0ustar alastairalastair{ "basename": "llvm-sin_03-14abee4", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/sin_03.f90", "infile_hash": "3c036b8aabdbfddc3c46fb69183c427f7991b105c361b785872acf59", "outfile": null, "outfile_hash": null, "stdout": "llvm-sin_03-14abee4.stdout", "stdout_hash": "c50727f98c1e334ffd1e50c3a8d805c734c6e1417a517e98e7a18901", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-nested_01-b01694c.stdout0000664000175000017500000000542115227365530023712 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [3 x i8] c"d()" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data, i32 0, i32 0), i64 3 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.1 = private constant [3 x i8] c"b()" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.1, i32 0, i32 0), i64 3 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_nested_01_a_b() { .entry: %b = alloca i32, align 4 %e = alloca i32, align 4 %0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %0, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %1 = call i32 @b.__module_nested_01_a_d() store i32 %1, i32* %e, align 4 store i32 0, i32* %b, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return %2 = load i32, i32* %b, align 4 ret i32 %2 } define i32 @b.__module_nested_01_a_d() { .entry: %d = alloca i32, align 4 %0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %0, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) store i32 1, i32* %d, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_d FINALIZE_SYMTABLE_d: ; preds = %return %1 = load i32, i32* %d, align 4 ret i32 %1 } declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %c = alloca i32, align 4 %2 = call i32 @__module_nested_01_a_b() store i32 %2, i32* %c, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nested_01 FINALIZE_SYMTABLE_nested_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-class_01-82031c0.stdout0000664000175000017500000002356515227365530023456 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> %class_circle1.circle.3_class = type <{ i32 (...)**, %class_circle1.circle.3* }> %class_circle1.circle.3 = type { float } @__module_class_circle1_pi = global float 0x400921FB60000000 @_Name_circle = private unnamed_addr constant [7 x i8] c"circle\00", align 1 @_Type_Info_circle = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @_Name_circle, i32 0, i32 0), i8* inttoptr (i64 4 to i8*), i8* null }, align 8 @_VTable_circle = linkonce_odr unnamed_addr constant { [7 x i8*] } { [7 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i8* bitcast (void (i8*, i8*)* @_copy_class_circle1_circle to i8*), i8* bitcast (void (i8**)* @_allocate_struct_class_circle1_circle to i8*), i8* bitcast (void (i8*)* @finalize_StructType__circle_3_of_class_circle1_for_UPoly to i8*), i8* bitcast (float (%class_circle1.circle.3_class*)* @__module_class_circle1_circle_area to i8*), i8* bitcast (void (%class_circle1.circle.3_class*)* @__module_class_circle1_circle_print to i8*)] }, align 8 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [25 x i8] c"S-DESC-12,R4,S-DESC-8,R4\00", align 1 @string_const_data = private constant [12 x i8] c"Circle: r = " @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data, i32 0, i32 0), i64 12 }> @string_const_data.1 = private constant [8 x i8] c" area = " @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([8 x i8], [8 x i8]* @string_const_data.1, i32 0, i32 0), i64 8 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @__module_class_circle1_circle_area(%class_circle1.circle.3_class* %this) { .entry: %area = alloca float, align 4 %0 = load float, float* @__module_class_circle1_pi, align 4 %1 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %this, i32 0, i32 1 %2 = load %class_circle1.circle.3*, %class_circle1.circle.3** %1, align 8 %3 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %2, i32 0, i32 0 %4 = load float, float* %3, align 4 %simplified_pow_operation = fmul float %4, %4 %5 = fmul float %0, %simplified_pow_operation store float %5, float* %area, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_circle_area FINALIZE_SYMTABLE_circle_area: ; preds = %return %6 = load float, float* %area, align 4 ret float %6 } define void @__module_class_circle1_circle_print(%class_circle1.circle.3_class* %this) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %area = alloca float, align 4 %1 = bitcast %class_circle1.circle.3_class* %this to float (%class_circle1.circle.3_class*)*** %2 = load float (%class_circle1.circle.3_class*)**, float (%class_circle1.circle.3_class*)*** %1, align 8 %3 = getelementptr inbounds float (%class_circle1.circle.3_class*)*, float (%class_circle1.circle.3_class*)** %2, i32 3 %4 = load float (%class_circle1.circle.3_class*)*, float (%class_circle1.circle.3_class*)** %3, align 8 %5 = call float %4(%class_circle1.circle.3_class* %this) store float %5, float* %area, align 4 %6 = alloca i64, align 8 %7 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %this, i32 0, i32 1 %8 = load %class_circle1.circle.3*, %class_circle1.circle.3** %7, align 8 %9 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %8, i32 0, i32 0 %10 = load float, float* %9, align 4 %11 = alloca float, align 4 store float %10, float* %11, align 4 %12 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @serialization_info, i32 0, i32 0), i64* %6, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, float* %11, %string_descriptor* @string_const.2, float* %area) %13 = load i64, i64* %6, align 8 %14 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %12, i8** %14, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %13, i64* %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %17 = load i8*, i8** %16, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %19 = load i64, i64* %18, align 8 %20 = trunc i64 %19 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %17, i32 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %21 = icmp eq i8* %12, null br i1 %21, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %12) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_circle_print FINALIZE_SYMTABLE_circle_print: ; preds = %return ret void } define linkonce_odr void @_copy_class_circle1_circle(i8* %0, i8* %1) { entry: %2 = bitcast i8* %0 to %class_circle1.circle.3* %3 = bitcast i8* %1 to %class_circle1.circle.3* %4 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %2, i32 0, i32 0 %5 = load float, float* %4, align 4 %6 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %3, i32 0, i32 0 br i1 true, label %then, label %else then: ; preds = %entry store float %5, float* %6, align 4 br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then ret void } define linkonce_odr void @_allocate_struct_class_circle1_circle(i8** %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = call i8* @_lfortran_malloc_alloc(i8* %1, i64 16) call void @llvm.memset.p0i8.i32(i8* %2, i8 0, i32 16, i1 false) store i8* %2, i8** %0, align 8 %3 = load i8*, i8** %0, align 8 %4 = bitcast i8* %3 to %class_circle1.circle.3_class* %5 = bitcast %class_circle1.circle.3_class* %4 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [7 x i8*] }, { [7 x i8*] }* @_VTable_circle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %5, align 8 %6 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %4, i32 0, i32 1 %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 4) call void @llvm.memset.p0i8.i32(i8* %8, i8 0, i32 4, i1 false) %9 = bitcast i8* %8 to %class_circle1.circle.3* store %class_circle1.circle.3* %9, %class_circle1.circle.3** %6, align 8 %10 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %9, i32 0, i32 0 ret void } define internal void @finalize_StructType__circle_3_of_class_circle1_for_UPoly(i8* %0) { entry: %1 = bitcast i8* %0 to %class_circle1.circle.3* ret void } declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0 declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %2 = alloca %class_circle1.circle.3_class, align 8 %3 = alloca %class_circle1.circle.3_class, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %c = alloca %class_circle1.circle.3, align 8 %4 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %c, i32 0, i32 0 %5 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %c, i32 0, i32 0 store float 1.500000e+00, float* %5, align 4 %6 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %3, i32 0, i32 0 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [7 x i8*] }, { [7 x i8*] }* @_VTable_circle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %6, align 8 %7 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %3, i32 0, i32 1 store %class_circle1.circle.3* %c, %class_circle1.circle.3** %7, align 8 call void @__module_class_circle1_circle_print(%class_circle1.circle.3_class* %3) %8 = getelementptr %class_circle1.circle.3, %class_circle1.circle.3* %c, i32 0, i32 0 store float 2.000000e+00, float* %8, align 4 %9 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %2, i32 0, i32 0 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [7 x i8*] }, { [7 x i8*] }* @_VTable_circle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %9, align 8 %10 = getelementptr %class_circle1.circle.3_class, %class_circle1.circle.3_class* %2, i32 0, i32 1 store %class_circle1.circle.3* %c, %class_circle1.circle.3** %10, align 8 call void @__module_class_circle1_circle_print(%class_circle1.circle.3_class* %2) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_circle_test FINALIZE_SYMTABLE_circle_test: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() attributes #0 = { argmemonly nounwind willreturn writeonly } lfortran-0.64.0/tests/reference/asr_preprocess-cpp6-556419a.stderr0000664000175000017500000000022215227365530024761 0ustar alastairalastairsemantic error: Variable 'z12' is not declared --> tests/errors/cpp6.f90:3:1 | 3 | #include "cpp6.h" | ^^^^^^^^^^^^^^^^^ 'z12' is undeclared lfortran-0.64.0/tests/reference/asr-class_04-285a1df.json0000664000175000017500000000074215227365530023065 0ustar alastairalastair{ "basename": "asr-class_04-285a1df", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/class_04.f90", "infile_hash": "0ddf2718f32dd9cfea8c4f4c9c384902ac023b5792e9fc8ec4a7648f", "outfile": null, "outfile_hash": null, "stdout": "asr-class_04-285a1df.stdout", "stdout_hash": "b8ccb4ce41fec9af27c55c9f155de684cedda3ed3b4d0f6b85268d18", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_01_logical-13e0bd7.json0000664000175000017500000000077515227365530024751 0ustar alastairalastair{ "basename": "asr-arrays_01_logical-13e0bd7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_logical.f90", "infile_hash": "494cd2aba8ceee4c9a0bddba4b51d7a4b0b3f817d92e8c0894e4b08b", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_01_logical-13e0bd7.stdout", "stdout_hash": "83fef64e5e78e7156241aec3378486f3c615e2d56d01cfa2e65d341d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-expr5-3c9d655.stdout0000664000175000017500000000146015227365530023021 0ustar alastairalastair(TranslationUnit [(Program expr_05 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] [(Assignment 0 x (* (+ 2 3) 5) () ) (If 0 () (== x 25) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr_openmp-openmp_37-2c7ae83.stdout0000664000175000017500000056160715227365530025231 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding), omp_lib: (Module (SymbolTable 4 { c_bool: (ExternalSymbol 4 c_bool 39 c_bool lfortran_intrinsic_iso_c_binding [] c_bool Public ), c_funptr: (ExternalSymbol 4 c_funptr 39 c_funptr lfortran_intrinsic_iso_c_binding [] c_funptr Public ), c_int: (ExternalSymbol 4 c_int 39 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_long: (ExternalSymbol 4 c_long 39 c_long lfortran_intrinsic_iso_c_binding [] c_long Public ), c_ptr: (ExternalSymbol 4 c_ptr 39 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), gomp_atomic_end: (Function (SymbolTable 5 { }) gomp_atomic_end (FunctionType [] () BindC Interface "GOMP_atomic_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_atomic_start: (Function (SymbolTable 6 { }) gomp_atomic_start (FunctionType [] () BindC Interface "GOMP_atomic_start" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_barrier: (Function (SymbolTable 7 { }) gomp_barrier (FunctionType [] () BindC Interface "GOMP_barrier" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_critical_end: (Function (SymbolTable 8 { }) gomp_critical_end (FunctionType [] () BindC Interface "GOMP_critical_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_critical_start: (Function (SymbolTable 9 { }) gomp_critical_start (FunctionType [] () BindC Interface "GOMP_critical_start" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_auto_next: (Function (SymbolTable 10 { gomp_loop_auto_next: (Variable 10 gomp_loop_auto_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 10 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 10 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_auto_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_auto_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 10 istart) (Var 10 iend)] [] (Var 10 gomp_loop_auto_next) Public .false. .false. () ), gomp_loop_auto_start: (Function (SymbolTable 11 { end: (Variable 11 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_auto_start: (Variable 11 gomp_loop_auto_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 11 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 11 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 11 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 11 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_auto_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_auto_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 11 start) (Var 11 end) (Var 11 incr) (Var 11 istart) (Var 11 iend)] [] (Var 11 gomp_loop_auto_start) Public .false. .false. () ), gomp_loop_dynamic_next: (Function (SymbolTable 12 { gomp_loop_dynamic_next: (Variable 12 gomp_loop_dynamic_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 12 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 12 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_dynamic_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_dynamic_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 12 istart) (Var 12 iend)] [] (Var 12 gomp_loop_dynamic_next) Public .false. .false. () ), gomp_loop_dynamic_start: (Function (SymbolTable 13 { chunk: (Variable 13 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 13 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_dynamic_start: (Variable 13 gomp_loop_dynamic_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 13 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 13 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 13 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 13 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_dynamic_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_dynamic_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 start) (Var 13 end) (Var 13 incr) (Var 13 chunk) (Var 13 istart) (Var 13 iend)] [] (Var 13 gomp_loop_dynamic_start) Public .false. .false. () ), gomp_loop_end: (Function (SymbolTable 14 { }) gomp_loop_end (FunctionType [] () BindC Interface "GOMP_loop_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_end_nowait: (Function (SymbolTable 15 { }) gomp_loop_end_nowait (FunctionType [] () BindC Interface "GOMP_loop_end_nowait" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_loop_guided_next: (Function (SymbolTable 16 { gomp_loop_guided_next: (Variable 16 gomp_loop_guided_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 16 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 16 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_guided_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_guided_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 16 istart) (Var 16 iend)] [] (Var 16 gomp_loop_guided_next) Public .false. .false. () ), gomp_loop_guided_start: (Function (SymbolTable 17 { chunk: (Variable 17 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 17 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_guided_start: (Variable 17 gomp_loop_guided_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 17 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 17 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 17 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 17 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_guided_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_guided_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 17 start) (Var 17 end) (Var 17 incr) (Var 17 chunk) (Var 17 istart) (Var 17 iend)] [] (Var 17 gomp_loop_guided_start) Public .false. .false. () ), gomp_loop_runtime_next: (Function (SymbolTable 18 { gomp_loop_runtime_next: (Variable 18 gomp_loop_runtime_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 18 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 18 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_runtime_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_runtime_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 18 istart) (Var 18 iend)] [] (Var 18 gomp_loop_runtime_next) Public .false. .false. () ), gomp_loop_runtime_start: (Function (SymbolTable 19 { end: (Variable 19 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_runtime_start: (Variable 19 gomp_loop_runtime_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 19 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 19 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 19 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 19 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_runtime_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_runtime_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 19 start) (Var 19 end) (Var 19 incr) (Var 19 istart) (Var 19 iend)] [] (Var 19 gomp_loop_runtime_start) Public .false. .false. () ), gomp_loop_static_next: (Function (SymbolTable 20 { gomp_loop_static_next: (Variable 20 gomp_loop_static_next [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 20 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 20 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_static_next (FunctionType [(Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_static_next" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 20 istart) (Var 20 iend)] [] (Var 20 gomp_loop_static_next) Public .false. .false. () ), gomp_loop_static_start: (Function (SymbolTable 21 { chunk: (Variable 21 chunk [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), end: (Variable 21 end [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_loop_static_start: (Variable 21 gomp_loop_static_start [] ReturnVar () () Default (Logical 1) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iend: (Variable 21 iend [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), incr: (Variable 21 incr [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), istart: (Variable 21 istart [] Unspecified () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), start: (Variable 21 start [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_loop_static_start (FunctionType [(Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8) (Integer 8)] (Logical 1) BindC Interface "GOMP_loop_static_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 21 start) (Var 21 end) (Var 21 incr) (Var 21 chunk) (Var 21 istart) (Var 21 iend)] [] (Var 21 gomp_loop_static_start) Public .false. .false. () ), gomp_parallel: (Function (SymbolTable 22 { data: (Variable 22 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 22 flags [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 22 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), num_threads: (Variable 22 num_threads [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_parallel (FunctionType [(CPtr) (CPtr) (Integer 4) (Integer 4)] () BindC Interface "GOMP_parallel" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 22 fn) (Var 22 data) (Var 22 num_threads) (Var 22 flags)] [] () Public .false. .false. () ), gomp_sections_end: (Function (SymbolTable 23 { }) gomp_sections_end (FunctionType [] () BindC Interface "GOMP_sections_end" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_sections_next: (Function (SymbolTable 24 { gomp_sections_next: (Variable 24 gomp_sections_next [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_sections_next (FunctionType [] (Integer 4) BindC Interface "GOMP_sections_next" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 24 gomp_sections_next) Public .false. .false. () ), gomp_sections_start: (Function (SymbolTable 25 { count: (Variable 25 count [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), gomp_sections_start: (Variable 25 gomp_sections_start [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_sections_start (FunctionType [(Integer 4)] (Integer 4) BindC Interface "GOMP_sections_start" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 25 count)] [] (Var 25 gomp_sections_start) Public .false. .false. () ), gomp_task: (Function (SymbolTable 26 { arg_align: (Variable 26 arg_align [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), arg_size: (Variable 26 arg_size [] Unspecified () () Default (Integer 8) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), cpyfn: (Variable 26 cpyfn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), data: (Variable 26 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), depend: (Variable 26 depend [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 26 flags [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 26 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), if_clause: (Variable 26 if_clause [] Unspecified () () Default (Logical 1) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_task (FunctionType [(CPtr) (CPtr) (CPtr) (Integer 8) (Integer 8) (Logical 1) (Integer 4) (CPtr)] () BindC Interface "GOMP_task" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 26 fn) (Var 26 data) (Var 26 cpyfn) (Var 26 arg_size) (Var 26 arg_align) (Var 26 if_clause) (Var 26 flags) (Var 26 depend)] [] () Public .false. .false. () ), gomp_taskwait: (Function (SymbolTable 27 { }) gomp_taskwait (FunctionType [] () BindC Interface "GOMP_taskwait" .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .false. .false. () ), gomp_teams: (Function (SymbolTable 28 { data: (Variable 28 data [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), fn: (Variable 28 fn [] Unspecified () () Default (CPtr) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), num_teams: (Variable 28 num_teams [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), thread_limit: (Variable 28 thread_limit [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) gomp_teams (FunctionType [(CPtr) (CPtr) (Integer 4) (Integer 4)] () BindC Interface "GOMP_teams_reg" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 28 fn) (Var 28 data) (Var 28 num_teams) (Var 28 thread_limit)] [] () Public .false. .false. () ), omp_get_max_threads: (Function (SymbolTable 29 { omp_get_max_threads: (Variable 29 omp_get_max_threads [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_max_threads (FunctionType [] (Integer 4) BindC Interface "omp_get_max_threads" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 29 omp_get_max_threads) Public .false. .false. () ), omp_get_num_procs: (Function (SymbolTable 30 { omp_get_num_procs: (Variable 30 omp_get_num_procs [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_procs (FunctionType [] (Integer 4) BindC Interface "omp_get_num_procs" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 30 omp_get_num_procs) Public .false. .false. () ), omp_get_num_teams: (Function (SymbolTable 31 { omp_get_num_teams: (Variable 31 omp_get_num_teams [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_teams (FunctionType [] (Integer 4) BindC Interface "omp_get_num_teams" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 31 omp_get_num_teams) Public .false. .false. () ), omp_get_num_threads: (Function (SymbolTable 32 { omp_get_num_threads: (Variable 32 omp_get_num_threads [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_num_threads (FunctionType [] (Integer 4) BindC Interface "omp_get_num_threads" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 32 omp_get_num_threads) Public .false. .false. () ), omp_get_team_num: (Function (SymbolTable 33 { omp_get_team_num: (Variable 33 omp_get_team_num [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_team_num (FunctionType [] (Integer 4) BindC Interface "omp_get_team_num" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 33 omp_get_team_num) Public .false. .false. () ), omp_get_team_size: (Function (SymbolTable 34 { level: (Variable 34 level [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ), omp_get_team_size: (Variable 34 omp_get_team_size [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_team_size (FunctionType [(Integer 4)] (Integer 4) BindC Interface "omp_get_team_size" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 34 level)] [] (Var 34 omp_get_team_size) Public .false. .false. () ), omp_get_thread_num: (Function (SymbolTable 35 { omp_get_thread_num: (Variable 35 omp_get_thread_num [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_thread_num (FunctionType [] (Integer 4) BindC Interface "omp_get_thread_num" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 35 omp_get_thread_num) Public .false. .false. () ), omp_get_wtime: (Function (SymbolTable 36 { omp_get_wtime: (Variable 36 omp_get_wtime [] ReturnVar () () Default (Real 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) omp_get_wtime (FunctionType [] (Real 8) BindC Interface "omp_get_wtime" .false. .false. .false. .false. .false. [] .false. ) [] [] [] (Var 36 omp_get_wtime) Public .false. .false. () ), omp_set_num_threads: (Function (SymbolTable 37 { n: (Variable 37 n [] Unspecified () () Default (Integer 4) () BindC Public Required .true. .false. .false. () .false. .false. NotMethod () [] ) }) omp_set_num_threads (FunctionType [(Integer 4)] () BindC Interface "omp_set_num_threads" .false. .false. .false. .false. .false. [] .false. ) [] [(Var 37 n)] [] () Public .false. .false. () ) }) omp_lib () [iso_c_binding] .true. .false. .false. ), openmp_37: (Program (SymbolTable 2 { c_bool: (ExternalSymbol 2 c_bool 39 c_bool lfortran_intrinsic_iso_c_binding [] c_bool Public ), c_funptr: (ExternalSymbol 2 c_funptr 39 c_funptr lfortran_intrinsic_iso_c_binding [] c_funptr Public ), c_int: (ExternalSymbol 2 c_int 39 c_int lfortran_intrinsic_iso_c_binding [] c_int Public ), c_long: (ExternalSymbol 2 c_long 39 c_long lfortran_intrinsic_iso_c_binding [] c_long Public ), c_ptr: (ExternalSymbol 2 c_ptr 39 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), gomp_atomic_end: (ExternalSymbol 2 gomp_atomic_end 4 gomp_atomic_end omp_lib [] gomp_atomic_end Public ), gomp_atomic_start: (ExternalSymbol 2 gomp_atomic_start 4 gomp_atomic_start omp_lib [] gomp_atomic_start Public ), gomp_barrier: (ExternalSymbol 2 gomp_barrier 4 gomp_barrier omp_lib [] gomp_barrier Public ), gomp_critical_end: (ExternalSymbol 2 gomp_critical_end 4 gomp_critical_end omp_lib [] gomp_critical_end Public ), gomp_critical_start: (ExternalSymbol 2 gomp_critical_start 4 gomp_critical_start omp_lib [] gomp_critical_start Public ), gomp_loop_auto_next: (ExternalSymbol 2 gomp_loop_auto_next 4 gomp_loop_auto_next omp_lib [] gomp_loop_auto_next Public ), gomp_loop_auto_start: (ExternalSymbol 2 gomp_loop_auto_start 4 gomp_loop_auto_start omp_lib [] gomp_loop_auto_start Public ), gomp_loop_dynamic_next: (ExternalSymbol 2 gomp_loop_dynamic_next 4 gomp_loop_dynamic_next omp_lib [] gomp_loop_dynamic_next Public ), gomp_loop_dynamic_start: (ExternalSymbol 2 gomp_loop_dynamic_start 4 gomp_loop_dynamic_start omp_lib [] gomp_loop_dynamic_start Public ), gomp_loop_end: (ExternalSymbol 2 gomp_loop_end 4 gomp_loop_end omp_lib [] gomp_loop_end Public ), gomp_loop_end_nowait: (ExternalSymbol 2 gomp_loop_end_nowait 4 gomp_loop_end_nowait omp_lib [] gomp_loop_end_nowait Public ), gomp_loop_guided_next: (ExternalSymbol 2 gomp_loop_guided_next 4 gomp_loop_guided_next omp_lib [] gomp_loop_guided_next Public ), gomp_loop_guided_start: (ExternalSymbol 2 gomp_loop_guided_start 4 gomp_loop_guided_start omp_lib [] gomp_loop_guided_start Public ), gomp_loop_runtime_next: (ExternalSymbol 2 gomp_loop_runtime_next 4 gomp_loop_runtime_next omp_lib [] gomp_loop_runtime_next Public ), gomp_loop_runtime_start: (ExternalSymbol 2 gomp_loop_runtime_start 4 gomp_loop_runtime_start omp_lib [] gomp_loop_runtime_start Public ), gomp_loop_static_next: (ExternalSymbol 2 gomp_loop_static_next 4 gomp_loop_static_next omp_lib [] gomp_loop_static_next Public ), gomp_loop_static_start: (ExternalSymbol 2 gomp_loop_static_start 4 gomp_loop_static_start omp_lib [] gomp_loop_static_start Public ), gomp_parallel: (ExternalSymbol 2 gomp_parallel 4 gomp_parallel omp_lib [] gomp_parallel Public ), gomp_sections_end: (ExternalSymbol 2 gomp_sections_end 4 gomp_sections_end omp_lib [] gomp_sections_end Public ), gomp_sections_next: (ExternalSymbol 2 gomp_sections_next 4 gomp_sections_next omp_lib [] gomp_sections_next Public ), gomp_sections_start: (ExternalSymbol 2 gomp_sections_start 4 gomp_sections_start omp_lib [] gomp_sections_start Public ), gomp_task: (ExternalSymbol 2 gomp_task 4 gomp_task omp_lib [] gomp_task Public ), gomp_taskwait: (ExternalSymbol 2 gomp_taskwait 4 gomp_taskwait omp_lib [] gomp_taskwait Public ), gomp_teams: (ExternalSymbol 2 gomp_teams 4 gomp_teams omp_lib [] gomp_teams Public ), ik: (Variable 2 ik [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ix: (Variable 2 ix [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iy: (Variable 2 iy [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), nk: (Variable 2 nk [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), nx: (Variable 2 nx [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ny: (Variable 2 ny [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), omp_get_max_threads: (ExternalSymbol 2 omp_get_max_threads 4 omp_get_max_threads omp_lib [] omp_get_max_threads Public ), omp_get_num_procs: (ExternalSymbol 2 omp_get_num_procs 4 omp_get_num_procs omp_lib [] omp_get_num_procs Public ), omp_get_num_teams: (ExternalSymbol 2 omp_get_num_teams 4 omp_get_num_teams omp_lib [] omp_get_num_teams Public ), omp_get_num_threads: (ExternalSymbol 2 omp_get_num_threads 4 omp_get_num_threads omp_lib [] omp_get_num_threads Public ), omp_get_team_num: (ExternalSymbol 2 omp_get_team_num 4 omp_get_team_num omp_lib [] omp_get_team_num Public ), omp_get_team_size: (ExternalSymbol 2 omp_get_team_size 4 omp_get_team_size omp_lib [] omp_get_team_size Public ), omp_get_thread_num: (ExternalSymbol 2 omp_get_thread_num 4 omp_get_thread_num omp_lib [] omp_get_thread_num Public ), omp_get_wtime: (ExternalSymbol 2 omp_get_wtime 4 omp_get_wtime omp_lib [] omp_get_wtime Public ), omp_set_num_threads: (ExternalSymbol 2 omp_set_num_threads 4 omp_set_num_threads omp_lib [] omp_set_num_threads Public ) }) openmp_37 [omp_lib] [(Assignment (Var 2 ny) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 nx) (IntegerConstant 4 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 nk) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. ) (OMPRegion ParallelDo [(OMPPrivate [(Var 2 iy) (Var 2 ix)] )] [(DoLoop () ((Var 2 iy) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 ny) ()) [(OMPRegion ParallelDo [(OMPCollapse (IntegerConstant 2 (Integer 4) Decimal) )] [(DoLoop () ((Var 2 ix) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 nx) ()) [(DoLoop () ((Var 2 ik) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 nk) ()) [(Print (StringFormat () [(StringConstant "iy->" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 iy) (StringConstant "ix->" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 ix)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] )] [] )] ) (OMPRegion ParallelDo [] [(DoLoop () ((Var 2 ix) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 nx) ()) [(DoLoop () ((Var 2 ik) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 nk) ()) [(Print (StringFormat () [(StringConstant "iy->" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 iy) (StringConstant "ix->" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 ix)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] )] [] )] )] [] )] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixedform_assign_minimal-c4142fa.stdout0000664000175000017500000000140015227365530027047 0ustar alastairalastair(TranslationUnit [(Program implicit_program_lfortran () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ()) (b [] [] () () None ()) (c [] [] () () None ()) (d [] [] () () None ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-optional_argument_subroutine_in_type-0d81d24.json0000664000175000017500000000104115227365530031117 0ustar alastairalastair{ "basename": "asr-optional_argument_subroutine_in_type-0d81d24", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/optional_argument_subroutine_in_type.f90", "infile_hash": "95ac054a65cebfbc2df3708d0b697fb981e5a485008e8a79dc6ab79d", "outfile": null, "outfile_hash": null, "stdout": "asr-optional_argument_subroutine_in_type-0d81d24.stdout", "stdout_hash": "95e0f8c1a1be9f5531c0404015e86b574299511e091411c8bf2d8f8c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-callback_02-41bc7d7.stdout0000664000175000017500000001730615227365530024255 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @main.res = internal global float 0.000000e+00 define void @__module_callback_02_cb(float* %res, float* %a, float* %b, void (float*, float*)* %f) { .entry: %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() call void %f(float* %a, float* %res) %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, float* %res) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry call void %f(float* %b, float* %res) %12 = alloca i64, align 8 %13 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %12, i32 0, i32 0, i32 0, i32 0, i32 0, float* %res) %14 = load i64, i64* %12, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %13, i8** %15, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %14, i64* %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %18 = load i8*, i8** %17, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %20 = load i64, i64* %19, align 8 %21 = trunc i64 %20 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %18, i32 %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %22 = icmp eq i8* %13, null br i1 %22, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %13) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %23 = load float, float* %b, align 4 %24 = load float, float* %a, align 4 %25 = fsub float %23, %24 %26 = load float, float* %res, align 4 %27 = fmul float %25, %26 store float %27, float* %res, align 4 %28 = alloca i64, align 8 %29 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %28, i32 0, i32 0, i32 0, i32 0, i32 0, float* %res) %30 = load i64, i64* %28, align 8 %31 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %29, i8** %31, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %30, i64* %32, align 8 %33 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %34 = load i8*, i8** %33, align 8 %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %36 = load i64, i64* %35, align 8 %37 = trunc i64 %36 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %34, i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %38 = icmp eq i8* %29, null br i1 %38, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %0, i8* %29) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 br label %return return: ; preds = %free_done6 br label %FINALIZE_SYMTABLE_cb FINALIZE_SYMTABLE_cb: ; preds = %return ret void } declare void @f(float*, float*) define float @__module_callback_02_foo(float* %c, float* %d, float* %res) { .entry: %foo = alloca float, align 4 call void @__module_callback_02_cb(float* %res, float* %c, float* %d, void (float*, float*)* @foo.__module_callback_02_f) %0 = load float, float* %res, align 4 store float %0, float* %foo, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_foo FINALIZE_SYMTABLE_foo: ; preds = %return %1 = load float, float* %foo, align 4 ret float %1 } define void @foo.__module_callback_02_f(float* %x, float* %res) { .entry: %0 = load float, float* %x, align 4 %1 = fmul float 2.000000e+00, %0 store float %1, float* %res, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value1 = alloca float, align 4 %call_arg_value = alloca float, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store float 1.500000e+00, float* %call_arg_value, align 4 store float 2.000000e+00, float* %call_arg_value1, align 4 %2 = call float @__module_callback_02_foo(float* %call_arg_value, float* %call_arg_value1, float* @main.res) store float %2, float* @main.res, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-array_05-321b5d3.json0000664000175000017500000000072415227365530023010 0ustar alastairalastair{ "basename": "asr-array_05-321b5d3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_05.f90", "infile_hash": "b86286701e5ed9406c3ba31672b09bcf91a452a95ac041a8b2d4c33a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_05-321b5d3.stderr", "stderr_hash": "8b515c9bd2f970b2082c5f32b22d33101955e1ee395fc49eab2a160c", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-derived_type1-c109ce6.stdout0000664000175000017500000002704715227365530024601 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_type1: (Module (SymbolTable 2 { 1_enum_escape_newline: (ExternalSymbol 2 1_enum_escape_newline 3 newline derived_type1 [enum_escape] newline Public ), enum_escape: (Struct (SymbolTable 3 { newline: (Variable 3 newline [] Local (IntrinsicElementalFunction Achar [(IntegerConstant 10 (Integer 4) Decimal)] 0 (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "\n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "\n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) enum_escape (StructType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] [] .true. .false. ) [] [newline] [] Source Public .false. .false. .false. [] () () [] ), nl: (Variable 2 nl [toml_escape] Local (IntrinsicElementalFunction StringConcat [(StringConstant " " (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Var 2 toml_escape) 2 1_enum_escape_newline (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (StringConstant "\n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] 0 (String 1 (IntegerConstant 2 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant " \n" (String 1 (IntegerConstant 2 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant " \n" (String 1 (IntegerConstant 2 (Integer 8) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 2 (Integer 8) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tfc: (Variable 2 tfc [] Local (IntrinsicElementalFunction SelectedCharKind [(StringConstant "DEFAULT" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) )] 0 (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) ) (IntegerConstant 1 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), toml_escape: (Variable 2 toml_escape [] Local (StructConstant 2 enum_escape [((StringConstant "\n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ))] (StructType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] [] .true. .false. ) ) (StructConstant 2 enum_escape [((StringConstant "\n" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ))] (StructType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] [] .true. .false. ) ) Parameter (StructType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] [] .true. .false. ) 2 enum_escape Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) derived_type1 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor15-4cf95f9.json0000664000175000017500000000077315227365530026641 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor15-4cf95f9", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor15.f90", "infile_hash": "b47691d49753905026191cfe1a1aa17ab0a7652f8b0aea9e1b1639e5", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor15-4cf95f9.stdout", "stdout_hash": "c0f66587c53d15e184e1cfdb3aefd939f82dd63b39cab96ff58db69d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-intent_01-fd00f62.stdout0000664000175000017500000000747515227365530023640 0ustar alastairalastair(TranslationUnit [(Module dflt_intent (TriviaNode [(EndOfLine) (EndOfLine)] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Subroutine foo [(c) (d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [] [(c [] [] () () None ()) (d [] [] () () None ()) (e [] [] () () None ()) (g [] [] () () None ())] () )] [(Assignment 0 e (FuncCallOrArray f [] [(() c () 0)] [] [] [] ) () ) (Assignment 0 g (FuncCallOrArray f [] [(() d () 0)] [] [] [] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Function f [(x)] [(AttrType TypeReal [] () () None )] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(x [] [] () () None ())] () )] [(Assignment 0 f (* 2 x) () ) (Print 0 () [f] () )] [] [] )] [] )] ) (Program main () [(Use [] dflt_intent [] .false. () )] [] [] [(SubroutineCall 0 foo [] [(() (Real "0.0") () 0) (() (Real "2.0") () 0)] [] [] () )] [] )] ) lfortran-0.64.0/tests/reference/ast-parameter_02-9547a35.stdout0000664000175000017500000000434715227365530024165 0ustar alastairalastair(TranslationUnit [(Subroutine a_proc [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrParameter )] [(i [] [] () 1 Equal ())] () )] [(Print 0 () [i] () )] [] [] ) (Module parameter_02_a (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrParameter )] [(i [] [] () 2 Equal ())] () )] [] [] ) (Program parameter_02 () [(Use [] parameter_02_a [(UseSymbol i () )] .true. () )] [(ImplicitNone [] () )] [] [(SubroutineCall 0 a_proc [] [] [] [] () ) (Print 0 () [i] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-external1-93d8653.json0000664000175000017500000000076715227365530023242 0ustar alastairalastair{ "basename": "asr-external1-93d8653", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/external1.f90", "infile_hash": "56b4ef88c341e64d20695ff19c022ba86a594ce1be597aa4624f694b", "outfile": null, "outfile_hash": null, "stdout": "asr-external1-93d8653.stdout", "stdout_hash": "95c7b455721dec06161e5f3e42516951919ae95674b90b2085c1daa8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dint_args-0823aa1.stderr0000664000175000017500000000023215227365530023660 0ustar alastairalastairsemantic error: Too many arguments to call `dint` --> tests/errors/dint_args.f90:2:13 | 2 | print*, dint(1.0_8, 8) | ^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-common_13-fa7cbf0.stdout0000664000175000017500000005570115227365530023764 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { 1_arrblock_myarr: (ExternalSymbol 1 1_arrblock_myarr 3 myarr arrblock [] myarr Public ), 1_myblock_myint: (ExternalSymbol 1 1_myblock_myint 5 myint myblock [] myint Public ), arrblock: (ExternalSymbol 1 arrblock 2 arrblock file_common_block_arrblock [] arrblock Public ), common_13: (Program (SymbolTable 6 { 1_myblock_myzero: (ExternalSymbol 6 1_myblock_myzero 5 myzero myblock [] myzero Public ) }) common_13 [] [(If () (IntegerCompare (StructInstanceMember (Var 1 struct_instance_myblock) 1 1_myblock_myint (Integer 4) () ) NotEq (IntegerConstant 44 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (StructInstanceMember (Var 1 struct_instance_myblock) 6 1_myblock_myzero (Integer 4) () ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntrinsicArrayFunction Any [(ArrayPhysicalCast (IntegerCompare (StructInstanceMember (Var 1 struct_instance_arrblock) 1 1_arrblock_myarr (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) NotEq (ArrayConstant 40 [1, 2, 3, ...., 8, 9, 10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) FixedSizeArray DescriptorArray (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )] 0 (Logical 4) () ) [(ErrorStop () )] [] )] ), file_common_block_arrblock: (Module (SymbolTable 2 { arrblock: (Struct (SymbolTable 3 { myarr: (Variable 3 myarr [] Local (ArrayConstant 40 [1, 2, 3, ...., 8, 9, 10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (ArrayConstant 40 [1, 2, 3, ...., 8, 9, 10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrblock (StructType [] [] .true. .false. ) [] [myarr] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_arrblock: (Variable 2 struct_instance_arrblock [] Local (StructConstant 2 arrblock [((ArrayConstant 40 [1, 2, 3, ...., 8, 9, 10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ))] (StructType [] [] .true. .false. ) ) (StructConstant 2 arrblock [((ArrayConstant 40 [1, 2, 3, ...., 8, 9, 10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ))] (StructType [] [] .true. .false. ) ) Default (StructType [] [] .true. .false. ) 2 arrblock Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_arrblock () [] .false. .false. .false. ), file_common_block_myblock: (Module (SymbolTable 4 { myblock: (Struct (SymbolTable 5 { myint: (Variable 5 myint [] Local (IntegerConstant 44 (Integer 4) Decimal) (IntegerConstant 44 (Integer 4) Decimal) Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), myzero: (Variable 5 myzero [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) myblock (StructType [] [] .true. .false. ) [] [myint myzero] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_myblock: (Variable 4 struct_instance_myblock [] Local (StructConstant 4 myblock [((IntegerConstant 44 (Integer 4) Decimal)) (())] (StructType [] [] .true. .false. ) ) (StructConstant 4 myblock [((IntegerConstant 44 (Integer 4) Decimal)) (())] (StructType [] [] .true. .false. ) ) Default (StructType [] [] .true. .false. ) 4 myblock Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_myblock () [] .false. .false. .false. ), myarr: (Variable 1 myarr [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), myblock: (ExternalSymbol 1 myblock 4 myblock file_common_block_myblock [] myblock Public ), myint: (Variable 1 myint [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), myzero: (Variable 1 myzero [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), struct_instance_arrblock: (ExternalSymbol 1 struct_instance_arrblock 2 struct_instance_arrblock file_common_block_arrblock [] struct_instance_arrblock Public ), struct_instance_myblock: (ExternalSymbol 1 struct_instance_myblock 4 struct_instance_myblock file_common_block_myblock [] struct_instance_myblock Public ) }) [] ) lfortran-0.64.0/tests/reference/asr-bindc2-62a702e.stdout0000664000175000017500000006073215227365530023110 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bindc2: (Program (SymbolTable 2 { c_f_pointer: (ExternalSymbol 2 c_f_pointer 4 c_f_pointer lfortran_intrinsic_iso_c_binding [] c_f_pointer Public ), c_loc: (ExternalSymbol 2 c_loc 4 c_loc lfortran_intrinsic_iso_c_binding [] c_loc Public ), c_ptr: (ExternalSymbol 2 c_ptr 4 c_ptr lfortran_intrinsic_iso_c_binding [] c_ptr Public ), idx: (Variable 2 idx [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), newshape: (Variable 2 newshape [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), queries: (Variable 2 queries [] Local () () Default (CPtr) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Pointer (Array (Integer 2) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), xv: (Variable 2 xv [] Local () () Default (Array (Integer 2) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) bindc2 [iso_c_binding] [(Assignment (ArrayItem (Var 2 newshape) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 newshape) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Associate (Var 2 x) (ArrayPhysicalCast (Var 2 xv) FixedSizeArray DescriptorArray (Array (Integer 2) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray ) () ) ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 3 (Integer 4) Decimal) ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArraySize (Var 2 xv) () (Integer 4) (IntegerConstant 12 (Integer 4) Decimal) ) NotEq (IntegerConstant 12 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (CPtrToPointer (Var 2 queries) (Var 2 x) (Var 2 newshape) () ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 3 (Integer 4) Decimal) ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 xv) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArraySize (Var 2 xv) () (Integer 4) (IntegerConstant 12 (Integer 4) Decimal) ) NotEq (IntegerConstant 12 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (Print (StringFormat () [(ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 x) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 x) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArraySize (Var 2 x) () (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 x) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArrayBound (Var 2 x) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArraySize (Var 2 x) () (Integer 4) () ) NotEq (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ), iso_c_binding: (IntrinsicModule lfortran_intrinsic_iso_c_binding) }) [] ) lfortran-0.64.0/tests/reference/julia-array2-456cd99.stdout0000664000175000017500000000050315227365530023475 0ustar alastairalastairfunction main() local a::Array{Float32, 1} local b::Array{Float32, 1} local c::Array{Int32, 1} local d::Array{Bool, 1} local e::Array{Float32, 2} local f::Array{Int32, 2} local g::Array{Bool, 2} local h::Array{Float32, 3} local i::Array{Int32, 3} local j::Array{Bool, 3} end main() lfortran-0.64.0/tests/reference/asr-string_54-2dbd7b1.json0000664000175000017500000000074515227365530023351 0ustar alastairalastair{ "basename": "asr-string_54-2dbd7b1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_54.f90", "infile_hash": "ac362ebe23bff5072f61252724ef01399d95e4783cbf9330a49acf86", "outfile": null, "outfile_hash": null, "stdout": "asr-string_54-2dbd7b1.stdout", "stdout_hash": "7e1362cee55dca36e2d8f2989aa420aee3fc9d1306dcc675301c3f58", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_array_op-array15-079d0cd.json0000664000175000017500000000075615227365530025023 0ustar alastairalastair{ "basename": "pass_array_op-array15-079d0cd", "cmd": "lfortran --pass=array_op --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array15.f90", "infile_hash": "18924f1dcd04103b427c1fe1321fa206ef73add7548a17e61ea10df2", "outfile": null, "outfile_hash": null, "stdout": "pass_array_op-array15-079d0cd.stdout", "stdout_hash": "14ed8f5d8cdbbe1142e7373c6e58cf1a22d07b8679c614d62da1b708", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_json-modules_10-93cd62d.stdout0000664000175000017500000006572715227365530025051 0ustar alastairalastair{ "node": "TranslationUnit", "fields": { "symtab": { "node": "SymbolTable1", "fields": { "modules_10": { "node": "Module", "fields": { "symtab": { "node": "SymbolTable4", "fields": { "my_global": { "node": "ExternalSymbol", "fields": { "parent_symtab": 4, "name": "my_global", "external": "my_global (SymbolTable2)", "module_name": "my_other_module", "scope_names": [], "original_name": "my_global", "access": "Public" }, "loc": { "first": 197, "last": 205, "first_filename": "tests/modules_10.f90", "first_line": 10, "first_column": 32, "last_filename": "tests/modules_10.f90", "last_line": 10, "last_column": 40 } }, "my_proc": { "node": "Function", "fields": { "symtab": { "node": "SymbolTable5", "fields": { "my_other_proc": { "node": "ExternalSymbol", "fields": { "parent_symtab": 5, "name": "my_other_proc", "external": "my_other_proc (SymbolTable2)", "module_name": "my_other_module", "scope_names": [], "original_name": "my_other_proc", "access": "Public" }, "loc": { "first": 274, "last": 286, "first_filename": "tests/modules_10.f90", "first_line": 13, "first_column": 36, "last_filename": "tests/modules_10.f90", "last_line": 13, "last_column": 48 } } } }, "name": "my_proc", "function_signature": { "node": "FunctionType", "fields": { "arg_types": [], "return_var_type": [], "abi": "Source", "deftype": "Implementation", "bindc_name": [], "elemental": false, "pure": false, "module": false, "inline": false, "static": false, "restrictions": [], "is_restriction": false }, "loc": { "first": 220, "last": 333, "first_filename": "tests/modules_10.f90", "first_line": 12, "first_column": 5, "last_filename": "tests/modules_10.f90", "last_line": 16, "last_column": 18 } }, "dependencies": [], "args": [], "body": [ { "node": "SubroutineCall", "fields": { "name": "my_other_proc (SymbolTable5)", "original_name": [], "args": [], "dt": [], "strict_bounds_checking": false }, "loc": { "first": 297, "last": 314, "first_filename": "tests/modules_10.f90", "first_line": 15, "first_column": 9, "last_filename": "tests/modules_10.f90", "last_line": 15, "last_column": 26 } } ], "return_var": [], "access": "Public", "deterministic": false, "side_effect_free": false, "module_file": [] }, "loc": { "first": 220, "last": 333, "first_filename": "tests/modules_10.f90", "first_line": 12, "first_column": 5, "last_filename": "tests/modules_10.f90", "last_line": 16, "last_column": 18 } } } }, "name": "modules_10", "parent_module": [], "dependencies": [ "my_other_module" ], "loaded_from_mod": false, "intrinsic": false, "has_submodules": false }, "loc": { "first": 148, "last": 344, "first_filename": "tests/modules_10.f90", "first_line": 9, "first_column": 1, "last_filename": "tests/modules_10.f90", "last_line": 17, "last_column": 10 } }, "my_other_module": { "node": "Module", "fields": { "symtab": { "node": "SymbolTable2", "fields": { "my_global": { "node": "Variable", "fields": { "parent_symtab": 2, "name": "my_global", "dependencies": [], "intent": "Local", "symbolic_value": { "node": "IntegerConstant", "fields": { "n": 0, "type": { "node": "Integer", "fields": { "kind": 4 }, "loc": { "first": 50, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 28, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "intboz_type": "Decimal" }, "loc": { "first": 50, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 28, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "value": { "node": "IntegerConstant", "fields": { "n": 0, "type": { "node": "Integer", "fields": { "kind": 4 }, "loc": { "first": 50, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 28, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "intboz_type": "Decimal" }, "loc": { "first": 50, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 28, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "storage": "Save", "type": { "node": "Integer", "fields": { "kind": 4 }, "loc": { "first": 27, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 5, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "type_declaration": [], "abi": "Source", "access": "Public", "presence": "Required", "value_attr": false, "target_attr": false, "contiguous_attr": false, "bindc_name": [], "is_volatile": false, "is_protected": false, "pass_attr": "NotMethod", "self_argument": [], "codims": [] }, "loc": { "first": 38, "last": 50, "first_filename": "tests/modules_10.f90", "first_line": 2, "first_column": 16, "last_filename": "tests/modules_10.f90", "last_line": 2, "last_column": 28 } }, "my_other_proc": { "node": "Function", "fields": { "symtab": { "node": "SymbolTable3", "fields": {} }, "name": "my_other_proc", "function_signature": { "node": "FunctionType", "fields": { "arg_types": [], "return_var_type": [], "abi": "Source", "deftype": "Implementation", "bindc_name": [], "elemental": false, "pure": false, "module": false, "inline": false, "static": false, "restrictions": [], "is_restriction": false }, "loc": { "first": 65, "last": 134, "first_filename": "tests/modules_10.f90", "first_line": 4, "first_column": 5, "last_filename": "tests/modules_10.f90", "last_line": 6, "last_column": 18 } }, "dependencies": [], "args": [], "body": [ { "node": "Print", "fields": { "text": { "node": "StringFormat", "fields": { "fmt": [], "args": [ { "node": "Var", "fields": { "v": "my_global (SymbolTable2)" }, "loc": { "first": 107, "last": 115, "first_filename": "tests/modules_10.f90", "first_line": 5, "first_column": 18, "last_filename": "tests/modules_10.f90", "last_line": 5, "last_column": 26 } } ], "kind": "FormatFortran", "type": { "node": "Allocatable", "fields": { "type": { "node": "String", "fields": { "kind": 1, "len": [], "len_kind": "DeferredLength", "physical_type": "DescriptorString" }, "loc": { "first": 98, "last": 115, "first_filename": "tests/modules_10.f90", "first_line": 5, "first_column": 9, "last_filename": "tests/modules_10.f90", "last_line": 5, "last_column": 26 } } }, "loc": { "first": 98, "last": 115, "first_filename": "tests/modules_10.f90", "first_line": 5, "first_column": 9, "last_filename": "tests/modules_10.f90", "last_line": 5, "last_column": 26 } }, "value": [] }, "loc": { "first": 98, "last": 115, "first_filename": "tests/modules_10.f90", "first_line": 5, "first_column": 9, "last_filename": "tests/modules_10.f90", "last_line": 5, "last_column": 26 } } }, "loc": { "first": 98, "last": 115, "first_filename": "tests/modules_10.f90", "first_line": 5, "first_column": 9, "last_filename": "tests/modules_10.f90", "last_line": 5, "last_column": 26 } } ], "return_var": [], "access": "Public", "deterministic": false, "side_effect_free": false, "module_file": [] }, "loc": { "first": 65, "last": 134, "first_filename": "tests/modules_10.f90", "first_line": 4, "first_column": 5, "last_filename": "tests/modules_10.f90", "last_line": 6, "last_column": 18 } } } }, "name": "my_other_module", "parent_module": [], "dependencies": [], "loaded_from_mod": false, "intrinsic": false, "has_submodules": false }, "loc": { "first": 0, "last": 145, "first_filename": "tests/modules_10.f90", "first_line": 1, "first_column": 1, "last_filename": "tests/modules_10.f90", "last_line": 7, "last_column": 10 } } } }, "items": [] }, "loc": { "first": 0, "last": 344, "first_filename": "tests/modules_10.f90", "first_line": 1, "first_column": 1, "last_filename": "tests/modules_10.f90", "last_line": 17, "last_column": 10 } } lfortran-0.64.0/tests/reference/asr-dimension_attr2-8fda690.json0000664000175000017500000000076415227365530024571 0ustar alastairalastair{ "basename": "asr-dimension_attr2-8fda690", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/dimension_attr2.f90", "infile_hash": "568a05015d6d94c3e3a22921a99746f77bf708b4e1f67e7f5f30296d", "outfile": null, "outfile_hash": null, "stdout": "asr-dimension_attr2-8fda690.stdout", "stdout_hash": "8aa076ffeb198f3f3655efc0e664616e2456dd0a1a218dda1b53c61a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-submodule_01-2524ba9.json0000664000175000017500000000075615227365530023701 0ustar alastairalastair{ "basename": "ast-submodule_01-2524ba9", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/submodule_01.f90", "infile_hash": "ed0ecc9003bb9cd8e6be1f4f77cd3e59f45d09f2ba2f64029dc3680e", "outfile": null, "outfile_hash": null, "stdout": "ast-submodule_01-2524ba9.stdout", "stdout_hash": "6b9e7e191e0c91ef601e0128b385676f8b1492b8e196073f9b3bd369", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-block_03-6c8fdd8.stdout0000664000175000017500000002335515227365530023523 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { block_02: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), loop: (Block (SymbolTable 4 { b: (Variable 4 b [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) loop [(Assignment (Var 2 a) (IntegerBinOp (Var 2 a) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 a) Eq (IntegerConstant 15 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 1 1 )] [] ) (Assignment (Var 4 b) (IntegerBinOp (Var 2 a) Div (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 1 square () [((Var 4 b))] () .false. )] ) }) block_02 [] [(Assignment (Var 2 a) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (GoToTarget 1 1 ) (BlockCall -1 2 loop )] ), square: (Function (SymbolTable 3 { b: (Variable 3 b [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), result: (Variable 3 result [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) square (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 b)] [(Assignment (Var 3 result) (IntegerBinOp (Var 3 b) Mul (Var 3 b) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 3 result) NotEq (IntegerConstant 100 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 3 result)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-template_03b-6812e13.json0000664000175000017500000000075615227365530023602 0ustar alastairalastair{ "basename": "ast-template_03b-6812e13", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_03b.f90", "infile_hash": "4285fa6069fdc8872b08ca46688ab8168abfe0c468a57c65818deeb6", "outfile": null, "outfile_hash": null, "stdout": "ast-template_03b-6812e13.stdout", "stdout_hash": "1063d8766add50179a53e326805261e88e838ebc1ab3333dd52a0983", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_doloop2-16b2c78.stdout0000664000175000017500000000272415227365530025375 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(k [] [] () () None ())] () )] [(DoLoop 0 () 0 k 1 10 () [(Print 0 () [k] () )] () () ) (DoLoop 0 () 80 k 1 10 () [(Print 0 () [k] () )] () () ) (DoLoop 0 () 800 k 1 10 () [(Print 0 () [k] () )] () () ) (DoLoop 0 () 8000 k 1 10 () [(Print 0 () [k] () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-template_travel_01-cd2b445.json0000664000175000017500000000100015227365530025126 0ustar alastairalastair{ "basename": "asr-template_travel_01-cd2b445", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_travel_01.f90", "infile_hash": "49fd555855358466e9af6299db72ebf88c01a40bb93c00fefe71c2c7", "outfile": null, "outfile_hash": null, "stdout": "asr-template_travel_01-cd2b445.stdout", "stdout_hash": "2f79d0a8a871efd5a1e917e053e19e0f2f62452260c0bbbf43513c60", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-program4-ba26fd1.stderr0000664000175000017500000000040215227365530023606 0ustar alastairalastairwarning: Assuming implicit save attribute for variable declaration --> tests/program4.f90:30:13 | 30 | real :: saved1 = 2.0 | ^^^^^^^^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement lfortran-0.64.0/tests/reference/cpp-program4-1796cb6.stdout0000664000175000017500000000305015227365530023500 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { float func1(float a, float b); float func2(float a, float b); } // Implementations namespace { float func1(float a, float b) { float c; static float saved= 2.00000000000000000e+00; saved = saved + 1.00000000000000000e+00; c = c + a + b + saved; return c; } float func2(float a, float b) { float c; float d; static float saved1= 2.00000000000000000e+00; static float saved2; saved1 = saved1 + 1.00000000000000000e+00; c = d + c + a + b + saved1 + saved2; saved2 = saved2 + 1.00000000000000000e+00; d = d + 3.00000000000000000e+00; return c; } void main2() { float x; float y; float z; x = 1.00000000000000000e+00; y = 2.00000000000000000e+00; z = func1(x, y); std::cout << "6.0 == " << " " << z << std::endl; z = func1(x, y); std::cout << "7.0 == " << " " << z << std::endl; z = func2(x, y); std::cout << "6.0 == " << " " << z << std::endl; z = func2(x, y); std::cout << "8.0 == " << " " << z << std::endl; } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/asr-modules_02-74be421.stdout0000664000175000017500000001722115227365530023715 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_02: (Program (SymbolTable 7 { b: (ExternalSymbol 7 b 2 b modules_02_a [] b Public ), e: (ExternalSymbol 7 e 4 e modules_02_c [] e Public ), x: (ExternalSymbol 7 x 4 d modules_02_c [] d Public ) }) modules_02 [modules_02_a modules_02_c] [(SubroutineCall 7 b () [] () .false. ) (SubroutineCall 7 x () [] () .false. ) (SubroutineCall 7 e () [] () .false. )] ), modules_02_a: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { }) b (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "b()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ) }) modules_02_a () [] .false. .false. .false. ), modules_02_c: (Module (SymbolTable 4 { d: (Function (SymbolTable 5 { }) d (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "d()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ), e: (Function (SymbolTable 6 { }) e (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "e()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ) }) modules_02_c () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit_typing1-7a0ea7d.stderr0000664000175000017500000000016715227365530025353 0ustar alastairalastairsemantic error: Variable 'l' is not declared --> tests/implicit_typing1.f90:2:1 | 2 | L = 3 | ^ 'l' is undeclared lfortran-0.64.0/tests/reference/asr_disable_warnings-save4-99c3220.json0000664000175000017500000000112115227365530025723 0ustar alastairalastair{ "basename": "asr_disable_warnings-save4-99c3220", "cmd": "lfortran --show-asr --no-warnings --no-color {infile} -o {outfile}", "infile": "tests/save4.f90", "infile_hash": "8ad16d18b9282d4bb2812bf641878b7a6738e0e34c356b94ff01ef8a", "outfile": null, "outfile_hash": null, "stdout": "asr_disable_warnings-save4-99c3220.stdout", "stdout_hash": "25ebe8c86a4fec2d1d22b63ada8a358e0ed704faad8b2e7e16af52bb", "stderr": "asr_disable_warnings-save4-99c3220.stderr", "stderr_hash": "e3013a477fb53db6747b4c2508286e403a3d023df3b260db13492ac4", "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-modules_04-d194daa.json0000664000175000017500000000073615227365530024170 0ustar alastairalastair{ "basename": "ast_f90-modules_04-d194daa", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/modules_04.f90", "infile_hash": "001166d3ec02d038539957e7b333b2f02902687e96980e325831c745", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-modules_04-d194daa.stdout", "stdout_hash": "a33aa109e8bf97d4a69f413dd829f073fc2fd561ccac6cd380513752", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_01-3f7a7b3.json0000664000175000017500000000075015227365530023427 0ustar alastairalastair{ "basename": "ast-program_01-3f7a7b3", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/program_01.f90", "infile_hash": "917ed02637c7a6c4e5e5407a0ccf45b4ef6ff79355c5c080e53d97e9", "outfile": null, "outfile_hash": null, "stdout": "ast-program_01-3f7a7b3.stdout", "stdout_hash": "b08a267e1b6a02696e7b1cd53bc5d1115953719d8eb6beb309d648fb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-write_22-368d6f8.stdout0000664000175000017500000000000415227365530023427 0ustar alastairalastairHHH lfortran-0.64.0/tests/reference/asr-modules_45-c69c75f.json0000664000175000017500000000075015227365530023450 0ustar alastairalastair{ "basename": "asr-modules_45-c69c75f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_45.f90", "infile_hash": "d68539c460764050c432f216e8ceed7eded8bf09258747500769b39e", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_45-c69c75f.stdout", "stdout_hash": "b1da2e27aa30c3862798a712e821d6289490ab9aa22d586af553a7d9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-continue_compilation_ff_2-9ba55e7.json0000664000175000017500000000121115227365530026572 0ustar alastairalastair{ "basename": "asr-continue_compilation_ff_2-9ba55e7", "cmd": "lfortran --fixed-form --continue-compilation --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/continue_compilation_ff_2.f", "infile_hash": "885df7aadcb0e8e8478ccad6225f17e5c3cf699a04ad8372958afeab", "outfile": null, "outfile_hash": null, "stdout": "asr-continue_compilation_ff_2-9ba55e7.stdout", "stdout_hash": "6b7a042fa48758883b644f18a35cafed9cdb47c21b5c3eb050c1d23a", "stderr": "asr-continue_compilation_ff_2-9ba55e7.stderr", "stderr_hash": "a325f18d048882d5c223d38beb948cb8c3f3e78347f0e46c3ef5f6d1", "returncode": 1 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope6-278bd63.stdout0000664000175000017500000000703215227365530027424 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 1 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 f1) (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (Var 1 x) (Integer 4) () ) () .false. .false. ) (Assignment (Var 1 x) (IntegerBinOp (Var 1 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .false. .false. () ), x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/asr_disable_warnings-style1-3d16af1.stdout0000664000175000017500000001303615227365530026635 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { save4: (Program (SymbolTable 2 { f: (Function (SymbolTable 3 { x: (Variable 3 x [] Local (IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(If () (IntegerCompare (Var 3 x) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Print (StringConstant "x is 1" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] )] () Public .false. .false. () ), y: (Variable 2 y [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) save4 [] [(If () (IntegerCompare (Var 2 y) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Print (StringConstant "y is 1" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-maskr_negative-89183d3.json0000664000175000017500000000074615227365530024331 0ustar alastairalastair{ "basename": "asr-maskr_negative-89183d3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/maskr_negative.f90", "infile_hash": "f49d8a5ebf8050f22484de61b993732e9fa5fab18faeee525c4579d1", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-maskr_negative-89183d3.stderr", "stderr_hash": "4002541c74a9445686f77ea75e6c0a357e9a4598a84578f7f81ad5ed", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-modules_05-c35e0ac.stdout0000664000175000017500000000436715227365530024064 0ustar alastairalastair(TranslationUnit [(Module modules_05_mod (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration () [(SimpleAttribute AttrPrivate )] [] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter ) (SimpleAttribute AttrPublic )] [(a [] [] () 5 Equal ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(b [] [] () 6 Equal ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(c [] [] () 7 Equal ())] () ) (Declaration () [(SimpleAttribute AttrPublic )] [(c [] [] () () None ())] () )] [] [] ) (Program modules_05 () [(Use [] modules_05_mod [(UseSymbol a () ) (UseSymbol c () )] .true. () )] [] [] [(Print 0 () [a c] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-global_scope7-69a167f.stdout0000664000175000017500000000114515227365530024662 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 6 define void @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i32, align 4 %0 = load i32, i32* @x, align 4 %1 = mul i32 2, %0 store i32 %1, i32* %__lfortran_evaluate_11, align 4 %2 = load i32, i32* @x, align 4 %3 = add i32 %2, 1 store i32 %3, i32* @x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return ret void } lfortran-0.64.0/tests/reference/ast-do2-1ec601e.stderr0000664000175000017500000000040215227365530022460 0ustar alastairalastairstyle suggestion: Use 'end do' instead of 'enddo' --> tests/do2.f90:5:1 | 5 | enddo | ^^^^^ help: write this as 'end do' style suggestion: Use 'end do' instead of 'enddo' --> tests/do2.f90:10:1 | 10 | enddo | ^^^^^ help: write this as 'end do' lfortran-0.64.0/tests/reference/ast-template_travel_01-7f304df.json0000664000175000017500000000100015227365530025136 0ustar alastairalastair{ "basename": "ast-template_travel_01-7f304df", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_travel_01.f90", "infile_hash": "49fd555855358466e9af6299db72ebf88c01a40bb93c00fefe71c2c7", "outfile": null, "outfile_hash": null, "stdout": "ast-template_travel_01-7f304df.stdout", "stdout_hash": "8aa8b8541d810fddc30b92f9ffd9cb1373705b0498f12a447399d29a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-case_02-9e53b61.stdout0000664000175000017500000000504415227365530023163 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { int32_t marks; int32_t out; marks = 81; if (91 <= marks <= 100) { out = 0; std::cout<< "Excellent!"< tests/errors/esub1.f90:1:16 | 1 | subroutine g() r | ^ lfortran-0.64.0/tests/reference/run-format_50-7def206.stdout0000664000175000017500000000020715227365530023640 0ustar alastairalastairtiny = 2.225E-308 huge = 1.798E+308 test = 1.235E+010 test =12.346E+009 test = 0.123E+011 tiny = 2.225E-0308 test = 1.235E+0010 PASSED lfortran-0.64.0/tests/reference/asr-program4-ba26fd1.stdout0000664000175000017500000007674415227365530023653 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { program4: (Program (SymbolTable 2 { func1: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), saved: (Variable 3 saved [] Local (RealConstant 2.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func1 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b)] [(Assignment (Var 3 saved) (RealBinOp (Var 3 saved) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. ) (Assignment (Var 3 c) (RealBinOp (RealBinOp (RealBinOp (Var 3 c) Add (Var 3 a) (Real 4) () ) Add (Var 3 b) (Real 4) () ) Add (Var 3 saved) (Real 4) () ) () .false. .false. )] (Var 3 c) Public .true. .true. () ), func2: (Function (SymbolTable 4 { a: (Variable 4 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 4 c [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 4 d [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), saved1: (Variable 4 saved1 [] Local (RealConstant 2.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), saved2: (Variable 4 saved2 [] Local () () Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) func2 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 a) (Var 4 b)] [(Assignment (Var 4 saved1) (RealBinOp (Var 4 saved1) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. ) (Assignment (Var 4 c) (RealBinOp (RealBinOp (RealBinOp (RealBinOp (RealBinOp (Var 4 d) Add (Var 4 c) (Real 4) () ) Add (Var 4 a) (Real 4) () ) Add (Var 4 b) (Real 4) () ) Add (Var 4 saved1) (Real 4) () ) Add (Var 4 saved2) (Real 4) () ) () .false. .false. ) (Assignment (Var 4 saved2) (RealBinOp (Var 4 saved2) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. ) (Assignment (Var 4 d) (RealBinOp (Var 4 d) Add (RealConstant 3.000000 (Real 4) ) (Real 4) () ) () .false. .false. )] (Var 4 c) Public .true. .true. () ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) program4 [] [(Assignment (Var 2 x) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 y) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 z) (FunctionCall 2 func1 () [((Var 2 x)) ((Var 2 y))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "6.0 == " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 z) (FunctionCall 2 func1 () [((Var 2 x)) ((Var 2 y))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "7.0 == " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 z) (FunctionCall 2 func2 () [((Var 2 x)) ((Var 2 y))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "6.0 == " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 z) (FunctionCall 2 func2 () [((Var 2 x)) ((Var 2 y))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "8.0 == " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-Subroutine_Call1-5aa005c.stdout0000664000175000017500000000102215227365530025635 0ustar alastairalastairprogram Subroutine_Call1 implicit none ! Syntax check !Subroutine CALL call randn(x(i)) call randn(x) call random_number(U) call rand_gamma0(a, .true., x) call rand_gamma0(a, .true., x(1)) call rand_gamma0(a, .false., x(i)) call rand_gamma_vector_n(a, size(x), x) call f(a=4, b=6, c=i) call g(a(3:5, i:j), b(:)) call g(a(:5, i:j), b(1:)) call a%random_number(u) call a%b%random_number(u) call f(a=4, b=6, c=i) call x%f%e() call self%dependency(ii)%info(unit, pr - 1) call self%dep(:self%ndep)%done(a) end program Subroutine_Call1 lfortran-0.64.0/tests/reference/asr-string_19-d880475.json0000664000175000017500000000074515227365530023150 0ustar alastairalastair{ "basename": "asr-string_19-d880475", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_19.f90", "infile_hash": "d8a26562a756345bdab3a05085b09fadef2c3113a092b362b278b648", "outfile": null, "outfile_hash": null, "stdout": "asr-string_19-d880475.stdout", "stdout_hash": "1b473fd75b82e3af952ee5a89dc81303a4aacbf8e9976ceada124d6f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-shiftl1-0ff5448.json0000664000175000017500000000071215227365530022752 0ustar alastairalastair{ "basename": "asr-shiftl1-0ff5448", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/shiftl1.f90", "infile_hash": "c0c9708eb1b78ae3123b7f35e798bdaf8cac8feb729db248ae3045cb", "outfile": null, "outfile_hash": null, "stdout": "asr-shiftl1-0ff5448.stdout", "stdout_hash": "cae013d4ce4ec54ed4cd88dec09d62dc414a9b027953660818de708c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-derived_types_09-0e83add.stdout0000664000175000017500000000065515227365530025267 0ustar alastairalastair(TranslationUnit [(Program type_parsing (TriviaNode [(EndOfLine) (EndOfLine)] [] ) [] [] [(DerivedType SomeType [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-continue_compilation_3-435a232.stderr0000664000175000017500000004040115227365530026300 0ustar alastairalastairsyntax error: Token '::' is unexpected here --> tests/errors/continue_compilation_3.f90:57:9 | 57 | rea :: test_real(12) | ^^ syntax error: Token ')' is unexpected here --> tests/errors/continue_compilation_3.f90:58:21 | 58 | real :: test_re() | ^ syntax error: The LFortran pragma !LF$ must be followed by a space --> tests/errors/continue_compilation_3.f90:173:9 | 173 | !LF$unroll 4 ! Error: Missing space after `!LF$` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Module 'continue_compilation_3_fake_module' modfile was not found --> tests/errors/continue_compilation_3.f90:48:5 | 48 | use continue_compilation_3_fake_module | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Explicit shaped array with nonconstant bounds --> tests/errors/continue_compilation_3.f90:69:23 | 69 | integer :: arr_nc(minval(abs(a))) | ^^^^^^^^^^^^^^ semantic error: Assumed-rank arrays are not supported in print statements --> tests/errors/continue_compilation_3.f90:30:18 | 30 | print *, x | ^ semantic error: Assumed rank arrays cannot be used as `source` argument to reshape intrinsic --> tests/errors/continue_compilation_3.f90:31:26 | 31 | print *, reshape(x, [size(x)]) | ^ semantic error: Assumed-rank array `x` cannot be accessed outside a select rank block --> tests/errors/continue_compilation_3.f90:32:18 | 32 | print *, x(1) | ^^^^ semantic error: Assumed-rank array 'x' must be a dummy argument --> tests/errors/continue_compilation_3.f90:33:6 | 33 | x = [1, 2] | ^ semantic error: Comparison operations are not allowed on assumed-rank arrays ('x') --> tests/errors/continue_compilation_3.f90:34:19 | 34 | print *, (x /= [1, 2]) | ^^^^^^^^^^^ semantic error: Non-variable expression in variable definition context (actual argument to INTENT = OUT/INOUT) --> tests/errors/continue_compilation_3.f90:70:26 | 70 | call intent_out_test(1) ! Error: literal constant with intent(out) | ^ semantic error: Non-variable expression in variable definition context (actual argument to INTENT = OUT/INOUT) --> tests/errors/continue_compilation_3.f90:71:26 | 71 | call intent_out_test(x + 1) ! Error: expression with intent(out) | ^^^^^ semantic error: Non-variable expression in variable definition context (actual argument to INTENT = OUT/INOUT) --> tests/errors/continue_compilation_3.f90:72:28 | 72 | call intent_inout_test(2) ! Error: literal constant with intent(inout) | ^ semantic error: Non-variable expression in variable definition context (actual argument to INTENT = OUT/INOUT) --> tests/errors/continue_compilation_3.f90:73:28 | 73 | call intent_inout_test(x * 2) ! Error: expression with intent(inout) | ^^^^^ semantic error: Type mismatch in argument `i`: expected `real(4)` but got `integer(4)` --> tests/errors/continue_compilation_3.f90:74:34 | 74 | call check_incompatible_type(i) ! Error: incompatible type passed | ^ semantic error: Argument 1 to Iachar must have length 1 --> tests/errors/continue_compilation_3.f90:76:14 | 76 | print *, iachar(s1) | ^^^^^^^^^^ semantic error: Empty array constructor is not allowed --> tests/errors/continue_compilation_3.f90:93:9 | 93 | a = [] | ^^ semantic error: Empty array constructor is not allowed --> tests/errors/continue_compilation_3.f90:95:16 | 95 | print *, [[[], [[]]], [[]], []] | ^^ semantic error: Empty array constructor is not allowed --> tests/errors/continue_compilation_3.f90:96:16 | 96 | print *, [[[], [[]]], []] | ^^ semantic error: Rank mismatch in array reference: the array `b` has rank `1`, but is referenced as rank `2` --> tests/errors/continue_compilation_3.f90:98:5 | 98 | b(:,:) = 1 | ^^^^^^ semantic error: Rank mismatch in array reference: the array `b` has rank `1`, but is referenced as rank `2` --> tests/errors/continue_compilation_3.f90:99:5 | 99 | b(:,:) = 2 | ^^^^^^ semantic error: Type member xx is not an array so it cannot be indexed. --> tests/errors/continue_compilation_3.f90:101:5 | 101 | y%xx(:) = 1 | ^^^^^^^ semantic error: Rank mismatch in array reference: the array `str` has rank `1`, but is referenced as rank `2` --> tests/errors/continue_compilation_3.f90:103:5 | 103 | str(1, 2)(:) = '1234' | ^^^^^^^^^^^^ semantic error: Rank mismatch in array reference: the array `str` has rank `1`, but is referenced as rank `3` --> tests/errors/continue_compilation_3.f90:104:5 | 104 | str(1,2,3)(:) = '1234' | ^^^^^^^^^^^^^ semantic error: Type-spec cannot contain an asterisk for a type parameter --> tests/errors/continue_compilation_3.f90:106:14 | 106 | print *, [character(*) :: "a", "b", "ball", "cat"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Type-spec cannot contain an asterisk for a type parameter --> tests/errors/continue_compilation_3.f90:107:14 | 107 | print *, [character(*) :: "a2", "b2", "ball2", "cat2"] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Different shape for array assignment on dimension 1(3 and 2) --> tests/errors/continue_compilation_3.f90:109:5 | 109 | x1 = reshape([1,2,3,4],[2,2]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Different shape for array assignment on dimension 1(3 and 1) --> tests/errors/continue_compilation_3.f90:110:5 | 110 | x1 = reshape([1,2,3,4],[1,2]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Arithmetic if (x) requires an integer or real for `x` --> tests/errors/continue_compilation_3.f90:114:9 | 114 | if ("yy") 1, 2, 3 | ^^^^ semantic error: Incorrect number of arguments passed to the 'size' intrinsic. It accepts at least 1 and at most 3 arguments. --> tests/errors/continue_compilation_3.f90:121:9 | 121 | i = size(a1, 1, 4, kind=4) | ^^^^^^^^^^^^^^^^^^^^^^ semantic error: Incorrect number of arguments passed to the 'size' intrinsic. It accepts at least 1 and at most 3 arguments. --> tests/errors/continue_compilation_3.f90:122:9 | 122 | i = size() | ^^^^^^ semantic error: Cannot assign to a constant variable --> tests/errors/continue_compilation_3.f90:124:5 | 124 | x3 = 1 | ^^^^^^ assignment here | 55 | integer, parameter :: x3 = 2 | ~~~~~~ declared as constant semantic error: The end variable of the data implied do loop must be constants --> tests/errors/continue_compilation_3.f90:127:22 | 127 | data(a1(i), i=1, k) / 1, 2, 3 / | ^ semantic error: The increment variable of the data implied do loop must be a constant --> tests/errors/continue_compilation_3.f90:129:25 | 129 | data(a1(i), i=1, 3, k) / 1, 2, 3 / | ^ semantic error: The start variable of the data implied do loop must be constants --> tests/errors/continue_compilation_3.f90:131:19 | 131 | data(a1(i), i=k, 3) / 1, 2, 3 / | ^ semantic error: Variable 'foo' is not declared --> tests/errors/continue_compilation_3.f90:134:9 | 134 | i = foo | ^^^ 'foo' is undeclared semantic error: Invalid argument `end` supplied --> tests/errors/continue_compilation_3.f90:136:5 | 136 | rewind(end="world") | ^^^^^^^^^^^^^^^^^^^ semantic error: Type and kind of the relevant arguments of Sign must be the same --> tests/errors/continue_compilation_3.f90:140:14 | 140 | print *, sign(1, 1_8) | ^^^^^^^^^^^^ semantic error: Argument 1 of dabs must be of double precision real type --> tests/errors/continue_compilation_3.f90:142:13 | 142 | print*, dabs(1) | ^^^^^^^ semantic error: Argument of `sqrt` has a negative argument --> tests/errors/continue_compilation_3.f90:144:14 | 144 | print *, sqrt(-1.0) | ^^^^^^^^^^ semantic error: Binary numeric operators cannot be used on strings --> tests/errors/continue_compilation_3.f90:146:14 | 146 | print *, "a" + "b" | ^^^^^^^^^ help: use '//' for string concatenation semantic error: The first index in string section is less than 1 --> tests/errors/continue_compilation_3.f90:149:19 | 149 | print*, "s:", s(-1:4) | ^^^^^^^ semantic error: Substring `start` is less than one --> tests/errors/continue_compilation_3.f90:151:13 | 151 | print*, s1(-2:6) | ^^^^^^^^ semantic error: Substring end index exceeds the string length --> tests/errors/continue_compilation_3.f90:154:13 | 154 | print*, s1(1: 9) | ^^^^^^^^ semantic error: Substring end index at must be of type integer --> tests/errors/continue_compilation_3.f90:156:18 | 156 | print*, s1(1:5.2) | ^^^ semantic error: Substring start index at must be of type integer --> tests/errors/continue_compilation_3.f90:158:16 | 158 | print*, s1(1.1:5) | ^^^ semantic error: Substring stride must be of type integer --> tests/errors/continue_compilation_3.f90:160:19 | 160 | print*, s(1:5:2.2) | ^^^ semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_3.f90:162:5 | 162 | x = "x" | ^ ^^^ type mismatch (integer and string) semantic error: Type mismatch in binary operator, the types must be compatible --> tests/errors/continue_compilation_3.f90:164:9 | 164 | x = 5 + "x" | ^ ^^^ type mismatch (integer and string) semantic error: Type mismatch in assignment, the types must be compatible --> tests/errors/continue_compilation_3.f90:164:5 | 164 | x = 5 + "x" | ^ ^^^ type mismatch (integer and string) semantic error: Subroutine `bpe` called as a function --> tests/errors/continue_compilation_3.f90:167:9 | 167 | i = bpe() | ^^^^^ semantic error: Variable 'xx' is not declared --> tests/errors/continue_compilation_3.f90:168:14 | 168 | print *, xx | ^^ 'xx' is undeclared semantic error: Variable 'test_re' is not declared --> tests/errors/continue_compilation_3.f90:169:5 | 169 | test_re = 1245.13 | ^^^^^^^ 'test_re' is undeclared semantic error: Array reference is not allowed on scalar variable --> tests/errors/continue_compilation_3.f90:170:5 | 170 | c(1) = 1 | ^^^^ semantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/continue_compilation_3.f90:178:14 | 178 | print *, merge_bits(1, 2, 3_8) | ^^^^^^^^^^^^^^^^^^^^^ semantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/continue_compilation_3.f90:179:14 | 179 | print *, merge_bits(merge_i,merge_j,merge_k) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:183:14 | 183 | print *, 5 .and. .true. | ^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:186:14 | 186 | print *, 3.14 .and. .false. | ^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:189:14 | 189 | print *, 5 .and. 6 | ^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:192:14 | 192 | print *, 5 .or. 6 | ^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:193:14 | 193 | print *, 5 .eqv. 6 | ^ semantic error: Right operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:194:28 | 194 | print *, .true. .neqv. 6 | ^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:195:14 | 195 | print *, 3.14 .and. "abcd" | ^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:196:14 | 196 | print *, "abcd" .neqv. "cdef" | ^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:197:14 | 197 | print *, 1 .neqv. 2 | ^ semantic error: Left operand's array element type must be LOGICAL --> tests/errors/continue_compilation_3.f90:198:14 | 198 | print *, [1,2,3] .and. .true. | ^^^^^^^ semantic error: Left operand's array element type must be LOGICAL --> tests/errors/continue_compilation_3.f90:199:14 | 199 | print *, [1.0, 2.0] .or. [3.0, 4.0] | ^^^^^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:200:14 | 200 | print *, "str1" .or. "str2" | ^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:201:14 | 201 | print *, "x" .and. .false. | ^^^ semantic error: Operand of .not. operator is string --> tests/errors/continue_compilation_3.f90:202:14 | 202 | print *, .NOT. "lf" | ^^^^^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:203:14 | 203 | print *, "8356" .or. 8356 | ^^^^^^ semantic error: Left operand must be LOGICAL or LOGICAL array --> tests/errors/continue_compilation_3.f90:204:14 | 204 | print *, "8356" .eqv. 8356.00 | ^^^^^^ semantic error: Left operand's array element type must be LOGICAL --> tests/errors/continue_compilation_3.f90:205:14 | 205 | print *, ['c', 'o', 'd', 'e'] .or. ['m', 'a', 's'] | ^^^^^^^^^^^^^^^^^^^^ semantic error: Different `character` lengths 7 and 2 in array constructor --> tests/errors/continue_compilation_3.f90:206:26 | 206 | print *, ["welcome", "to", "lf"] .and. "contributors" !even size diff of array element must be caught | ^^^^ semantic error: Different types of elements found in array constructor: string and integer(4) --> tests/errors/continue_compilation_3.f90:207:16 | 207 | print *, [( '*',i , i = 1, 10 )] | ^^^^^^^^^^^^^^^^^^^^^ semantic error: cannot pass unallocatable string to allocatable argument --> tests/errors/continue_compilation_3.f90:208:13 | 208 | call ss("hello") | ^^^^^^^ make this expression allocatable semantic error: PARAMETER 'cc_param_struct' shall not appear in a DATA statement --> tests/errors/continue_compilation_3.f90:211:10 | 211 | data cc_param_struct%xx / 5 / ! {Error} PARAMETER 'cc_param_struct' shall not appear in a DATA statement | ^^^^^^^^^^^^^^^^^^ semantic error: PARAMETER 'cc_param_arr' shall not appear in a DATA statement --> tests/errors/continue_compilation_3.f90:212:10 | 212 | data (cc_param_arr(i), i=1,3) / 4, 5, 6 / ! {Error} PARAMETER 'cc_param_arr' shall not appear in a DATA statement | ^^^^^^^^^^^^^^^^^^^^^^^^ semantic error: Argument of 'size' must be an array --> tests/errors/continue_compilation_3.f90:216:23 | 216 | print *, size(bpe) | ^^^ semantic error: Variable 'd' is not declared --> tests/errors/continue_compilation_3.f90:217:15 | 217 | bpe = d | ^ 'd' is undeclared semantic error: Assignment to subroutine is not allowed --> tests/errors/continue_compilation_3.f90:217:9 | 217 | bpe = d | ^^^ lfortran-0.64.0/tests/reference/asr-global_scope9-f638dd0.json0000664000175000017500000000073415227365530024204 0ustar alastairalastair{ "basename": "asr-global_scope9-f638dd0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope9.f90", "infile_hash": "29e87c62bbe7f9efedd2e3cf348e80153367ecc0369b16de6f4db296", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope9-f638dd0.stdout", "stdout_hash": "a9deca7ab979935ec817aaf911caeb6fb9f5627224b213bc083c2c0a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_04-114a023.stdout0000664000175000017500000000042515227365530023621 0ustar alastairalastair(TranslationUnit [(Program __xx_main () [] [(ImplicitNone [] () )] [] [(Print 0 () [(String "hello world" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-intrinsics_05-5a73322.json0000664000175000017500000000076415227365530024173 0ustar alastairalastair{ "basename": "llvm-intrinsics_05-5a73322", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_05.f90", "infile_hash": "735edff1f9942ce107c1b84f9ddcf00e648e553327f54dacf7b8238c", "outfile": null, "outfile_hash": null, "stdout": "llvm-intrinsics_05-5a73322.stdout", "stdout_hash": "bb43d977b1176d148ea81b2971011450eac7982e7724d82bf7305924", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-parse_without_program_line-0b3170b.json0000664000175000017500000000100315227365530027005 0ustar alastairalastair{ "basename": "ast-parse_without_program_line-0b3170b", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parse_without_program_line.f90", "infile_hash": "c68088b59370c4f5a2dc3747e3ca0c7de19d0210a92e2043fb975b96", "outfile": null, "outfile_hash": null, "stdout": "ast-parse_without_program_line-0b3170b.stdout", "stdout_hash": "3b6396afa747e6c7fd70f4fcdd6cde6d058a00d2d9b63afad4c2e1c5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-goto_03-75b98c5.json0000664000175000017500000000073715227365530022671 0ustar alastairalastair{ "basename": "ast-goto_03-75b98c5", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/goto_03.f90", "infile_hash": "2a8829b6e334f6c1619d1d9c772f871874336138a9aa68816641754c", "outfile": null, "outfile_hash": null, "stdout": "ast-goto_03-75b98c5.stdout", "stdout_hash": "043b1d9edace238ac68f4735fded4d14956a8653ab79077ac8d1030e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-implied_do_loop1-1d0df34.stdout0000664000175000017500000000015015227365530025250 0ustar alastairalastair1 12.8999996 2 12.8999996 1 1 12.8999996 2 12.8999996 12.8999996 2 1 12.8999996 2 12.8999996 12.8999996 lfortran-0.64.0/tests/reference/ast_f90-interface2-82ff094.stdout0000664000175000017500000000063515227365530024461 0ustar alastairalastairmodule interface2 implicit none abstract interface subroutine read_params(this, params) import class(porous_drag_model), intent(inout) :: this type(parameter_list), pointer, intent(in) :: params end subroutine read_params end interface interface assignment (=) module procedure SomeProc procedure SomeProc2 procedure SomeProc3 end interface assignment (=) end module interface2 lfortran-0.64.0/tests/reference/asr-implicit3-016ebe4.stderr0000664000175000017500000000025415227365530023676 0ustar alastairalastairsemantic error: Implicit typing is not allowed, enable it by using --implicit-typing --> tests/errors/implicit3.f90:3:1 | 3 | implicit real (a) | ^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-modules_37-7eba027.json0000664000175000017500000000075015227365530023432 0ustar alastairalastair{ "basename": "asr-modules_37-7eba027", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_37.f90", "infile_hash": "38f6c4643686768ff7e53fc236694c9de56c70b63a8b18bc70765a20", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_37-7eba027.stdout", "stdout_hash": "6636984e82df89e4aaa8969bc6d69f1cb70fd507087903c2caaa630f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-parameter_01-c88a516.stdout0000664000175000017500000000021115227365530024702 0ustar alastairalastairprogram parameter_01 implicit none integer :: i, j, k parameter(i = 1) parameter(j = 2, k = 3) print *, i, j, k end program parameter_01 lfortran-0.64.0/tests/reference/asr-array2-e7997a8.json0000664000175000017500000000070715227365530022621 0ustar alastairalastair{ "basename": "asr-array2-e7997a8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array2.f90", "infile_hash": "ec67f153c5f506f6a12ef94b06d43c7e9e86b9fc33c9c196029183f0", "outfile": null, "outfile_hash": null, "stdout": "asr-array2-e7997a8.stdout", "stdout_hash": "8643c8af8e2b1b6f282aae3e7e0889ce0332b95a47a290074f84af0c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutines_05-1398db3.stdout0000664000175000017500000002402515227365530024637 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bugsize: (Program (SymbolTable 2 { f: (Function (SymbolTable 3 { e: (Variable 3 e [x] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 3 x) () (Integer 4) () ))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 x)] [(Assignment (Var 3 e) (Cast (Var 3 x) IntegerToReal (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 3 x) () (Integer 4) () ))] PointerArray ) () () ) () .false. .false. ) (Assignment (Var 3 e) (ArrayConstant 16 [1.00000000e+00, 2.00000000e+00, 3.00000000e+00, 4.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] PointerArray ) ColMajor ) () .false. .false. ) (Print (StringFormat () [(Var 3 e)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), x: (Variable 2 x [] Local () () Default (Pointer (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bugsize [] [(Allocate [((Var 2 x) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] () () ())] () () () ) (SubroutineCall 2 f () [((Var 2 x))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/cpp-array1-d75d040.stdout0000664000175000017500000000630415227365530023137 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } struct dimension_descriptor { int32_t lower_bound, length, stride; }; struct f32_5_1 { Kokkos::View* data; dimension_descriptor dims[1]; bool is_allocated; f32_5_1(Kokkos::View* data_): data{data_} {}; }; struct f32_2_3_2 { Kokkos::View* data; dimension_descriptor dims[2]; bool is_allocated; f32_2_3_2(Kokkos::View* data_): data{data_} {}; }; struct f32_1_2_3_3 { Kokkos::View* data; dimension_descriptor dims[3]; bool is_allocated; f32_1_2_3_3(Kokkos::View* data_): data{data_} {}; }; struct i32_3_1 { Kokkos::View* data; dimension_descriptor dims[1]; bool is_allocated; i32_3_1(Kokkos::View* data_): data{data_} {}; }; struct i32_6_3_2 { Kokkos::View* data; dimension_descriptor dims[2]; bool is_allocated; i32_6_3_2(Kokkos::View* data_): data{data_} {}; }; struct i32_4_3_2_3 { Kokkos::View* data; dimension_descriptor dims[3]; bool is_allocated; i32_4_3_2_3(Kokkos::View* data_): data{data_} {}; }; // Forward declarations namespace { } // Implementations namespace { void main2() { bool a; Kokkos::View& b; Kokkos::View& b2; Kokkos::View& b3; float d; Kokkos::View e_data("e_data", 5); f32_5_1 e_value(&e_data); f32_5_1* e = &e_value; e->dims[0].lower_bound = 1; e->dims[0].length = 5; Kokkos::View e2_data("e2_data", 6); f32_2_3_2 e2_value(&e2_data); f32_2_3_2* e2 = &e2_value; e2->dims[0].lower_bound = 1; e2->dims[0].length = 2; e2->dims[1].lower_bound = 1; e2->dims[1].length = 3; Kokkos::View e3_data("e3_data", 6); f32_1_2_3_3 e3_value(&e3_data); f32_1_2_3_3* e3 = &e3_value; e3->dims[0].lower_bound = 1; e3->dims[0].length = 1; e3->dims[1].lower_bound = 1; e3->dims[1].length = 2; e3->dims[2].lower_bound = 1; e3->dims[2].length = 3; int32_t f; Kokkos::View g_data("g_data", 3); i32_3_1 g_value(&g_data); i32_3_1* g = &g_value; g->dims[0].lower_bound = 1; g->dims[0].length = 3; Kokkos::View g2_data("g2_data", 18); i32_6_3_2 g2_value(&g2_data); i32_6_3_2* g2 = &g2_value; g2->dims[0].lower_bound = 1; g2->dims[0].length = 6; g2->dims[1].lower_bound = 1; g2->dims[1].length = 3; Kokkos::View g3_data("g3_data", 24); i32_4_3_2_3 g3_value(&g3_data); i32_4_3_2_3* g3 = &g3_value; g3->dims[0].lower_bound = 1; g3->dims[0].length = 4; g3->dims[1].lower_bound = 1; g3->dims[1].length = 3; g3->dims[2].lower_bound = 1; g3->dims[2].length = 2; } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/asr-template_array_03-b7f9799.json0000664000175000017500000000112515227365530024732 0ustar alastairalastair{ "basename": "asr-template_array_03-b7f9799", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_array_03.f90", "infile_hash": "0a5f1f988c49d757a19f81d842de7eea019605572d3da0afa04570aa", "outfile": null, "outfile_hash": null, "stdout": "asr-template_array_03-b7f9799.stdout", "stdout_hash": "414e2da93440bc70f8a4e5efcdb70e1664b8c1d90eca2fcd649867a0", "stderr": "asr-template_array_03-b7f9799.stderr", "stderr_hash": "8e5e5eb3564a9c02c74e592aa5fdd1ce96bc1b68565e23b2b4ad7e98", "returncode": 0 }lfortran-0.64.0/tests/reference/asr_ignore_pragma-pragma2-ba96e35.json0000664000175000017500000000076615227365530025712 0ustar alastairalastair{ "basename": "asr_ignore_pragma-pragma2-ba96e35", "cmd": "lfortran --ignore-pragma --show-asr --no-color {infile} -o {outfile}", "infile": "tests/pragma2.f90", "infile_hash": "c76c30115a39aa0c98b24173c8517df1fb525bf101023b12dc38ca3e", "outfile": null, "outfile_hash": null, "stdout": "asr_ignore_pragma-pragma2-ba96e35.stdout", "stdout_hash": "6c967965badb096e669c047ce99a0fc897e3ad461a5578c3b11ff85e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-expr_05-c1f66bd.stdout0000664000175000017500000002574015227365530023400 0ustar alastairalastair(TranslationUnit [(Program expr_05 (TriviaNode [(EndOfLine) (Comment "! Test parantheses in expressions" )] [] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ()) (a [] [] () () None ()) (b [] [] () () None ()) (c [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(l [] [] () () None ())] () )] [(Assignment 0 a 3 () ) (Assignment 0 b 4 () ) (Assignment 0 c 5 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (* 2 3) () ) (Assignment 0 x (* (u- 2) 3) () ) (Assignment 0 x (* 2 (u- 3)) () ) (Assignment 0 x (* (u- 2) (u- 3)) () ) (Assignment 0 x (* (u- 2) (u- 3)) () ) (Assignment 0 x (u- (** 2 3)) () ) (Assignment 0 x (u- (** 2 3)) () ) (Assignment 0 x (u- (* 2 3)) () ) (Assignment 0 x (** 2 (u- 3)) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x a () ) (Assignment 0 x (Parenthesis a ) () ) (Assignment 0 x (* a b) () ) (Assignment 0 x (* (u- a) b) () ) (Assignment 0 x (u- (* a b)) () ) (Assignment 0 x (* a (u- b)) () ) (Assignment 0 x (* (u- a) (u- b)) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (* (* a b) c) () ) (Assignment 0 x (* (* (u- a) b) c) () ) (Assignment 0 x (* (* a (u- b)) c) () ) (Assignment 0 x (* (* a b) (u- c)) () ) (Assignment 0 x (* (* (u- a) (u- b)) (u- c)) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (+ 3 (* 4 5)) () ) (Assignment 0 x (* (+ 3 4) 5) () ) (Assignment 0 x (* a (+ b (* 5 (- c b)))) () ) (Assignment 0 x (* (- 3 (* (* 2 a) b)) 5) () ) (Assignment 0 x (* (+ (* (* (u- 2) a) b) 3) 5) () ) (Assignment 0 x (* (+ (* (* (u- 2) a) b) (* (* 3 b) a)) 5) () ) (Assignment 0 x (* (+ (* (u- 2) (/ a b)) (** (+ a (u- b)) 2)) 5) () ) (Assignment 0 x (* (+ (* (* (u+ 2) a) b) 3) 5) () ) (Assignment 0 x (+ (+ (** a 2) (* (* 2 a) b)) (** b 2)) () ) (Assignment 0 x (* (+ a b) (- a b)) () ) (Assignment 0 x (** (+ a b) 2) () ) (Assignment 0 x (* (+ a b) (+ (- (** a 2) (* a b)) (** b 2))) () ) (Assignment 0 x (* (* (- a b) (+ a b)) (+ (** a 2) (** b 2))) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (/ 1 (* a b)) () ) (Assignment 0 x (* (/ 1 a) b) () ) (Assignment 0 x (* (/ 1 a) b) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (/ 1 (+ (* a b) 1)) () ) (Assignment 0 x (+ (* (/ 1 a) b) 1) () ) (Assignment 0 x (+ (* (/ 1 a) b) 1) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (- 2 (u- 2)) () ) (Assignment 0 x (- a (- (u- b) c)) () ) (Assignment 0 x (- a (* (u- 2) b)) () ) (Assignment 0 x (- c (/ (u- 2) b)) () ) (Assignment 0 x (- a (+ (+ 2 3) 4)) () ) (Assignment 0 x (+ a (+ (+ 2 3) 4)) () ) (Assignment 0 x (- (+ (* 2 a) (* a b)) (+ (* a b) (* 2 a))) () ) (Assignment 0 x (- (+ (* 2 a) (* a b)) (- (* a b) (* 2 a))) () ) (Assignment 0 x (- a (- b (- c 1))) () ) (Assignment 0 x (- a b) () ) (Assignment 0 x (- a (- b c)) () ) (Assignment 0 x (- (- a b) c) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (u- (- a (+ (u- b) (- (u- b) (* (u- b) b))))) () ) (Assignment 0 x (u- (+ 3 5)) () ) (Assignment 0 x (u- (+ a 5)) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 l (BoolOp (BoolOp (<= (+ (* (** x 3) 4) a) 4) Or (BoolOp (< x 5) And (< x 6) ) ) Eqv (BoolOp (Logical .true. ()) Or (BoolOp (not (Logical .false. ())) And (Logical .true. ()) ) ) ) () ) (Assignment 0 l (BoolOp l Or (BoolOp l And l ) ) () ) (Assignment 0 l (BoolOp (BoolOp l Or l ) And l ) () ) (Assignment 0 l (BoolOp (BoolOp l And l ) Or l ) () ) (Assignment 0 l (BoolOp l And (BoolOp l Or l ) ) () ) (Assignment 0 l (BoolOp l Or (BoolOp (not l) And l ) ) () ) (Assignment 0 l (BoolOp l Or (BoolOp l And (not l) ) ) () ) (Assignment 0 l (BoolOp (BoolOp l And l ) Or (not l) ) () ) (Assignment 0 l (BoolOp (BoolOp l And (not l) ) Or l ) () ) (Assignment 0 l (BoolOp l And (not (BoolOp l Or l )) ) () )] [] )] ) lfortran-0.64.0/tests/reference/asr-derived_types_03-b1d32aa.stdout0000664000175000017500000004344115227365530025244 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_03: (Program (SymbolTable 2 { b: (Variable 2 b [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 x Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Struct (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) x (StructType [(Integer 4)] [] .true. .false. ) [] [i] [] Source Public .false. .false. .false. [] () () [] ), y: (Function (SymbolTable 4 { a: (Struct (SymbolTable 5 { i: (Variable 5 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (StructType [(Integer 4)] [] .true. .false. ) [] [i] [] Source Public .false. .false. .false. [] () () [] ), b: (Variable 4 b [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 4 a Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) y (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ), z: (Function (SymbolTable 6 { a: (Struct (SymbolTable 7 { i: (Variable 7 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (StructType [(Integer 4)] [] .true. .false. ) [] [i] [] Source Public .false. .false. .false. [] () () [] ), b: (Variable 6 b [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 6 a Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 6 z [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) z (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 6 z) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. )] (Var 6 z) Public .true. .true. () ) }) derived_types_03 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/cpp-arrays_01-4fac8c3.json0000664000175000017500000000073015227365530023331 0ustar alastairalastair{ "basename": "cpp-arrays_01-4fac8c3", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/arrays_01.f90", "infile_hash": "f7df4142feb383f836dfa072a60673922e8873b5695f893be8329b89", "outfile": null, "outfile_hash": null, "stdout": "cpp-arrays_01-4fac8c3.stdout", "stdout_hash": "d080ea538291a00639415954ed47e7605f4a0e724c6d9c0a0d23d430", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-coarray_var_name_collision_01-94763bf.f900000664000175000017500000000233515227365530027605 0ustar alastairalastairtype :: prif_coarray_handle type(c_ptr) :: info end type prif_coarray_handle program coarray_var_name_collision_01 implicit none integer(4) :: stat integer(4) :: stat1 call __module_prif_prif_init(stat1) call __module_prif_prif_sync_all() stat = 0 call __module_prif_prif_sync_all(stat) print *, stat call __module_prif_prif_stop(.false.) contains interface subroutine __module_prif_prif_init(exit_code) integer(4), intent(out) :: exit_code end subroutine __module_prif_prif_init end interface interface subroutine __module_prif_prif_stop(quiet, stop_code_int, stop_code_char) logical(1), intent(in), value :: quiet character(len=*, kind=1), intent(in), optional, value :: stop_code_char integer(4), intent(in), optional, value :: stop_code_int end subroutine __module_prif_prif_stop end interface interface subroutine __module_prif_prif_sync_all(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_all end interface end program coarray_var_name_collision_01 lfortran-0.64.0/tests/reference/run-exit1-29ee7ce.json0000664000175000017500000000077015227365530022620 0ustar alastairalastair{ "basename": "run-exit1-29ee7ce", "cmd": "lfortran --no-color {infile}", "infile": "tests/exit1.f90", "infile_hash": "abc1b402ea4f1576938c8fde3e78af95360770c94eacad03f403f5d6", "outfile": null, "outfile_hash": null, "stdout": "run-exit1-29ee7ce.stdout", "stdout_hash": "61f0d87e355fe9206f69359bd0d77b9ac928ec3fdf45d6c625f90bce", "stderr": "run-exit1-29ee7ce.stderr", "stderr_hash": "95f484ba233b9e026fd67516cf7aa5435cfa13519766c6e935d45309", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-derived_types_14-75884fe.stdout0000664000175000017500000010670115227365530025142 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_14_module: (Module (SymbolTable 4 { enum_type: (Struct (SymbolTable 5 { boolean: (Variable 5 boolean [] Local (IntegerConstant 102 (Integer 4) Decimal) (IntegerConstant 102 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), datetime: (Variable 5 datetime [] Local (IntegerConstant 105 (Integer 4) Decimal) (IntegerConstant 105 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), float: (Variable 5 float [] Local (IntegerConstant 104 (Integer 4) Decimal) (IntegerConstant 104 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), int: (Variable 5 int [] Local (IntegerConstant 103 (Integer 4) Decimal) (IntegerConstant 103 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), invalid: (Variable 5 invalid [] Local (IntegerConstant 100 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 5 string [] Local (IntegerConstant 101 (Integer 4) Decimal) (IntegerConstant 101 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) enum_type (StructType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) [] [invalid string boolean int float datetime] [] Source Private .false. .false. .false. [] () () [] ), toml_type: (Variable 4 toml_type [] Local (StructConstant 4 enum_type [((IntegerConstant 100 (Integer 4) Decimal)) ((IntegerConstant 101 (Integer 4) Decimal)) ((IntegerConstant 102 (Integer 4) Decimal)) ((IntegerConstant 103 (Integer 4) Decimal)) ((IntegerConstant 104 (Integer 4) Decimal)) ((IntegerConstant 105 (Integer 4) Decimal))] (StructType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (StructConstant 4 enum_type [((IntegerConstant 100 (Integer 4) Decimal)) ((IntegerConstant 101 (Integer 4) Decimal)) ((IntegerConstant 102 (Integer 4) Decimal)) ((IntegerConstant 103 (Integer 4) Decimal)) ((IntegerConstant 104 (Integer 4) Decimal)) ((IntegerConstant 105 (Integer 4) Decimal))] (StructType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) Parameter (StructType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) 4 enum_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) derived_types_14_module () [] .true. .false. .false. ), derived_types_14_module1: (Module (SymbolTable 2 { check: (Function (SymbolTable 7 { raw: (Variable 7 raw [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 7 res [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) check (FunctionType [(String 1 () AssumedLength DescriptorString)] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 raw)] [(Assignment (Var 7 res) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] (Var 7 res) Public .true. .true. () ), enum_type: (ExternalSymbol 2 enum_type 4 enum_type derived_types_14_module [] enum_type Public ), toml_get_value_type: (Function (SymbolTable 6 { 1_enum_type_boolean: (ExternalSymbol 6 1_enum_type_boolean 5 boolean derived_types_14_module [enum_type] boolean Public ), 1_enum_type_datetime: (ExternalSymbol 6 1_enum_type_datetime 5 datetime derived_types_14_module [enum_type] datetime Public ), 1_enum_type_float: (ExternalSymbol 6 1_enum_type_float 5 float derived_types_14_module [enum_type] float Public ), 1_enum_type_int: (ExternalSymbol 6 1_enum_type_int 5 int derived_types_14_module [enum_type] int Public ), 1_enum_type_invalid: (ExternalSymbol 6 1_enum_type_invalid 5 invalid derived_types_14_module [enum_type] invalid Public ), 1_enum_type_string: (ExternalSymbol 6 1_enum_type_string 5 string derived_types_14_module [enum_type] string Public ), raw: (Variable 6 raw [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), vtype: (Variable 6 vtype [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) toml_get_value_type (FunctionType [(String 1 () AssumedLength DescriptorString)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [check] [(Var 6 raw)] [(If () (FunctionCall 2 check () [((Var 6 raw))] (Logical 4) () () ) [(Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_string (Integer 4) (IntegerConstant 101 (Integer 4) Decimal) ) () .false. .false. ) (Return)] [] ) (If () (FunctionCall 2 check () [((Var 6 raw))] (Logical 4) () () ) [(Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_boolean (Integer 4) (IntegerConstant 102 (Integer 4) Decimal) ) () .false. .false. ) (Return)] [] ) (If () (FunctionCall 2 check () [((Var 6 raw))] (Logical 4) () () ) [(Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_int (Integer 4) (IntegerConstant 103 (Integer 4) Decimal) ) () .false. .false. ) (Return)] [] ) (If () (FunctionCall 2 check () [((Var 6 raw))] (Logical 4) () () ) [(Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_float (Integer 4) (IntegerConstant 104 (Integer 4) Decimal) ) () .false. .false. ) (Return)] [] ) (If () (FunctionCall 2 check () [((Var 6 raw))] (Logical 4) () () ) [(Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_datetime (Integer 4) (IntegerConstant 105 (Integer 4) Decimal) ) () .false. .false. ) (Return)] [] ) (Assignment (Var 6 vtype) (StructInstanceMember (Var 2 toml_type) 6 1_enum_type_invalid (Integer 4) (IntegerConstant 100 (Integer 4) Decimal) ) () .false. .false. )] (Var 6 vtype) Public .true. .true. () ), toml_type: (ExternalSymbol 2 toml_type 4 toml_type derived_types_14_module [] toml_type Public ) }) derived_types_14_module1 () [derived_types_14_module derived_types_14_module1] .false. .false. .false. ), main: (Program (SymbolTable 8 { }) main [] [(Print (StringConstant "running derived_types_14 main program" (String 1 (IntegerConstant 37 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-case_04-60840db.stdout0000664000175000017500000000321615227365530023162 0ustar alastairalastair(TranslationUnit [(Program case_04 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(Assignment 0 i 4 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Select 0 () i [(CaseStmt [(CaseCondExpr 1 )] () [(Print 0 () [(String "1" ())] () )] ) (CaseStmt [(CaseCondExpr 2 ) (CaseCondRange 3 5 ) (CaseCondExpr 6 ) (CaseCondRange 8 10 )] () [(Print 0 () [(String "2,3:5,6,8:10" ())] () )] )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/llvm-nullify_01-810c9d3.json0000664000175000017500000000075315227365530023547 0ustar alastairalastair{ "basename": "llvm-nullify_01-810c9d3", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_01.f90", "infile_hash": "5869e698f080612903a66a6001fa03b7b3390371a5a9eef3ca48a545", "outfile": null, "outfile_hash": null, "stdout": "llvm-nullify_01-810c9d3.stdout", "stdout_hash": "41f61980362bc0970b2722586c3f9455bb780f49c030cbaad70c177a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-recursion_03-8300fac.json0000664000175000017500000000075615227365530023767 0ustar alastairalastair{ "basename": "asr-recursion_03-8300fac", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/recursion_03.f90", "infile_hash": "ca5d64a5bc86665cf6168763480264f56ea25b3bfcc7217348fb14c0", "outfile": null, "outfile_hash": null, "stdout": "asr-recursion_03-8300fac.stdout", "stdout_hash": "6836026179274c49d57b678931cb519cdd2dbdd9885f502d66e1863a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-if_05-2102585.stdout0000664000175000017500000000162115227365530023020 0ustar alastairalastairfunction main() local x::Bool local y::Bool x = true y = false if x println("x: Single Line If") end if y println("y: Single Line If") end if x println("x: Multi Line If-Else: x is True") else println("x: Multi Line If-Else: x is False") end if y println("y: Multi Line If-Else: y is True") else println("y: Multi Line If-Else: y is False") end if x println("x: If part") else if x println("x: Else-If part") end end if y println("y: If part") else if x println("x: Else-If part") else println("Else part") end end if y println("y: If part") else if y println("y: Else-If part") else println("Else part") end end end main() lfortran-0.64.0/tests/reference/asr_clojure-functions_10-476558d.stdout0000664000175000017500000002212215227365530025731 0ustar alastairalastair(TranslationUnit (SymbolTable 1 {:kwarg_gp (Module (SymbolTable 2 {:mergegp (GenericProcedure 2 mergegp [2 mergei32 2 merger32 2 merger64] Public), :mergei32 (Function (SymbolTable 3 {:a (Variable 3 a [] Unspecified () () Default (Array (Integer 4) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :b (Variable 3 b [] Unspecified () () Default (Array (Integer 4) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :m (Variable 3 m [] Unspecified () () Default (Array (Integer 4) [(() ())] DescriptorArray) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () []), :r (Variable 3 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [])}) mergei32 (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray) (Array (Integer 4) [(() ())] DescriptorArray) (Array (Integer 4) [(() ())] DescriptorArray)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [(Var 3 a) (Var 3 b) (Var 3 m)] [] (Var 3 r) Public .true. .true. ()), :merger32 (Function (SymbolTable 4 {:a (Variable 4 a [] Unspecified () () Default (Array (Real 4) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :b (Variable 4 b [] Unspecified () () Default (Array (Real 4) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :m (Variable 4 m [] Unspecified () () Default (Array (Real 4) [(() ())] DescriptorArray) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () []), :r (Variable 4 r [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [])}) merger32 (FunctionType [(Array (Real 4) [(() ())] DescriptorArray) (Array (Real 4) [(() ())] DescriptorArray) (Array (Real 4) [(() ())] DescriptorArray)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [(Var 4 a) (Var 4 b) (Var 4 m)] [] (Var 4 r) Public .true. .true. ()), :merger64 (Function (SymbolTable 5 {:a (Variable 5 a [] Unspecified () () Default (Array (Real 8) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :b (Variable 5 b [] Unspecified () () Default (Array (Real 8) [(() ())] DescriptorArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :m (Variable 5 m [] Unspecified () () Default (Array (Real 8) [(() ())] DescriptorArray) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () []), :r (Variable 5 r [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [])}) merger64 (FunctionType [(Array (Real 8) [(() ())] DescriptorArray) (Array (Real 8) [(() ())] DescriptorArray) (Array (Real 8) [(() ())] DescriptorArray)] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [(Var 5 a) (Var 5 b) (Var 5 m)] [] (Var 5 r) Public .true. .true. ())}) kwarg_gp () [] .false. .false. .false.), :kwarg_use (Program (SymbolTable 6 {:a1 (Variable 6 a1 [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :a2 (Variable 6 a2 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :b1 (Variable 6 b1 [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :b2 (Variable 6 b2 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :m1 (Variable 6 m1 [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :m2 (Variable 6 m2 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :mergegp (ExternalSymbol 6 mergegp 2 mergegp kwarg_gp [] mergegp Public), :mergegp/mergei32 (ExternalSymbol 6 mergegp/mergei32 2 mergei32 kwarg_gp [] mergei32 Private), :mergegp/merger32 (ExternalSymbol 6 mergegp/merger32 2 merger32 kwarg_gp [] merger32 Private), :mergei32 (ExternalSymbol 6 mergei32 2 mergei32 kwarg_gp [] mergei32 Public), :merger32 (ExternalSymbol 6 merger32 2 merger32 kwarg_gp [] merger32 Public), :merger64 (ExternalSymbol 6 merger64 2 merger64 kwarg_gp [] merger64 Public)}) kwarg_use [kwarg_gp] [(Print (StringFormat () [(FunctionCall 6 mergegp/mergei32 6 mergegp [((ArrayPhysicalCast (Var 6 a1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) (())] (Integer 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ())) (Print (StringFormat () [(FunctionCall 6 mergegp/mergei32 6 mergegp [((ArrayPhysicalCast (Var 6 a1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 m1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ()))] (Integer 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ())) (Print (StringFormat () [(FunctionCall 6 mergegp/mergei32 6 mergegp [((ArrayPhysicalCast (Var 6 a1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 m1) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] DescriptorArray) ()))] (Integer 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ())) (Print (StringFormat () [(FunctionCall 6 mergegp/merger32 6 mergegp [((ArrayPhysicalCast (Var 6 a2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) (())] (Real 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ())) (Print (StringFormat () [(FunctionCall 6 mergegp/merger32 6 mergegp [((ArrayPhysicalCast (Var 6 a2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 m2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ()))] (Real 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ())) (Print (StringFormat () [(FunctionCall 6 mergegp/merger32 6 mergegp [((ArrayPhysicalCast (Var 6 a2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 b2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ())) ((ArrayPhysicalCast (Var 6 m2) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] DescriptorArray) ()))] (Real 4) () ())] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString)) ()))])}) []) lfortran-0.64.0/tests/reference/asr-nested_01-290187e.stdout0000664000175000017500000003003315227365530023451 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { nested_01: (Program (SymbolTable 5 { b: (ExternalSymbol 5 b 2 b nested_01_a [] b Public ), c: (Variable 5 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nested_01 [nested_01_a] [(Assignment (Var 5 c) (FunctionCall 5 b () [] (Integer 4) () () ) () .false. .false. )] ), nested_01_a: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { b: (Variable 3 b [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Function (SymbolTable 4 { d: (Variable 4 d [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "d()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Assignment (Var 4 d) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. )] (Var 4 d) Public .false. .false. () ), e: (Variable 3 e [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (FunctionType [] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "b()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Assignment (Var 3 e) (FunctionCall 3 d () [] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 3 b) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 3 b) Public .false. .false. () ) }) nested_01_a () [nested_01_a] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-dnint_args-3d72f4b.stderr0000664000175000017500000000023615227365530024136 0ustar alastairalastairsemantic error: Too many arguments to call `dnint` --> tests/errors/dnint_args.f90:2:13 | 2 | print*, dnint(1.0_8, 8) | ^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-statement_02-daaef34.stdout0000664000175000017500000001375015227365530024473 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { gscale: (Function (SymbolTable 2 { fpoint: (Function (SymbolTable 4 { fpoint_return_var_name: (Variable 4 fpoint_return_var_name [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 4 i [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpoint (FunctionType [(Integer 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 i)] [(Assignment (Var 4 fpoint_return_var_name) (Cast (Var 4 i) IntegerToReal (Real 4) () () ) () .false. .false. )] (Var 4 fpoint_return_var_name) Public .false. .true. () ) }) gscale (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [] () Public .true. .true. () ), statement_02: (Program (SymbolTable 3 { }) statement_02 [] [(SubroutineCall 1 gscale () [] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-complex_pow_test-c556b63.stdout0000664000175000017500000001307415227365530025346 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { complex2: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) complex2 [] [(Assignment (Var 2 x) (ComplexConstructor (RealConstant 3.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.000000 4.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 y) (ComplexConstructor (RealConstant 3.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.000000 2.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 z) (ComplexBinOp (Var 2 x) Pow (Var 2 y) (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_travel_02-4448a71.json0000664000175000017500000000100015227365530024774 0ustar alastairalastair{ "basename": "asr-template_travel_02-4448a71", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_travel_02.f90", "infile_hash": "045f7caf874cd599c9a9fb7115ab3b9d0341395565a1387bdfdaf16b", "outfile": null, "outfile_hash": null, "stdout": "asr-template_travel_02-4448a71.stdout", "stdout_hash": "563d56f6d81304d79f12d6d0c1ef8b154f7238f266487d2b3eaf346a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-return_06-ec98b0b.json0000664000175000017500000000075015227365530023547 0ustar alastairalastair{ "basename": "llvm-return_06-ec98b0b", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/return_06.f90", "infile_hash": "45589b7367a00e9dbec0cb3bfe91894d24c7914fda043a53043d4276", "outfile": null, "outfile_hash": null, "stdout": "llvm-return_06-ec98b0b.stdout", "stdout_hash": "2ac0b608df3a61128ee62d7fce3a0023d8c2f4225bc08208383f1fa3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_02-f2b519f.stderr0000664000175000017500000000022615227365530023427 0ustar alastairalastairsemantic error: Empty array constructor is not allowed --> tests/errors/array_02.f90:4:12 | 4 | print *, [[[], [[]]], [[]], []] | ^^ lfortran-0.64.0/tests/reference/ast-goto_01-d8652f5.stdout0000664000175000017500000000134315227365530023227 0ustar alastairalastair(TranslationUnit [(Program goto_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ())] () )] [(Assignment 0 a 5 () ) (GoTo 0 () 1 [] () ) (Print 1 () [a] () )] [] )] ) lfortran-0.64.0/tests/reference/run-write4-f453580.stdout0000664000175000017500000000004215227365530023120 0ustar alastairalastairhi, how are you? I am doing good lfortran-0.64.0/tests/reference/ast-comments1-213c55a.stdout0000664000175000017500000000166215227365530023651 0ustar alastairalastair(TranslationUnit [(Program comments1 (TriviaNode [(EndOfLine) (EndOfLine) (Comment "! Next line comment 0" )] [] ) [] [] [] [(Print 0 () [(String "1" ())] (TriviaNode [] [(EOLComment "! end of line comment 1" ) (Comment "! Next line comment 1" )] ) ) (Print 0 () [(String "2" ())] (TriviaNode [] [(EOLComment "! end of line comment 2" ) (Comment "! Next line comment 2" ) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/pass_global_stmts-expr1-213371d.json0000664000175000017500000000076415227365530025305 0ustar alastairalastair{ "basename": "pass_global_stmts-expr1-213371d", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr1.f90", "infile_hash": "3c49cb3157ec3feaf0f97156e5c11dca0ffd6481c97bb1a5dffaa14f", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-expr1-213371d.stdout", "stdout_hash": "69f2f9c1f4c2ea5420451e4b90e08b0165e49b5cdb6c5c7ef3ba7a86", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-volatile_02-2beae13.stdout0000664000175000017500000000520015227365530024375 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @volatile_02.iota_2 = internal global float 5.000000e-01 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) store volatile float 5.000000e-01, float* @volatile_02.iota_2, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* @volatile_02.iota_2) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_volatile_02 FINALIZE_SYMTABLE_volatile_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-class_04-290b898.stdout0000664000175000017500000002353015227365530023476 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> %foo_c.8 = type { %foo_b.7, %bar_c.6 } %foo_b.7 = type { %foo_a.4, %bar_b.5 } %foo_a.4 = type { %bar_a.3 } %bar_a.3 = type { i32 } %bar_b.5 = type { %bar_a.3, i32 } %bar_c.6 = type { %bar_b.5, i32 } @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %foo = alloca %foo_c.8, align 8 %3 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 1 %4 = getelementptr %bar_c.6, %bar_c.6* %3, i32 0, i32 1 %5 = getelementptr %bar_c.6, %bar_c.6* %3, i32 0, i32 0 %6 = getelementptr %bar_b.5, %bar_b.5* %5, i32 0, i32 1 %7 = getelementptr %bar_b.5, %bar_b.5* %5, i32 0, i32 0 %8 = getelementptr %bar_a.3, %bar_a.3* %7, i32 0, i32 0 %9 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %10 = getelementptr %foo_b.7, %foo_b.7* %9, i32 0, i32 1 %11 = getelementptr %bar_b.5, %bar_b.5* %10, i32 0, i32 1 %12 = getelementptr %bar_b.5, %bar_b.5* %10, i32 0, i32 0 %13 = getelementptr %bar_a.3, %bar_a.3* %12, i32 0, i32 0 %14 = getelementptr %foo_b.7, %foo_b.7* %9, i32 0, i32 0 %15 = getelementptr %foo_a.4, %foo_a.4* %14, i32 0, i32 0 %16 = getelementptr %bar_a.3, %bar_a.3* %15, i32 0, i32 0 %17 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %18 = getelementptr %foo_b.7, %foo_b.7* %17, i32 0, i32 0 %19 = getelementptr %foo_a.4, %foo_a.4* %18, i32 0, i32 0 %20 = getelementptr %bar_a.3, %bar_a.3* %19, i32 0, i32 0 store i32 -20, i32* %20, align 4 %21 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %22 = getelementptr %foo_b.7, %foo_b.7* %21, i32 0, i32 1 %23 = getelementptr %bar_b.5, %bar_b.5* %22, i32 0, i32 1 store i32 9, i32* %23, align 4 %24 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 1 %25 = getelementptr %bar_c.6, %bar_c.6* %24, i32 0, i32 1 store i32 11, i32* %25, align 4 %26 = alloca i64, align 8 %27 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %28 = getelementptr %foo_b.7, %foo_b.7* %27, i32 0, i32 0 %29 = getelementptr %foo_a.4, %foo_a.4* %28, i32 0, i32 0 %30 = getelementptr %bar_a.3, %bar_a.3* %29, i32 0, i32 0 %31 = load i32, i32* %30, align 4 %32 = alloca i32, align 4 store i32 %31, i32* %32, align 4 %33 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %26, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %32) %34 = load i64, i64* %26, align 8 %35 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %33, i8** %35, align 8 %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %34, i64* %36, align 8 %37 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %38 = load i8*, i8** %37, align 8 %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %40 = load i64, i64* %39, align 8 %41 = trunc i64 %40 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %38, i32 %41, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %42 = icmp eq i8* %33, null br i1 %42, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %33) br label %free_done free_done: ; preds = %free_nonnull, %.entry %43 = alloca i64, align 8 %44 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %45 = getelementptr %foo_b.7, %foo_b.7* %44, i32 0, i32 1 %46 = getelementptr %bar_b.5, %bar_b.5* %45, i32 0, i32 1 %47 = load i32, i32* %46, align 4 %48 = alloca i32, align 4 store i32 %47, i32* %48, align 4 %49 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %43, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %48) %50 = load i64, i64* %43, align 8 %51 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %49, i8** %51, align 8 %52 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %50, i64* %52, align 8 %53 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %54 = load i8*, i8** %53, align 8 %55 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %56 = load i64, i64* %55, align 8 %57 = trunc i64 %56 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %54, i32 %57, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %58 = icmp eq i8* %49, null br i1 %58, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %49) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %59 = alloca i64, align 8 %60 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 1 %61 = getelementptr %bar_c.6, %bar_c.6* %60, i32 0, i32 1 %62 = load i32, i32* %61, align 4 %63 = alloca i32, align 4 store i32 %62, i32* %63, align 4 %64 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %59, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %63) %65 = load i64, i64* %59, align 8 %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %64, i8** %66, align 8 %67 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %65, i64* %67, align 8 %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %69 = load i8*, i8** %68, align 8 %70 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %71 = load i64, i64* %70, align 8 %72 = trunc i64 %71 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %69, i32 %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %73 = icmp eq i8* %64, null br i1 %73, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %64) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %74 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %75 = getelementptr %foo_b.7, %foo_b.7* %74, i32 0, i32 0 %76 = getelementptr %foo_a.4, %foo_a.4* %75, i32 0, i32 0 %77 = getelementptr %bar_a.3, %bar_a.3* %76, i32 0, i32 0 %78 = load i32, i32* %77, align 4 %79 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 0 %80 = getelementptr %foo_b.7, %foo_b.7* %79, i32 0, i32 1 %81 = getelementptr %bar_b.5, %bar_b.5* %80, i32 0, i32 1 %82 = load i32, i32* %81, align 4 %83 = add i32 %78, %82 %84 = getelementptr %foo_c.8, %foo_c.8* %foo, i32 0, i32 1 %85 = getelementptr %bar_c.6, %bar_c.6* %84, i32 0, i32 1 %86 = load i32, i32* %85, align 4 %87 = add i32 %83, %86 %88 = icmp ne i32 %87, 0 br i1 %88, label %then, label %else then: ; preds = %free_done6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done6 br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/ast-fn4-eaaa354.json0000664000175000017500000000067615227365530022225 0ustar alastairalastair{ "basename": "ast-fn4-eaaa354", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fn4.f90", "infile_hash": "35fb507c50c885547daa8eef3f01aa0be9b3eb6db98d824ad6f51bc9", "outfile": null, "outfile_hash": null, "stdout": "ast-fn4-eaaa354.stdout", "stdout_hash": "a538cf9f3d1fe83eae77e770b51b16c0ddee2104709ac16f11f4558c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-coarray_sync_01-4cab83b.json0000664000175000017500000000106315227365530025410 0ustar alastairalastair{ "basename": "fortran-coarray_sync_01-4cab83b", "cmd": "lfortran --pass=coarray --show-fortran --no-color {infile} -o {outfile} --no-error-banner --line=-1 --column=-1 --coarray=true", "infile": "tests/coarray_sync_01.f90", "infile_hash": "10fa8b88e047ee18fde92796ad8a9545c696c38d289a140cb5fd061c", "outfile": null, "outfile_hash": null, "stdout": "fortran-coarray_sync_01-4cab83b.f90", "stdout_hash": "53be935ee2791ed9b92f29651e5bb0c9024af5b5c9173b2a33294ce3", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/lookup_name-lookup_name1-9a3abcc.stdout0000664000175000017500000000026315227365530026275 0ustar alastairalastair[{"kind":9,"location":{"range":{"start":{"character":12,"line":3},"end":{"character":12,"line":3}},"uri":"tests/lookup_name1.f90"},"name":"x","filename":"tests/lookup_name1.f90"}]lfortran-0.64.0/tests/reference/asr-sign_from_value-b974070.stdout0000664000175000017500000011547515227365530025061 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { flip_sign: (Program (SymbolTable 2 { a: (Variable 2 a [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), arr: (Variable 2 arr [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (IntegerConstant -3 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsidp: (Variable 2 epsidp [] Local (Cast (IntegerConstant 16 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 16 (Integer 8) Decimal) () ) (IntegerConstant 16 (Integer 8) Decimal) Save (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsisp: (Variable 2 epsisp [] Local (IntegerConstant 16 (Integer 4) Decimal) (IntegerConstant 16 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsrdp: (Variable 2 epsrdp [] Local (Cast (RealConstant 0.000001 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000001 (Real 8) ) () ) (RealConstant 0.000001 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsrsp: (Variable 2 epsrsp [] Local (RealConstant 0.000001 (Real 4) ) (RealConstant 0.000001 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ixdp: (Variable 2 ixdp [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) () ) (IntegerConstant 5 (Integer 8) Decimal) Save (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ixsp: (Variable 2 ixsp [] Local (IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rxdp: (Variable 2 rxdp [] Local (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (RealConstant 5.500000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rxsp: (Variable 2 rxsp [] Local (RealConstant 5.500000 (Real 4) ) (RealConstant 5.500000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (Cast (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) IntegerToReal (Real 4) (RealConstant -2.000000 (Real 4) ) () ) (RealConstant -2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (Cast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) IntegerToReal (Real 4) (RealConstant -3.000000 (Real 4) ) () ) (RealConstant -3.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) flip_sign [] [(Assignment (Var 2 rxsp) (RealBinOp (Var 2 rxsp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (Var 2 epsrsp)] 0 (Real 4) () ) (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxsp) Sub (RealConstant 5.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 epsrsp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxsp) (RealBinOp (Var 2 rxsp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (RealUnaryMinus (Var 2 epsrsp) (Real 4) () )] 0 (Real 4) () ) (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxsp) Add (RealConstant 5.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 epsrsp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxdp) (RealBinOp (Var 2 rxdp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 8) ) (Var 2 epsrdp)] 0 (Real 8) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxdp) Sub (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Var 2 epsrdp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 ixsp) (IntegerBinOp (Var 2 ixsp) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 4) Decimal) (Var 2 epsisp)] 0 (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 ixsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 ixsp) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxdp) (RealBinOp (Var 2 rxdp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 8) ) (RealUnaryMinus (Var 2 epsrdp) (Real 8) () )] 0 (Real 8) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxdp) Add (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Var 2 epsrdp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 ixdp) (IntegerBinOp (Var 2 ixdp) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 8) Decimal) (Var 2 epsidp)] 0 (Integer 8) () ) (Integer 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 ixdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 ixdp) NotEq (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 c) (IntegerBinOp (Var 2 a) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 4) Decimal) (Var 2 b)] 0 (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 c)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 c) NotEq (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 arr) (ArrayConstant 20 [1.00000000e+00, 2.00000000e+00, 3.00000000e+00, 4.00000000e+00, 5.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 2 z) (ArrayItem (Var 2 arr) [(() (IntrinsicElementalFunction Int [(RealBinOp (Var 2 x) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (Var 2 y)] 0 (Real 4) () ) (Real 4) () )] 0 (Integer 4) () ) ())] (Real 4) ColMajor () ) () .false. .false. ) (Print (StringFormat () [(Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (Var 2 z) NotEq (ArrayItem (Var 2 arr) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/run-read_iostat_01-ae75c6b.stdout0000664000175000017500000000000315227365530024713 0ustar alastairalastair-1 lfortran-0.64.0/tests/reference/ast-do3-54790e3.json0000664000175000017500000000067615227365530022020 0ustar alastairalastair{ "basename": "ast-do3-54790e3", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do3.f90", "infile_hash": "d72fb0f1c786740923a8ad6646a4d581704710df3ddfd528b2c96564", "outfile": null, "outfile_hash": null, "stdout": "ast-do3-54790e3.stdout", "stdout_hash": "99f5244df7fb841baf4ad3e01752a9d8a724322a5fceb2d8423f88a7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-infer_mode_conflict_01-0752705.stderr0000664000175000017500000000005615227365530026073 0ustar alastairalastairCannot use --infer and --std at the same time lfortran-0.64.0/tests/reference/ast-include_01-55ce778.stdout0000664000175000017500000000203415227365530023704 0ustar alastairalastair(TranslationUnit [(Subroutine a [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [] [] [] [] [(Print 0 () [(String "From B" ())] () ) (Print 0 () [(String "From C" ())] (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) ) (Print 0 () [(String "From A" ())] () )] [] [] ) (Program include_01 () [] [] [] [(SubroutineCall 0 a [] [] [] [] () ) (Print 0 () [(String "From Main" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/ast-integer16-eab0df9.json0000664000175000017500000000072715227365530023426 0ustar alastairalastair{ "basename": "ast-integer16-eab0df9", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/integer16.f90", "infile_hash": "baf6d6f3f106302b5334bdba9d405160f52d531ac537d6268cc984fb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-integer16-eab0df9.stderr", "stderr_hash": "dc07b98205e0d06bb0c8691f4c1f3888b088c8c43f984be4fe7ea2f0", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-case_02-a38c2d8.json0000664000175000017500000000074215227365530023060 0ustar alastairalastair{ "basename": "llvm-case_02-a38c2d8", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/case_02.f90", "infile_hash": "76d3020fba89787d565870ed03c1b5e8914d12b062cb9ca7a8c37550", "outfile": null, "outfile_hash": null, "stdout": "llvm-case_02-a38c2d8.stdout", "stdout_hash": "aadaa25a27aa91b452cc8e12e3b5e58d09276a1b849ce815db2e16e2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-use_statement-bb26ff2.json0000664000175000017500000000073415227365530024417 0ustar alastairalastair{ "basename": "ast-use_statement-bb26ff2", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/use_statement.f90", "infile_hash": "84a9de2e41ec72897bdf0e9ab42eec3c608a26d3636a9e34c20430a1", "outfile": null, "outfile_hash": null, "stdout": "ast-use_statement-bb26ff2.stdout", "stdout_hash": "5ca4b60754373f47b413fe4ba555f64191106b6692c796a8a9f8b6f2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_04-2e3d8fb.stderr0000664000175000017500000000056015227365530026237 0ustar alastairalastairruntime error: Array shape mismatch in subroutine 'my'. Tried to match size 4 of dimension 2 of argument number 1, but expected size is 1 --> tests/errors/array_bounds_check_04.f90:5:13 | 5 | call my(x) | ^ | 10 | integer, intent(in) :: x(3, 1) | ~ Parameter is size 1, argument is size 4 lfortran-0.64.0/tests/reference/run-floatStringInput-95c963d.stderr0000664000175000017500000000004015227365530025265 0ustar alastairalastairError: Invalid input from file. lfortran-0.64.0/tests/reference/fortran-coarray_initialization_01-23c9c70.f900000664000175000017500000001775715227365530026775 0ustar alastairalastairmodule coarray_saved_mod implicit none integer(4), pointer, save :: x integer(4), dimension(:), pointer, save :: y contains subroutine mod_sub() end subroutine mod_sub end module coarray_saved_mod type :: __module_prif_prif_dummy_team_descriptor end type __module_prif_prif_dummy_team_descriptor type :: __module_prif_prif_team_type type(__module_prif_prif_dummy_team_descriptor), pointer :: info end type __module_prif_prif_team_type type :: prif_coarray_handle type(c_ptr) :: info end type prif_coarray_handle program coarray_initialization_01 use coarray_saved_mod, only: mod_sub use coarray_saved_mod, only: x use coarray_saved_mod, only: y implicit none integer(4), pointer, save :: a integer(4), dimension(:), pointer, save :: b integer(4), pointer, save :: c integer(4), dimension(:), pointer, save :: d integer(4) :: me integer(4) :: stat call __module_prif_prif_init(stat) call c_f_pointer(x__coarray_data, x) call c_f_pointer(y__coarray_data, y, [10]) call c_f_pointer(a__coarray_data, a) call c_f_pointer(b__coarray_data, b, [10]) call c_f_pointer(c__coarray_data, c) call c_f_pointer(d__coarray_data, d, [10]) call __module_prif_prif_sync_all() me = lcompilers_prif_this_image() call mod_sub() call coarray_saved_sub() call __module_prif_prif_sync_all() if (me == 1) then a = lcompilers_prif_get_integer(4)(a__coarray_handle, [int(2, kind=8)], int(0, kind=8)) + 1 end if call __module_prif_prif_sync_all() call __module_prif_prif_stop(.false.) contains subroutine __lfortran_coarray_init_coarray_initialization_01_coarray_saved_mod_coarray_saved_sub() integer(4), pointer :: a__init_ptr integer(4), dimension(:), pointer :: b__init_ptr integer(4), pointer :: c__init_ptr integer(4), dimension(:), pointer :: d__init_ptr integer(4) :: stat integer(4), pointer :: x__init_ptr integer(4), pointer :: x__init_ptr1 integer(4), dimension(:), pointer :: y__init_ptr integer(4), dimension(:), pointer :: y__init_ptr1 call __module_prif_prif_init(stat) call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8, null(), a__coarray_handle, a__coarray_data) call c_f_pointer(a__coarray_data, a__init_ptr) a__init_ptr = 5 call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8*int(10, kind=8), null(), b__coarray_handle,& b__coarray_data) call c_f_pointer(b__coarray_data, b__init_ptr, [10]) b__init_ptr = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6] call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8, null(), c__coarray_handle, c__coarray_data) call c_f_pointer(c__coarray_data, c__init_ptr) c__init_ptr = 7 call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8*int(10, kind=8), null(), d__coarray_handle,& d__coarray_data) call c_f_pointer(d__coarray_data, d__init_ptr, [10]) d__init_ptr = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8] call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8, null(), x__coarray_handle, x__coarray_data) call c_f_pointer(x__coarray_data, x__init_ptr) x__init_ptr = 666 call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8*int(10, kind=8), null(), y__coarray_handle,& y__coarray_data) call c_f_pointer(y__coarray_data, y__init_ptr, [10]) y__init_ptr = [1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001] call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8, null(), x__coarray_handle1, x__coarray_data1) call c_f_pointer(x__coarray_data1, x__init_ptr1) x__init_ptr1 = 42 call __module_prif_prif_allocate_coarray([1_8], [integer(8) :: ], 4_8*int(10, kind=8), null(), y__coarray_handle1,& y__coarray_data1) call c_f_pointer(y__coarray_data1, y__init_ptr1, [10]) y__init_ptr1 = [43, 43, 43, 43, 43, 43, 43, 43, 43, 43] end subroutine __lfortran_coarray_init_coarray_initialization_01_coarray_saved_mod_coarray_saved_sub interface subroutine __module_prif_prif_allocate_coarray(lcobounds, ucobounds, size_in_bytes, final_proc,& & coarray_handle, allocated_memory, stat, errmsg, errmsg_alloc) type(c_ptr), intent(out) :: allocated_memory type(prif_coarray_handle), intent(out) :: coarray_handle character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc procedure(prif_coarray_cleanup_interface), pointer, intent(in) :: final_proc integer(8), dimension(:), intent(in), value :: lcobounds integer(8), intent(in), value :: size_in_bytes integer(4), intent(out), optional :: stat integer(8), dimension(:), intent(in), value :: ucobounds end subroutine __module_prif_prif_allocate_coarray end interface interface subroutine __module_prif_prif_get(image_num, coarray_handle, offset, current_image_buffer, size_in_bytes,& & stat, errmsg, errmsg_alloc) type(prif_coarray_handle), intent(in) :: coarray_handle type(c_ptr), intent(in), value :: current_image_buffer character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), value :: image_num integer(8), intent(in), value :: offset integer(8), intent(in), value :: size_in_bytes integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_get end interface interface subroutine __module_prif_prif_init(exit_code) integer(4), intent(out) :: exit_code end subroutine __module_prif_prif_init end interface interface subroutine __module_prif_prif_initial_team_index(coarray_handle, sub, initial_team_index, stat) type(prif_coarray_handle), intent(in) :: coarray_handle integer(4), intent(out) :: initial_team_index integer(4), intent(out), optional :: stat integer(8), dimension(:), intent(in), value :: sub end subroutine __module_prif_prif_initial_team_index end interface interface subroutine __module_prif_prif_stop(quiet, stop_code_int, stop_code_char) logical(1), intent(in), value :: quiet character(len=*, kind=1), intent(in), optional, value :: stop_code_char integer(4), intent(in), optional, value :: stop_code_int end subroutine __module_prif_prif_stop end interface interface subroutine __module_prif_prif_sync_all(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_all end interface interface subroutine __module_prif_prif_this_image_no_coarray(team, this_image) type(__module_prif_prif_team_type), intent(in), optional :: team integer(4), intent(out) :: this_image end subroutine __module_prif_prif_this_image_no_coarray end interface subroutine coarray_saved_sub() integer(4), pointer, save :: x integer(4), dimension(:), pointer, save :: y call c_f_pointer(x__coarray_data1, x) call c_f_pointer(y__coarray_data1, y, [10]) end subroutine coarray_saved_sub integer(4) function lcompilers_prif_get_integer(4)(coarray_handle, sub, offset) result(result) type(prif_coarray_handle), intent(in) :: coarray_handle integer(4) :: image_num integer(8), intent(in), value :: offset integer(8), dimension(:), intent(in), value :: sub call __module_prif_prif_initial_team_index(coarray_handle, sub, image_num) call __module_prif_prif_get(image_num, coarray_handle, offset, c_loc(result), 4_8) end function lcompilers_prif_get_integer(4) integer(4) function lcompilers_prif_this_image() call __module_prif_prif_this_image_no_coarray(lcompilers_prif_this_image) end function lcompilers_prif_this_image interface subroutine prif_coarray_cleanup_interface(handle) bind(c) type(prif_coarray_handle), intent(in), value :: handle end subroutine prif_coarray_cleanup_interface end interface end program coarray_initialization_01 lfortran-0.64.0/tests/reference/ast-program_cmake_02-d8d8f4d.json0000664000175000017500000000112115227365530024652 0ustar alastairalastair{ "basename": "ast-program_cmake_02-d8d8f4d", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/program_cmake_02.f90", "infile_hash": "c6368d319f7abf398750ad8860849dc5cb7712f0b79c55ee54604484", "outfile": null, "outfile_hash": null, "stdout": "ast-program_cmake_02-d8d8f4d.stdout", "stdout_hash": "12f0be51f073ad641e8e9ff1439a5a97b214abb1bb21188bf9647bb9", "stderr": "ast-program_cmake_02-d8d8f4d.stderr", "stderr_hash": "46bc7510f839ce095b554c75efdcb63bad2385e910d819d7305c5465", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_11-c169ea7.json0000664000175000017500000000077215227365530024634 0ustar alastairalastair{ "basename": "asr-derived_types_11-c169ea7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_11.f90", "infile_hash": "6c5517cdf157d0235d0883eb1261c38a9a4b1d783a4c550e52f6c553", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_11-c169ea7.stdout", "stdout_hash": "79f37b3b196b6a9de75b2932a2d1ee0307088af6eb864c1da2da8523", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-string_slice2-473fb60.stderr0000664000175000017500000000023215227365530024471 0ustar alastairalastairsemantic error: Substring end index exceeds the string length --> tests/errors/string_slice2.f90:6:12 | 6 | print*, s(1: 9) | ^^^^^^^ lfortran-0.64.0/tests/reference/asr-program3-557dbe8.json0000664000175000017500000000071515227365530023220 0ustar alastairalastair{ "basename": "asr-program3-557dbe8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/program3.f90", "infile_hash": "f5e4a3f2a2a6f406171d0aa3895b5d7342c4d87b73ffede073827f34", "outfile": null, "outfile_hash": null, "stdout": "asr-program3-557dbe8.stdout", "stdout_hash": "1703595bcae9504ca831109214ad483bfef8c0ffbe4d35e810d221ef", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-exit2-f1f3b2c.json0000664000175000017500000000077015227365530022604 0ustar alastairalastair{ "basename": "run-exit2-f1f3b2c", "cmd": "lfortran --no-color {infile}", "infile": "tests/exit2.f90", "infile_hash": "c5a7d81e07c46ace9d368370add645b4ae661ce043a89520234f71ba", "outfile": null, "outfile_hash": null, "stdout": "run-exit2-f1f3b2c.stdout", "stdout_hash": "61f0d87e355fe9206f69359bd0d77b9ac928ec3fdf45d6c625f90bce", "stderr": "run-exit2-f1f3b2c.stderr", "stderr_hash": "d79d075de4df8ce8a4bfbf243c5b77607fb4811cdbeacd9fad5542f1", "returncode": 2 }lfortran-0.64.0/tests/reference/julia-case_01-cbdd0aa.json0000664000175000017500000000073015227365530023410 0ustar alastairalastair{ "basename": "julia-case_01-cbdd0aa", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/case_01.f90", "infile_hash": "003a23367180e7f228e7e4ef5a6dfdb6749801b29ccf2002e2559e41", "outfile": null, "outfile_hash": null, "stdout": "julia-case_01-cbdd0aa.stdout", "stdout_hash": "bceaf3bd0933e0a0cdc1c4e6075d0cef2a1ee608767d1fa2766106ca", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-allocate_01-d7a2337.json0000664000175000017500000000070515227365530023477 0ustar alastairalastair{ "basename": "run-allocate_01-d7a2337", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/allocate_01.f90", "infile_hash": "140c96f4a8e85df7ace3fb207f9e2f00cf47f9b6798cb542f0784e07", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-allocate_01-d7a2337.stderr", "stderr_hash": "e7bb699ebf0e25f8c33f63bca4ca8c65e4f9113facef87a89e51c952", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-incorrect_array_type_where_02-b821d8c.stderr0000664000175000017500000000026115227365530027726 0ustar alastairalastairsemantic error: the first array argument to `where` must be of type logical --> tests/errors/incorrect_array_type_where_02.f90:8:10 | 8 | where(i1) b = 1 | ^^ lfortran-0.64.0/tests/reference/asr-matrix_matmul_01-6b086c6.json0000664000175000017500000000075415227365530024567 0ustar alastairalastair{ "basename": "asr-matrix_matmul_01-6b086c6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/matrix_matmul_01.f90", "infile_hash": "38df7f8926269bd945a6ff81bfa92300eb2d9fab68d567e96304260a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-matrix_matmul_01-6b086c6.stderr", "stderr_hash": "500c0bf01ba18c5f424435852718361858f3948e5e187c1ac18556da", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-derived_types_02-f576514.stdout0000664000175000017500000001531315227365530025046 0ustar alastairalastair(TranslationUnit [(Module derived_types_02_m (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(r8 [] [] () (FuncCallOrArray kind [] [(() (Real "0.d0") () 0)] [] [] [] ) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (DerivedType B [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] ) (DerivedType C [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] ) (DerivedType X [] (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [(AttrExtends B ) (SimpleAttribute AttrPublic )] [(Declaration () [(SimpleAttribute AttrPrivate )] [] () ) (Declaration (AttrType TypeReal [(() r8 Value)] () () None ) [] [(r1 [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Declaration (AttrType TypeType [] () C None ) [(SimpleAttribute AttrPointer )] [(cc [] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ())] () ) (Declaration (AttrType TypeReal [(() r8 Value)] () () None ) [(SimpleAttribute AttrPointer )] [(r2 [(() () DimensionExpr)] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ()) (r3 [(() () DimensionExpr)] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ())] () )] [(DerivedTypeProc () [(SimpleAttribute AttrPrivate )] [(UseSymbol p1 () )] () ) (DerivedTypeProc () [] [(UseSymbol p2 () )] () )] )] [] [(Subroutine p1 [(this)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeClass [] () X None ) [(AttrIntent Out )] [(this [] [] () () None ())] () )] [] [] [] ) (Subroutine p2 [(this)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeClass [] () X None ) [(AttrIntent InOut )] [(this [] [] () () None ())] () )] [] [] [] )] ) (Program derived_types_02 () [(Use [] derived_types_02_m [(UseSymbol X () )] .true. () )] [(ImplicitNone [] () )] [(Declaration (AttrType TypeType [] () X None ) [] [(b [] [] () () None ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast-types_08-c70036f.stdout0000664000175000017500000000710115227365530023415 0ustar alastairalastair(TranslationUnit [(Program types_08 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] [(Subroutine f [(i) (j)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrOptional ) (AttrIntent In )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(j [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrOptional )] [(j [] [] () () None ())] () )] [] [] [] ) (Subroutine g [(i) (j)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrOptional ) (AttrIntent In )] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(j [] [] () () None ())] () ) (Declaration () [(AttrIntent In )] [(j [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrOptional )] [(j [] [] () () None ())] () )] [] [] [] )] )] ) lfortran-0.64.0/tests/reference/ast-derived_types_02-35d66e0.stdout0000664000175000017500000002410215227365530025115 0ustar alastairalastair(TranslationUnit [(Module a () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(r8 [] [] () (FuncCallOrArray kind [] [(() (Real "0.d0") () 0)] [] [] [] ) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (DerivedType B [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] ) (DerivedType C [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] ) (DerivedType X [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(AttrExtends B ) (SimpleAttribute AttrPublic )] [(Declaration () [(SimpleAttribute AttrPrivate )] [] () ) (Declaration (AttrType TypeReal [(() r8 Value)] () () None ) [] [(r1 [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Declaration (AttrType TypeType [] () C None ) [(SimpleAttribute AttrPointer )] [(cc [] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ())] () ) (Declaration (AttrType TypeReal [(() r8 Value)] () () None ) [(SimpleAttribute AttrPointer )] [(r2 [(() () DimensionExpr)] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ()) (r3 [(() () DimensionExpr)] [] () (FuncCallOrArray null [] [] [] [] [] ) Arrow ())] () )] [(Private () ) (DerivedTypeProc () [(SimpleAttribute AttrPrivate )] [(UseSymbol p1 () )] () ) (DerivedTypeProc something [(SimpleAttribute AttrPrivate )] [(UseSymbol p1b () )] () ) (DerivedTypeProc () [(AttrPass self )] [(UseSymbol p2 () )] () ) (DerivedTypeProc () [] [(UseSymbol proc_1 () ) (UseSymbol proc_2 () )] () ) (GenericOperator [] NOTEQ [p5 p6] () ) (GenericOperator [] PLUS [p8] () ) (GenericDefinedOperator [] "in" [p7] () ) (GenericDefinedOperator [] "dot" [p10] () ) (GenericOperator [] DIV [p11] () ) (GenericAssignment [] [p9] () ) (GenericName [(SimpleAttribute AttrPublic )] calcCoeffs [calcCoeffsReal calcCoeffsKPoint] () ) (GenericName [(SimpleAttribute AttrPrivate )] name [sample] () ) (GenericName [] p1 [p2] (TriviaNode [] [(Semicolon) (EndOfLine)] ) ) (GenericWrite [(SimpleAttribute AttrPublic )] formatted [t_write] () ) (GenericRead [] unformatted [t_read] () ) (FinalName y () )] ) (DerivedType matrix [k b] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrKind )] [(k [] [] () 4 Equal ())] () ) (Declaration (AttrType TypeInteger [(() 8 Value)] () () None ) [(SimpleAttribute AttrLen )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() k Value)] () () None ) [] [(element [(1 b DimensionExpr) (1 b DimensionExpr)] [] () () None ())] () )] [] )] [] [(Subroutine p1 [(this)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeClass [] () X None ) [(AttrIntent Out )] [(this [] [] () () None ())] () )] [] [] [] ) (Subroutine p2 [(this)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeClass [] () X None ) [(AttrIntent InOut )] [(this [] [] () () None ())] () )] [] [] [] )] )] ) lfortran-0.64.0/tests/reference/asr-sizeof_01-9e0775c.stderr0000664000175000017500000000036315227365530023536 0ustar alastairalastairwarning: `sizeof` is an LFortran extension --> tests/warnings/sizeof_01.f90:6:9 | 6 | s = sizeof(x) | ^^^^^^^^^ use the `storage_size` intrinsic function. Alternatively, use `c_sizeof` from `iso_c_binding` for `bind(c)` types lfortran-0.64.0/tests/reference/julia-block_02-1362742.json0000664000175000017500000000105415227365530023142 0ustar alastairalastair{ "basename": "julia-block_02-1362742", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/block_02.f90", "infile_hash": "454b633240fa00d44de1b5374429d3d7edc1c37ccd92b8b93394d639", "outfile": null, "outfile_hash": null, "stdout": "julia-block_02-1362742.stdout", "stdout_hash": "59fcc1dd21572c0fc98eda4d9cded92ecfe679bd97aee86ad591cb61", "stderr": "julia-block_02-1362742.stderr", "stderr_hash": "60488b7fcd202fd28a9fb7045091257667eed65fe1dec8040b9c2871", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-specific_type_intrinsic-60c666c.json0000664000175000017500000000100115227365530026275 0ustar alastairalastair{ "basename": "asr-specific_type_intrinsic-60c666c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/specific_type_intrinsic.f90", "infile_hash": "442e8580aa683980ba51d19893cf7a3c1add2254bf3099797f242fe8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-specific_type_intrinsic-60c666c.stderr", "stderr_hash": "19c488d38fbb043d34d051f0af173af9108e439e5af9da09ded06a59", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-crlf1-374a66c.stdout0000664000175000017500000000036415227365530022762 0ustar alastairalastair(TranslationUnit [(Program p () [] [] [] [(SubroutineCall 0 f [] [] [] [] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-fixed_form_call1-ad7fd7d.stdout0000664000175000017500000003431615227365530025376 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { idd_frm: (Function (SymbolTable 2 { lw: (Variable 2 lw [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prinf: (Function (SymbolTable 3 { prinf_arg_0: (Variable 3 prinf_arg_0 [] Unspecified () () Default (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prinf_arg_1: (Variable 3 prinf_arg_1 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), prinf_arg_2: (Variable 3 prinf_arg_2 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) prinf (FunctionType [(String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) (Integer 4) (Integer 4)] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 prinf_arg_0) (Var 3 prinf_arg_1) (Var 3 prinf_arg_2)] [] () Public .false. .false. () ), w: (Variable 2 w [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) idd_frm (FunctionType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 m) (Var 2 n) (Var 2 w) (Var 2 x) (Var 2 y)] [(SubroutineCall 2 prinf () [((StringConstant "lw = *" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((Var 2 lw)) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) (SubroutineCall 2 prinf () [((StringConstant "16m+70 = *" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) )) ((IntegerBinOp (IntegerBinOp (IntegerConstant 16 (Integer 4) Decimal) Mul (Var 2 m) (Integer 4) () ) Add (IntegerConstant 70 (Integer 4) Decimal) (Integer 4) () )) ((IntegerConstant 1 (Integer 4) Decimal))] () .false. ) (Return)] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/julia-block_03-cf8537e.json0000664000175000017500000000073315227365530023402 0ustar alastairalastair{ "basename": "julia-block_03-cf8537e", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/block_03.f90", "infile_hash": "3271e019be3575ad1c8280a5b50d7fccb0534f39241680ad66e6bc50", "outfile": null, "outfile_hash": null, "stdout": "julia-block_03-cf8537e.stdout", "stdout_hash": "dc1a8b68264dd9da21563f4ce401332633d1142fec545c6381da785c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-goto_02-fc47ad0.stderr0000664000175000017500000000103115227365530023330 0ustar alastairalastairstyle suggestion: Use '>' instead of '.gt.' --> tests/../integration_tests/goto_02.f90:10:12 | 10 | if (A.GT.2) go to 95 | ^^^^ help: write this as '>' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/goto_02.f90:13:12 | 13 | if (A.EQ.1) go to 10 | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/goto_02.f90:25:12 | 25 | if (A.EQ.2) go to 99 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/run-scalar_allocation_check_01-a82b6b0.json0000664000175000017500000000076215227365530026577 0ustar alastairalastair{ "basename": "run-scalar_allocation_check_01-a82b6b0", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/scalar_allocation_check_01.f90", "infile_hash": "6fbed4236f624f5378290445365914265a7e928f30530ce1fc09c955", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-scalar_allocation_check_01-a82b6b0.stderr", "stderr_hash": "0f0daac2592abeb1d221a248f68e97b899399ba17a23332688bd1c6c", "returncode": 1 }lfortran-0.64.0/tests/reference/llvm-arrays_101-8ed52ae.json0000664000175000017500000000075315227365530023611 0ustar alastairalastair{ "basename": "llvm-arrays_101-8ed52ae", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_101.f90", "infile_hash": "2836e67268706a938da0f88016329436a3641b137b7f506855b0a304", "outfile": null, "outfile_hash": null, "stdout": "llvm-arrays_101-8ed52ae.stdout", "stdout_hash": "3d53bfb5fed0d2173e9785f585739f0dfa7fe8386a1dbfb4a227178f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_05-e6d3b50.stdout0000664000175000017500000001363615227365530023637 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_05: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), numbers: (Variable 2 numbers [] Local (ArrayConstant 20 [1.50000000e+00, 3.20000005e+00, 4.50000000e+00, 8.99999976e-01, 7.19999981e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (ArrayConstant 20 [1.50000000e+00, 3.20000005e+00, 4.50000000e+00, 8.99999976e-01, 7.19999981e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_05 [] [(DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 numbers) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Mul (RealConstant 2.000000 (Real 4) ) (Real 4) () ) () .false. .false. )] [] ) (Assignment (Var 2 numbers) (ArrayConstant 20 [1.50000000e+00, 3.20000005e+00, 4.50000000e+00, 8.99999976e-01, 7.19999981e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-flush_invalid_kwarg1-9fc0c7b.stderr0000664000175000017500000000025215227365530026171 0ustar alastairalastairsemantic error: Invalid argument `start` supplied --> tests/errors/flush_invalid_kwarg1.f90:3:5 | 3 | FLUSH(unit=10, start=100) | ^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor2-1db2235.stdout0000664000175000017500000000700715227365530027014 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor2: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor2 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (IntegerConstant 12345678 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format8-4e5a9c0.stdout0000664000175000017500000000020215227365530023414 0ustar alastairalastair 0.10000000000000000E-09 0.10000000000000000E-99 0.10000000000000000E+01 0.10000000000000000E+11 0.10000000000000000+101 lfortran-0.64.0/tests/reference/pass_do_loops-loop_var_use_after_loop-e26183c.stdout0000664000175000017500000006647115227365530030750 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "In loop 1 i =" (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) Lt (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] [] )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "After loop 1 i = " (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "In loop 2 i = " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) Lt (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Print (StringConstant "if (i < 2) then" (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "After loop 2 i = " (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "In loop 3 i = " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) LtE (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(If () (IntegerCompare (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Eq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(If () (IntegerCompare (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] [] )] [] )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "After loop 3 i = " (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "In loop 4 i = " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) LtE (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(If () (IntegerCompare (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Eq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(If () (IntegerCompare (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Exit () )] [(Print (StringConstant "i - 1 /= 3" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] )] [] )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "After loop 4 i = " (String 1 (IntegerConstant 17 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 i) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_07-240b0d5.json0000664000175000017500000000076115227365530024057 0ustar alastairalastair{ "basename": "asr-intrinsics_07-240b0d5", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_07.f90", "infile_hash": "fb38a4369a15cd151941ce57b634ac91745bd83541722d9fbb171a18", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_07-240b0d5.stdout", "stdout_hash": "b72cef7b76a3ca0cfec1caa592a8541d0f2c4577f9ec5659e9ae064a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope9-4cbbc3e.stdout0000664000175000017500000000615715227365530027644 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] ReturnVar () () Default (Integer 8) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 8) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 1 x) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 6 (Integer 8) Decimal) () ) () .false. .false. ) (Assignment (Var 2 f1) (Var 1 x) () .false. .false. )] (Var 2 f1) Public .false. .false. () ), x: (Variable 1 x [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-polymorphic_arguments_02-bb6f3e2.json0000664000175000017500000000102215227365530026457 0ustar alastairalastair{ "basename": "asr-polymorphic_arguments_02-bb6f3e2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/polymorphic_arguments_02.f90", "infile_hash": "56e8d7a53ae767686c5bb655fe9c19c37e8cf8112500fed026cd8dc1", "outfile": null, "outfile_hash": null, "stdout": "asr-polymorphic_arguments_02-bb6f3e2.stdout", "stdout_hash": "118544e56b29120f3cf6f05b05ed7acdda349e35f22d0acd550bf49c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-open1-9127585.stdout0000664000175000017500000000065015227365530023320 0ustar alastairalastairprogram open1 ! Tests for syntax (AST) only: open(file="p_cc", newunit=u) open(task_lun, file=taskfile) open(unit=gmv_lun, FILE=fname, IOSTAT=ier, POSITION="rewind") open(newunit=this%lun, file=outfile, status="replace", iostat=ios) open(unit=10, file="test1.inp", position="rewind", action="read", status="old") open(UNIT=funit, FILE=tname, STATUS=fstat, ACCESS="SEQUENTIAL", ACTION=faction, IOSTAT=ierr) end program open1 lfortran-0.64.0/tests/reference/asr-arrays_107-d961168.json0000664000175000017500000000075015227365530023214 0ustar alastairalastair{ "basename": "asr-arrays_107-d961168", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_107.f90", "infile_hash": "6fe4735c981484adb5f98c1ede5b1b92c06ab299628061265adefc9d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-arrays_107-d961168.stderr", "stderr_hash": "12c9d3bf8025057006e350a4763c076da6cdaf25c1a98f6005a58ad1", "returncode": 2 }lfortran-0.64.0/tests/reference/run-format_34-81f4937.json0000664000175000017500000000071515227365530023145 0ustar alastairalastair{ "basename": "run-format_34-81f4937", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_34.f90", "infile_hash": "f71b29e58cc9d9abb8bf7d458a509b83d1457839bb7b6d8ec3a51859", "outfile": null, "outfile_hash": null, "stdout": "run-format_34-81f4937.stdout", "stdout_hash": "aec31744f20adfa39680fe35eeb9097c6e60812f9bb44a0bf188bf7d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-specific_type_intrinsic-60c666c.stderr0000664000175000017500000000026115227365530026636 0ustar alastairalastairsemantic error: Argument 1 of dabs must be of double precision real type --> tests/errors/specific_type_intrinsic.f90:2:13 | 2 | print*, dabs(1) | ^^^^^^^ lfortran-0.64.0/tests/reference/llvm-global_scope9-bdf4288.json0000664000175000017500000000073715227365530024377 0ustar alastairalastair{ "basename": "llvm-global_scope9-bdf4288", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/global_scope9.f90", "infile_hash": "29e87c62bbe7f9efedd2e3cf348e80153367ecc0369b16de6f4db296", "outfile": null, "outfile_hash": null, "stdout": "llvm-global_scope9-bdf4288.stdout", "stdout_hash": "8e19a49eebedb89e1d18b5c154c1e7f5c353709f04de833b058b6d9b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-expr8-cb13ef4.stdout0000664000175000017500000000112015227365530023142 0ustar alastairalastair(TranslationUnit [(Assignment 0 i 123 () ) (Assignment 0 j 123456789824390874092509458720948720947502984752098457242092870987 () ) (Assignment 0 k (* 2 18446744073709551616) () ) (Assignment 0 i 123_i8 () ) (Assignment 0 j 123456789824390874092509458720948720947502984752098457242092870987_i8 () ) (Assignment 0 k (* 2 18446744073709551616_i8) () )] ) lfortran-0.64.0/tests/reference/asr-int_01-72c2ff1.stdout0000664000175000017500000000707515227365530023126 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { int_01: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (RealConstant 3.300000 (Real 4) ) (RealConstant 3.300000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (IntegerConstant 7 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_01 [] [(Print (StringFormat () [(IntrinsicElementalFunction Int [(Var 2 x)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntrinsicElementalFunction Int [(Var 2 y)] 0 (Integer 4) (IntegerConstant 7 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-bindc3-91bce68.json0000664000175000017500000000073415227365530022627 0ustar alastairalastair{ "basename": "asr-bindc3-91bce68", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc3.f90", "infile_hash": "5641a25203f2b4025ab042a931b5f7f5978dd812c10833abf34bfd73", "outfile": null, "outfile_hash": null, "stdout": "asr-bindc3-91bce68.stdout", "stdout_hash": "e5ee7c491f27a65db6d448ab23d2cc7e90a38db02af1f197873e2afa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kind_star_of_int-3ed778d.json0000664000175000017500000000075415227365530025007 0ustar alastairalastair{ "basename": "asr-kind_star_of_int-3ed778d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kind_star_of_int.f90", "infile_hash": "3abc16b6b262878a30ddb8a43eba007396a3a42b61d3c01340922b6b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-kind_star_of_int-3ed778d.stderr", "stderr_hash": "4b09ff95a79239ed54dc548fef6cdabe3d5d6ccd9a88854b2fd3218b", "returncode": 2 }lfortran-0.64.0/tests/reference/cpp-arrays_04_func-68b1437.json0000664000175000017500000000074715227365530024142 0ustar alastairalastair{ "basename": "cpp-arrays_04_func-68b1437", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/arrays_04_func.f90", "infile_hash": "50eb699e803e7dace8da286ee49cdb7381ebe3141bff17ca374f1f02", "outfile": null, "outfile_hash": null, "stdout": "cpp-arrays_04_func-68b1437.stdout", "stdout_hash": "ddd04aef52e2c4430edf290f5f858a0e2eb8b3739714f9bd7aeaa55a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_17-17c3d46.stdout0000664000175000017500000004615015227365530025127 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_17: (Program (SymbolTable 8 { sub_2: (ExternalSymbol 8 sub_2 6 sub_2 derived_types_17_module_2 [] sub_2 Public ) }) derived_types_17 [derived_types_17_module_2] [(SubroutineCall 8 sub_2 () [] () .false. )] ), derived_types_17_module_1: (Module (SymbolTable 2 { add: (Function (SymbolTable 4 { 1_t_1_num: (ExternalSymbol 4 1_t_1_num 3 num derived_types_17_module_1 [t_1] num Public ), self: (Variable 4 self [] ReturnVar () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 t_1 Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add (FunctionType [] (StructType [(Integer 4)] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (StructInstanceMember (Var 4 self) 4 1_t_1_num (Integer 4) () ) (IntegerBinOp (StructInstanceMember (Var 4 self) 4 1_t_1_num (Integer 4) () ) Add (StructInstanceMember (Var 4 self) 4 1_t_1_num (Integer 4) () ) (Integer 4) () ) () .false. .false. )] (Var 4 self) Public .true. .true. () ), subtract: (Function (SymbolTable 5 { 1_t_1_num: (ExternalSymbol 5 1_t_1_num 3 num derived_types_17_module_1 [t_1] num Public ), self: (Variable 5 self [] ReturnVar () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 t_1 Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) subtract (FunctionType [] (StructType [(Integer 4)] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (StructInstanceMember (Var 5 self) 5 1_t_1_num (Integer 4) () ) (IntegerBinOp (StructInstanceMember (Var 5 self) 5 1_t_1_num (Integer 4) () ) Mul (StructInstanceMember (Var 5 self) 5 1_t_1_num (Integer 4) () ) (Integer 4) () ) () .false. .false. )] (Var 5 self) Public .true. .true. () ), t_1: (Struct (SymbolTable 3 { num: (Variable 3 num [] Local (IntegerConstant 100 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) t_1 (StructType [(Integer 4)] [] .true. .false. ) [] [num] [] Source Private .false. .false. .false. [] () () [] ) }) derived_types_17_module_1 () [] .false. .false. .false. ), derived_types_17_module_2: (Module (SymbolTable 6 { add: (ExternalSymbol 6 add 2 add derived_types_17_module_1 [] add Public ), sub_2: (Function (SymbolTable 7 { }) sub_2 (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(FunctionCall 6 subtract () [] (StructType [(Integer 4)] [] .true. .false. ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(FunctionCall 6 add () [] (StructType [(Integer 4)] [] .true. .false. ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), subtract: (ExternalSymbol 6 subtract 2 subtract derived_types_17_module_1 [] subtract Public ) }) derived_types_17_module_2 () [derived_types_17_module_1] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-float1-817e0db.stderr0000664000175000017500000000021415227365530023167 0ustar alastairalastairsemantic error: Argument of intrinsic must be an integer --> tests/errors/float1.f90:3:10 | 3 | print *, float(y) | ^^^^^^^^ lfortran-0.64.0/tests/reference/asr-intrinsics9-4da86d0.stderr0000664000175000017500000000026515227365530024265 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Iand must be the same --> tests/errors/intrinsics9.f90:4:14 | 4 | print *, iand(x, y) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/fortran-coarray_collectives_01-4fd95fc.f900000664000175000017500000001275415227365530026424 0ustar alastairalastairtype :: __module_prif_prif_dummy_team_descriptor end type __module_prif_prif_dummy_team_descriptor type :: __module_prif_prif_team_type type(__module_prif_prif_dummy_team_descriptor), pointer :: info end type __module_prif_prif_team_type type :: prif_coarray_handle type(c_ptr) :: info end type prif_coarray_handle program coarray_collectives_01 implicit none integer(4) :: me integer(4) :: n_images integer(4) :: stat character(len=2, kind=1), save :: str = "hi" integer(4) :: val call __module_prif_prif_init(stat) call __module_prif_prif_sync_all() me = lcompilers_prif_this_image() n_images = lcompilers_prif_num_images() call __module_prif_prif_sync_all() val = me call __module_prif_prif_co_sum(val) call __module_prif_prif_co_max(val) call __module_prif_prif_co_min(val) call __module_prif_prif_co_max_character(str) call __module_prif_prif_co_min_character(str) call __module_prif_prif_co_broadcast(val, 1) call __module_prif_prif_sync_all() call __module_prif_prif_stop(.false.) contains interface subroutine __module_prif_prif_co_broadcast(a, source_image, stat, errmsg, errmsg_alloc) type(*), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in) :: source_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_broadcast end interface interface subroutine __module_prif_prif_co_max(a, result_image, stat, errmsg, errmsg_alloc) type(*), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), optional :: result_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_max end interface interface subroutine __module_prif_prif_co_max_character(a, result_image, stat, errmsg, errmsg_alloc) character(len=*, kind=1), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), optional :: result_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_max_character end interface interface subroutine __module_prif_prif_co_min(a, result_image, stat, errmsg, errmsg_alloc) type(*), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), optional :: result_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_min end interface interface subroutine __module_prif_prif_co_min_character(a, result_image, stat, errmsg, errmsg_alloc) character(len=*, kind=1), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), optional :: result_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_min_character end interface interface subroutine __module_prif_prif_co_sum(a, result_image, stat, errmsg, errmsg_alloc) type(*), dimension(..), intent(inout), target :: a character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(in), optional :: result_image integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_co_sum end interface interface subroutine __module_prif_prif_init(exit_code) integer(4), intent(out) :: exit_code end subroutine __module_prif_prif_init end interface interface subroutine __module_prif_prif_num_images(num_images) integer(4), intent(out) :: num_images end subroutine __module_prif_prif_num_images end interface interface subroutine __module_prif_prif_stop(quiet, stop_code_int, stop_code_char) logical(1), intent(in), value :: quiet character(len=*, kind=1), intent(in), optional, value :: stop_code_char integer(4), intent(in), optional, value :: stop_code_int end subroutine __module_prif_prif_stop end interface interface subroutine __module_prif_prif_sync_all(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_all end interface interface subroutine __module_prif_prif_this_image_no_coarray(team, this_image) type(__module_prif_prif_team_type), intent(in), optional :: team integer(4), intent(out) :: this_image end subroutine __module_prif_prif_this_image_no_coarray end interface integer(4) function lcompilers_prif_num_images() call __module_prif_prif_num_images(lcompilers_prif_num_images) end function lcompilers_prif_num_images integer(4) function lcompilers_prif_this_image() call __module_prif_prif_this_image_no_coarray(lcompilers_prif_this_image) end function lcompilers_prif_this_image end program coarray_collectives_01 lfortran-0.64.0/tests/reference/llvm-nested_06-fa1a99f.json0000664000175000017500000000075015227365530023516 0ustar alastairalastair{ "basename": "llvm-nested_06-fa1a99f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_06.f90", "infile_hash": "b94500b7f8becc154e61ec7d99e50e8c4cbbd4c0ca20bb262a670562", "outfile": null, "outfile_hash": null, "stdout": "llvm-nested_06-fa1a99f.stdout", "stdout_hash": "c4afe3527c18e0af0c9f276cc0fe8a9d477864773ec222c8217fd6f6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-optional_01-56b1b65.stdout0000664000175000017500000001161715227365530024076 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { optmod: (Module (SymbolTable 2 { optional_argument: (Function (SymbolTable 3 { name: (Variable 3 name [] In () () Default (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) optional_argument (FunctionType [(String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 name)] [(If () (IntrinsicElementalFunction Present [(Var 3 name)] 0 (Logical 4) () ) [(Print (IntrinsicElementalFunction StringConcat [(StringConstant "Hello " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 3 name)] 0 (String 1 (IntegerConstant 16 (Integer 8) Decimal) ExpressionLength DescriptorString) () ) )] [(Print (StringConstant "Hello world!" (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] )] () Public .false. .false. () ) }) optmod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form_without_newline-d50219b.json0000664000175000017500000000101615227365530027014 0ustar alastairalastair{ "basename": "ast-fixed_form_without_newline-d50219b", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_without_newline.f", "infile_hash": "55ed393261e352904304d4b561daa9acd2e4e713f6ea4ebcc20d39cd", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form_without_newline-d50219b.stdout", "stdout_hash": "78334f346126e16891ab514171e49249fd443692e7cdf5ad4431e6fc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-block1-ff0f95d.stdout0000664000175000017500000000464715227365530023304 0ustar alastairalastair(TranslationUnit [(Program block1 (TriviaNode [] [(EndOfLine) (Comment "! The variable B is implicitly declared in the scoping unit of the main program." ) (Comment "! The statement IMPORT, NONE makes B inaccessible in the BLOCK construct." ) (Comment "! If the IMPORT, NONE statement is replaced with the IMPORT statement in the" ) (Comment "! comment, the program is conformant." )] ) [] [(Implicit [(ImplicitSpec (AttrType TypeInteger [] () () None ) [(LetterSpec a z )] )] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(B [] [] () () None ())] (TriviaNode [] [(EndOfLine) (Comment "! TODO: Fix this test case" )] ) )] [(Block 0 () [] [] [] [(Assignment 0 B 10 () ) (Print 0 () [B] () ) (If 0 () (== B 10) [(Print 0 () [(String "pass" ())] () )] [] () () () )] (TriviaNode [] [(EndOfLine) (Comment "! use mod, only: example" ) (Comment "! import, none" ) (Comment "! !import, only: B" )] ) () )] [] )] ) lfortran-0.64.0/tests/reference/asr-functions_04-ea50b75.stdout0000664000175000017500000002634715227365530024350 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_04: (Program (SymbolTable 4 { int: (Variable 4 int [] Local (IntegerConstant 4 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), to_negative: (ExternalSymbol 4 to_negative 2 to_negative stdlib_int [] to_negative Public ), to_negative@to_negative~genericprocedure: (ExternalSymbol 4 to_negative@to_negative~genericprocedure 2 to_negative~genericprocedure stdlib_int [] to_negative~genericprocedure Private ), to_negative~genericprocedure: (ExternalSymbol 4 to_negative~genericprocedure 2 to_negative~genericprocedure stdlib_int [] to_negative~genericprocedure Public ) }) functions_04 [stdlib_int] [(If () (IntegerCompare (FunctionCall 4 to_negative@to_negative~genericprocedure 4 to_negative [((Var 4 int))] (Integer 4) () () ) NotEq (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 4 int) (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) () .false. .false. ) (If () (IntegerCompare (FunctionCall 4 to_negative@to_negative~genericprocedure 4 to_negative [((Var 4 int))] (Integer 4) () () ) NotEq (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (Logical 4) () ) [(ErrorStop () )] [] )] ), stdlib_int: (Module (SymbolTable 2 { to_negative: (GenericProcedure 2 to_negative [2 to_negative~genericprocedure] Public ), to_negative~genericprocedure: (Function (SymbolTable 3 { int: (Variable 3 int [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), neg_int: (Variable 3 neg_int [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) to_negative~genericprocedure (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 int)] [(If () (IntegerCompare (Var 3 int) GtE (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 3 neg_int) (IntegerUnaryMinus (Var 3 int) (Integer 4) () ) () .false. .false. )] [(Assignment (Var 3 neg_int) (Var 3 int) () .false. .false. )] )] (Var 3 neg_int) Public .true. .true. () ) }) stdlib_int () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-array_01-6a86c32.stderr0000664000175000017500000000016515227365530023346 0ustar alastairalastairsemantic error: Empty array constructor is not allowed --> tests/errors/array_01.f90:5:5 | 5 | a = [] | ^^ lfortran-0.64.0/tests/reference/asr-intent_01-c1f267a.stdout0000664000175000017500000004154615227365530023635 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { dflt_intent: (Module (SymbolTable 2 { foo: (Function (SymbolTable 3 { c: (Variable 3 c [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 3 d [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 3 e [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 4 { f: (Variable 4 f [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 x)] [(Assignment (Var 4 f) (RealBinOp (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) Mul (Var 4 x) (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 4 f)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] (Var 4 f) Public .false. .false. () ), g: (Variable 3 g [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) foo (FunctionType [(Real 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 c) (Var 3 d)] [(Assignment (Var 3 e) (FunctionCall 3 f () [((Var 3 c))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 3 g) (FunctionCall 3 f () [((Var 3 d))] (Real 4) () () ) () .false. .false. )] () Public .true. .true. () ) }) dflt_intent () [dflt_intent] .false. .false. .false. ), main: (Program (SymbolTable 5 { foo: (ExternalSymbol 5 foo 2 foo dflt_intent [] foo Public ) }) main [dflt_intent] [(SubroutineCall 5 foo () [((RealConstant 0.000000 (Real 4) )) ((RealConstant 2.000000 (Real 4) ))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-expr6-914a051.stdout0000664000175000017500000000117615227365530023113 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define float @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i32, align 4 %__lfortran_evaluate_12 = alloca float, align 4 store i32 8, i32* %__lfortran_evaluate_11, align 4 store float 0x4015333340000000, float* %__lfortran_evaluate_12, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return %0 = load float, float* %__lfortran_evaluate_12, align 4 ret float %0 } lfortran-0.64.0/tests/reference/asr-functions_07-2d29eab.stdout0000664000175000017500000005411115227365530024421 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_07: (Program (SymbolTable 8 { f_a: (ExternalSymbol 8 f_a 2 f_a functions_07_a [] f_a Public ), f_b: (ExternalSymbol 8 f_b 4 f_b functions_07_b [] f_b Public ), f_c: (ExternalSymbol 8 f_c 6 f_c functions_07_c [] f_c Public ), p: (Variable 8 p [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), q: (Variable 8 q [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) functions_07 [functions_07_c functions_07_a functions_07_b] [(Assignment (Var 8 q) (FunctionCall 8 f_c () [((Var 8 p))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 8 q)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), functions_07_a: (Module (SymbolTable 2 { f_a: (Function (SymbolTable 3 { u: (Variable 3 u [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 3 v [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f_a (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 u)] [(Assignment (Var 3 v) (RealBinOp (Var 3 u) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. )] (Var 3 v) Public .true. .true. () ) }) functions_07_a () [] .false. .false. .false. ), functions_07_b: (Module (SymbolTable 4 { f_a: (ExternalSymbol 4 f_a 2 f_a functions_07_a [] f_a Public ), f_b: (Function (SymbolTable 5 { x: (Variable 5 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f_b (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 x)] [(Assignment (Var 5 y) (RealBinOp (FunctionCall 4 f_a () [((Var 5 x))] (Real 4) () () ) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. )] (Var 5 y) Public .true. .true. () ) }) functions_07_b () [functions_07_a] .false. .false. .false. ), functions_07_c: (Module (SymbolTable 6 { f_a: (ExternalSymbol 6 f_a 2 f_a functions_07_a [] f_a Public ), f_b: (ExternalSymbol 6 f_b 4 f_b functions_07_b [] f_b Public ), f_c: (Function (SymbolTable 7 { w: (Variable 7 w [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 7 z [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f_c (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 w)] [(Assignment (Var 7 z) (RealBinOp (FunctionCall 6 f_b () [((Var 7 w))] (Real 4) () () ) Add (RealConstant 1.000000 (Real 4) ) (Real 4) () ) () .false. .false. )] (Var 7 z) Public .true. .true. () ) }) functions_07_c () [functions_07_b functions_07_a] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_add_03-43a00f9.json0000664000175000017500000000076715227365530024325 0ustar alastairalastair{ "basename": "asr-template_add_03-43a00f9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_add_03.f90", "infile_hash": "ea28185a5bc40e72bf2bb2f76bb2de4072cd321390f02993ae27aafe", "outfile": null, "outfile_hash": null, "stdout": "asr-template_add_03-43a00f9.stdout", "stdout_hash": "0e1779b43d3dbb0c9d3e28668dade45608af9bd682a36e5f1bd99fae", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-types_03-ce710b0.stdout0000664000175000017500000001047515227365530023654 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %r = alloca float, align 4 store float 1.500000e+00, float* %r, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* %r) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry %14 = load float, float* %r, align 4 %15 = fptosi float %14 to i32 store i32 %15, i32* %i, align 4 %16 = alloca i64, align 8 %17 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %16, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i) %18 = load i64, i64* %16, align 8 %19 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %17, i8** %19, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %18, i64* %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %22 = load i8*, i8** %21, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %24 = load i64, i64* %23, align 8 %25 = trunc i64 %24 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %22, i32 %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %26 = icmp eq i8* %17, null br i1 %26, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %17) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_types_03 FINALIZE_SYMTABLE_types_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-block2-b06d9e1.json0000664000175000017500000000070715227365530022632 0ustar alastairalastair{ "basename": "asr-block2-b06d9e1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/block2.f90", "infile_hash": "f226e55b99771ba4b72596b4730aff7cc4a90424918f2b71111d33f1", "outfile": null, "outfile_hash": null, "stdout": "asr-block2-b06d9e1.stdout", "stdout_hash": "c740e0a7b364cd26b4d90585ce8c50f78e361fb53e7044c006915f70", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-stop1-c0d0295.json0000664000175000017500000000071715227365530023121 0ustar alastairalastair{ "basename": "ast_f90-stop1-c0d0295", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/stop1.f90", "infile_hash": "356601f3f1d56abfa1b7d00130c2067cbf3d450b3c563a900ff9ccd5", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-stop1-c0d0295.stdout", "stdout_hash": "f568222ca169cc7ad40eb4b3564c08a3d4ba845e0a5a141d4f0dcd3d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bits_03-c7d2024.json0000664000175000017500000000073715227365530022637 0ustar alastairalastair{ "basename": "asr-bits_03-c7d2024", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bits_03.f90", "infile_hash": "cc34aad3be3fdea9a5462e9abfa5bdcfb6450d87092552dd633e7d63", "outfile": null, "outfile_hash": null, "stdout": "asr-bits_03-c7d2024.stdout", "stdout_hash": "3daaa70f06a8062055e9322c3fc22fc5f216784fc25930261a3fd70c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-cpp8-edc2b52.json0000664000175000017500000000074415227365530024652 0ustar alastairalastair{ "basename": "asr_preprocess-cpp8-edc2b52", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp8.f90", "infile_hash": "32cafa9cd5fee5b62915c116621f50932e4919a8929d18bf2d3c2913", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp8-edc2b52.stderr", "stderr_hash": "875cf3a037baf0520e8c8717c94b01e43f292a714725f9e4d09ff361", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-cmplx_03-6426707.json0000664000175000017500000000072415227365530022667 0ustar alastairalastair{ "basename": "asr-cmplx_03-6426707", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cmplx_03.f90", "infile_hash": "d3add6413f1936fbc8aed9a556247c1daceec2a468a4982648661973", "outfile": null, "outfile_hash": null, "stdout": "asr-cmplx_03-6426707.stdout", "stdout_hash": "df07bedff9fa5da2fedf067ac6c9fc6aae760e9d4947c5da87f9f891", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-modules_11-bb73359.json0000664000175000017500000000074115227365530023670 0ustar alastairalastair{ "basename": "julia-modules_11-bb73359", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/modules_11.f90", "infile_hash": "f19a5ba8d01ebaae3da78891afbae58462d711a364274aa3a5569fa1", "outfile": null, "outfile_hash": null, "stdout": "julia-modules_11-bb73359.stdout", "stdout_hash": "8f436714f9e8658e37c0d13431659a4b867a02ef2b2979d6a2aed8dc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-defop1-f87dd80.stdout0000664000175000017500000000337315227365530023223 0ustar alastairalastair(TranslationUnit [(Program defop1 (TriviaNode [(EndOfLine) (Comment "! Tests for syntax (AST) only:" )] [] ) [] [] [] [(Assignment 0 e (DefBinOp a "in" b ) () ) (Assignment 0 E (DefBinOp A "IN" B ) () ) (Assignment 0 e (DefBinOp s [(b [])] "op" (** 3 4) ) () ) (Assignment 0 E (DefBinOp S [(B [])] "OP" (** 3 4) ) () ) (Assignment 0 e (DefBinOp (+ a b) "x" (** y x) ) () ) (Assignment 0 e (DefBinOp (** x x) "x" (** x x) ) () ) (Assignment 0 E (DefBinOp (** X X) "X" (** X X) ) () ) (Assignment 0 e (** (DefBinOp (DefBinOp x "x" x ) "in" 3 ) 4) () )] [] )] ) lfortran-0.64.0/tests/reference/ast-critical1-98f603a.stdout0000664000175000017500000001241215227365530023626 0ustar alastairalastair(TranslationUnit [(Program critical1 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(joblist [] [(() () CodimensionStar)] () () None ()) (job [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(IntegerSample [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(() 50 Value)] () () None ) [] [(Sample [] [] () () None ())] () )] [(If 0 () (== (FuncCallOrArray this_image [] [] [] [] [] ) 1) [(Read 0 () [(()) (())] [] [joblist] () )] [] () () () ) (SyncAll 0 [] () ) (DoLoop 0 () 0 () () () () [(Critical 0 () [] [(Assignment 0 job (CoarrayRef joblist [] [] [] [(() 1 () CodimensionExpr)] [] ) () ) (Assignment 0 (CoarrayRef joblist [] [] [] [(() 1 () CodimensionExpr)] [] ) (- job 1) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! >>>>>>>> Syntax check(AST) >>>>>>>>" )] ) ) (Critical 0 () [] [(Assignment 0 IntegerSample 0 () )] () () ) (Critical 0 () [(AttrStat IntegerSample )] [(Assignment 0 Sample (String "Error message" ()) () )] () () ) (Critical 0 () [(AttrErrmsg Sample )] [(Assignment 0 Sample (String "Error message" ()) () )] () (TriviaNode [] [(EndOfLine) (Comment "! <<<<<<<< Syntax check(AST) <<<<<<<<" ) (EndOfLine)] ) ) (If 0 () (> job 0) [(Assignment 0 b (+ (** a 2) (** b 2)) () )] [(Exit 0 () () )] () () () )] () () ) (SyncAll 0 [] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-incorrect_array_type_where_02-b821d8c.json0000664000175000017500000000102315227365530027371 0ustar alastairalastair{ "basename": "asr-incorrect_array_type_where_02-b821d8c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_array_type_where_02.f90", "infile_hash": "5668cc071e9f55f2ce6475dee614a22d075cea9d84e433197a7f0ac5", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_array_type_where_02-b821d8c.stderr", "stderr_hash": "283fe1c585d134850afe27d9f5cdaa5c07ffcfe890b4bb815dfdbf78", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-nested_06-fa1a99f.stdout0000664000175000017500000001355315227365530024074 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__b__x = global float 0.000000e+00 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [3 x i8] c"b()" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data, i32 0, i32 0), i64 3 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_nested_06_a_b(float* %x) { .entry: %0 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %0, i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %1 = load float, float* %x, align 4 store float %1, float* @__module___lcompilers_created__nested_context__b__x, align 4 call void @b.__module_nested_06_a_c() %2 = load float, float* @__module___lcompilers_created__nested_context__b__x, align 4 store float %2, float* %x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_b FINALIZE_SYMTABLE_b: ; preds = %return ret void } define void @b.__module_nested_06_a_c() { .entry: %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = alloca i32, align 4 store i32 5, i32* %2, align 4 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %2) %4 = load i64, i64* %1, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry %13 = alloca i64, align 8 %14 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %13, i32 0, i32 0, i32 0, i32 0, i32 0, float* @__module___lcompilers_created__nested_context__b__x) %15 = load i64, i64* %13, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %14, i8** %16, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %15, i64* %17, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %19 = load i8*, i8** %18, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %21 = load i64, i64* %20, align 8 %22 = trunc i64 %21 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %19, i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %23 = icmp eq i8* %14, null br i1 %23, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %14) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done br label %return return: ; preds = %free_done3 br label %FINALIZE_SYMTABLE_c FINALIZE_SYMTABLE_c: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value = alloca float, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store float 6.000000e+00, float* %call_arg_value, align 4 call void @__module_nested_06_a_b(float* %call_arg_value) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_nested_06 FINALIZE_SYMTABLE_nested_06: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-template_array_02-85b6b2e.json0000664000175000017500000000077515227365530025000 0ustar alastairalastair{ "basename": "asr-template_array_02-85b6b2e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_array_02.f90", "infile_hash": "cf1525abcafcfb764aa16e653d8b360adbfaa355edeac751105feacf", "outfile": null, "outfile_hash": null, "stdout": "asr-template_array_02-85b6b2e.stdout", "stdout_hash": "aadc0ec013902bb7a647c8be193d2d374790f2d3e5f395375e0d1ec7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-Subroutine_Call1-8e53e13.json0000664000175000017500000000074515227365530024560 0ustar alastairalastair{ "basename": "ast-Subroutine_Call1-8e53e13", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/Subroutine_Call1.f90", "infile_hash": "bf7f51f810752b3f8e9381f1e100d0c9b3495c2f87cd120a6ee74148", "outfile": null, "outfile_hash": null, "stdout": "ast-Subroutine_Call1-8e53e13.stdout", "stdout_hash": "446f51993aaa4b3c0d0828e480f1da21aecded12c5e634fb90b64bad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bits_02-e48c6d3.json0000664000175000017500000000073715227365530022731 0ustar alastairalastair{ "basename": "asr-bits_02-e48c6d3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bits_02.f90", "infile_hash": "326043189040d63a64dac0f62cb9504336196a58ad139ffe70eeb884", "outfile": null, "outfile_hash": null, "stdout": "asr-bits_02-e48c6d3.stdout", "stdout_hash": "dd073c9b055504e6957fe3c8d48e13efc2324264e820ed6c3395211e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-print1-a173a20.stdout0000664000175000017500000000021315227365530023620 0ustar alastairalastairprogram print1 implicit none real :: pi pi = 3.141592 print "(f6.3)", pi print *, pi print 10 10 format(3x, "print") end program print1 lfortran-0.64.0/tests/reference/pass_dead_code_removal-case_06-e7f007f.json0000664000175000017500000000103615227365530026553 0ustar alastairalastair{ "basename": "pass_dead_code_removal-case_06-e7f007f", "cmd": "lfortran --pass=dead_code_removal --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_06.f90", "infile_hash": "3987983e4c8d162530bceffbbce0bd7d038b1f794655c222c47ad714", "outfile": null, "outfile_hash": null, "stdout": "pass_dead_code_removal-case_06-e7f007f.stdout", "stdout_hash": "d85212f700233c019963b383e52708f93ce2fa9ce1109e9f492e0499", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-format_02-1ba2faf.stdout0000664000175000017500000000207315227365530023750 0ustar alastairalastair(TranslationUnit [(Program format_02 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i6 [] [] () () None ()) (format [(1 3 DimensionExpr)] [] () () None ())] () )] [(Assignment 0 i6 2 () ) (Assignment 0 (FuncCallOrArray format [] [(() i6 () 0)] [] [] [] ) 3 () ) (Format 1 "i6" () )] [] )] ) lfortran-0.64.0/tests/reference/asr-kind_invalid_int_of_logical-6bf4989.stderr0000664000175000017500000000023515227365530027430 0ustar alastairalastairsemantic error: Kind 10 is not supported for Logical --> tests/errors/kind_invalid_int_of_logical.f90:3:13 | 3 | logical(10) :: x | ^^ lfortran-0.64.0/tests/reference/asr-do_loop_01-3b6a582.stderr0000664000175000017500000000021115227365530023651 0ustar alastairalastairsemantic error: Assignment to loop variable `i` is not allowed --> tests/errors/do_loop_01.f90:7:7 | 7 | i = j + 1 | ^ lfortran-0.64.0/tests/reference/ast-assign-262a444.json0000664000175000017500000000070715227365530022600 0ustar alastairalastair{ "basename": "ast-assign-262a444", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/assign.f90", "infile_hash": "67fee149907196a73ab4db43412dfbf29304c02aa5f1ce2da476423e", "outfile": null, "outfile_hash": null, "stdout": "ast-assign-262a444.stdout", "stdout_hash": "7834f54e99990470c7a931169941a9378eba8a918ffe30f18a5bab50", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-subroutines_02-83f1d9f.json0000664000175000017500000000076715227365530024546 0ustar alastairalastair{ "basename": "llvm-subroutines_02-83f1d9f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_02.f90", "infile_hash": "0da20d4528bff96e6ec7497805bf54f1744384b5ab8de197c3e75432", "outfile": null, "outfile_hash": null, "stdout": "llvm-subroutines_02-83f1d9f.stdout", "stdout_hash": "6b9b7cebc6c92c554cc4d835292472e8756a900e73ec1203eb54202e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array3-7b1ab3b.json0000664000175000017500000000070715227365530022726 0ustar alastairalastair{ "basename": "asr-array3-7b1ab3b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array3.f90", "infile_hash": "047ac01d7e3df52429d6889258f37213048937dae8611af6cbd9ecae", "outfile": null, "outfile_hash": null, "stdout": "asr-array3-7b1ab3b.stdout", "stdout_hash": "2ca9c9cd5a5615d49ab3d4584f7930af913115471204e304b3e16f2f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_where-where_01-94e4416.stdout0000664000175000017500000007312415227365530024665 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { where_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) where_01 [] [(Assignment (Var 2 a) (ArrayBroadcast (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [-2, -2, -2, ...., -2, -2, -2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 8 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 b) (ArrayBroadcast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [-3, -3, -3, ...., -3, -3, -3] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (If () (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (If () (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (If () (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) ()) [(If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 6 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (Print (StringFormat () [(Var 2 b)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-print2-785df93.stdout0000664000175000017500000000011715227365530023657 0ustar alastairalastairprogram print2 print "(es11.5,3x " // "es11.5)", 1.d0, 2.d0 end program print2 lfortran-0.64.0/tests/reference/ast-allocate_01-ce7628b.stdout0000664000175000017500000000505315227365530024122 0ustar alastairalastair(TranslationUnit [(Program hello () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeCharacter [(() () Colon)] () () None ) [(SimpleAttribute AttrAllocatable )] [(cmd [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(cmdlen [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(ierr [] [] () () None ())] () )] [(SubroutineCall 0 get_command [] [] [(length cmdlen)] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (If 0 () (> cmdlen 0) [(Allocate 0 [((FuncCallOrArray character [] [(() cmdlen () 0)] [] [] [] ) () cmd 0)] [] () ) (SubroutineCall 0 get_command [] [(() cmd () 0)] [] [] () ) (Print 0 () [(String "hello " ()) cmd] () )] [] () () () ) (Deallocate 0 [(() cmd () 0)] [(stat ierr)] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-dim_assgn_test-2643606.stderr0000664000175000017500000000073315227365530024572 0ustar alastairalastairwarning: Dimensions are specified twice --> tests/warnings/dim_assgn_test.f90:2:19 | 2 | integer, private, dimension(2,2) :: a(2,2) | ^^^^^^^^^^^^^^ ^^^^^^ help: consider specifying it just one way or the other warning: Dimensions are specified twice --> tests/warnings/dim_assgn_test.f90:3:19 | 3 | integer, private, dimension(2,2) :: b(2,3) | ^^^^^^^^^^^^^^ ^^^^^^ help: consider specifying it just one way or the other lfortran-0.64.0/tests/reference/llvm-logical4-b4e6b33.json0000664000175000017500000000074515227365530023341 0ustar alastairalastair{ "basename": "llvm-logical4-b4e6b33", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/logical4.f90", "infile_hash": "ea18762e8bbd163cb8b30960c719f953e2dfae041020c2f1066b3a35", "outfile": null, "outfile_hash": null, "stdout": "llvm-logical4-b4e6b33.stdout", "stdout_hash": "9e730c767c7f4fc34113e53abef510521ba89f79afa835a1b0699bfa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-modules_06-03c75b2.json0000664000175000017500000000075315227365530023534 0ustar alastairalastair{ "basename": "llvm-modules_06-03c75b2", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_06.f90", "infile_hash": "ffed6acf9a41c361cf70e0d7be27fb220ad99d98ab607fce09d93992", "outfile": null, "outfile_hash": null, "stdout": "llvm-modules_06-03c75b2.stdout", "stdout_hash": "ec5c9e7b0e7118ce4db9231b8ae99b6178b83add3e4d9cfb2fb7c89b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-enum_01-3bcfd6d.f900000664000175000017500000000077015227365530023376 0ustar alastairalastairprogram enum_01 implicit none enum, bind(c) enumerator :: blue = 3 enumerator :: red = 0 enumerator :: yellow = 4 end enum enum, bind(c) enumerator :: green = 10 enumerator :: purple = 11 end enum integer(4), parameter :: compiler_enum = Kind(red) if (red /= 0) then error stop end if if (blue /= 3) then error stop end if if (yellow /= 4) then error stop end if if (green /= 10) then error stop end if if (purple /= 11) then error stop end if end program enum_01 lfortran-0.64.0/tests/reference/asr-array_size_04-dcfa313.stderr0000664000175000017500000000032015227365530024524 0ustar alastairalastairsemantic error: Unrecognized keyword argument kind1 passed to size intrinsic. --> tests/errors/array_size_04.f90:5:14 | 5 | size_a = size(a, kind1=4, dim1=1) | ^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-max_01-415ceb0.stdout0000664000175000017500000000737415227365530023114 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { max_01: (Program (SymbolTable 2 { y: (Variable 2 y [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) max_01 [] [(Assignment (Var 2 y) (RealConstant 5.200000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 z) (RealConstant 9.000000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(IntrinsicElementalFunction Max [(Var 2 y) (Cast (Var 2 z) RealToReal (Real 8) () () )] 0 (Real 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/julia-subroutine6-f8dae3a.json0000664000175000017500000000071715227365530024424 0ustar alastairalastair{ "basename": "julia-subroutine6-f8dae3a", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/subroutine6.f90", "infile_hash": "1987bc648e7f4c6205190248a296d000e0f33cb57a996b6c2a6c4804", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutine6-f8dae3a.stdout", "stdout_hash": "67b45ec73b3f8ce1841dcbe0d123749cbd83278d65ab2b7d5da24430", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-empty-cb5d1b4.json0000664000175000017500000000070715227365530023053 0ustar alastairalastair{ "basename": "llvm-empty-cb5d1b4", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/empty.f90", "infile_hash": "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", "outfile": null, "outfile_hash": null, "stdout": "llvm-empty-cb5d1b4.stdout", "stdout_hash": "a146b393d2e0f35cf565405c5e6092f8b905119fa2d30272983cb44e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-ichar_01-a5284c8.json0000664000175000017500000000072415227365530022767 0ustar alastairalastair{ "basename": "asr-ichar_01-a5284c8", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/ichar_01.f90", "infile_hash": "96e818fc8837a0604686a6414be1828c77eef5189d2cece2e0d130d9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-ichar_01-a5284c8.stderr", "stderr_hash": "acd2bd0eb673fed1e139af2f060958c180fba50a2fa022469790cb0e", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-string_03-fc56745.json0000664000175000017500000000074515227365530023223 0ustar alastairalastair{ "basename": "ast-string_03-fc56745", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_03.f90", "infile_hash": "7815b8703dfd3a1c61cab40604e20693508878e8a90e450834ce592b", "outfile": null, "outfile_hash": null, "stdout": "ast-string_03-fc56745.stdout", "stdout_hash": "79fe0a00170474e0c40801f0d1861cf26afdfed4f29658e0a6075ee2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incompatible_rank_assign-a69f7b4.json0000664000175000017500000000100415227365530026502 0ustar alastairalastair{ "basename": "asr-incompatible_rank_assign-a69f7b4", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incompatible_rank_assign.f90", "infile_hash": "0e650e977c4ce7ce00bc5318fc2f65dcd9689f91a8fdd7e5d8cb1007", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incompatible_rank_assign-a69f7b4.stderr", "stderr_hash": "9f94b6c9d177478d0f450c91caf1b034b7706eee4978a80630f36d7d", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-character_01-e8e453d.stderr0000664000175000017500000000051615227365530024251 0ustar alastairalastairwarning: The LHS character len=1 and the RHS character len=4 are not equal. --> tests/warnings/character_01.f90:3:5 | 3 | character(len=1, kind=1), parameter :: c_null_char = "ball" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing the RHS character len to match the LHS character len lfortran-0.64.0/tests/reference/run-print5-c57814b.stdout0000664000175000017500000000001015227365530023175 0ustar alastairalastairABCXYZ lfortran-0.64.0/tests/reference/ast_f90-critical1-30285fa.json0000664000175000017500000000073315227365530023726 0ustar alastairalastair{ "basename": "ast_f90-critical1-30285fa", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/critical1.f90", "infile_hash": "05948a8c6d4476986b19c2be2d0c40a9ebb19a2007eac02159ab9496", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-critical1-30285fa.stdout", "stdout_hash": "48974f54bfd4d0b18c37d27908777347b95b5905a24bb8b04ae0aaa9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-abort_01-7212a3d.stderr0000664000175000017500000000027115227365530023511 0ustar alastairalastairwarning: `abort` is an LFortran extension --> tests/../integration_tests/abort_01.f90:3:16 | 3 | if (.false.) call abort() | ^^^^^^^^^^^^ Use `error stop` instead lfortran-0.64.0/tests/reference/asr-intrinsics_open_close_read_write-a696eca.json0000664000175000017500000000105215227365530030334 0ustar alastairalastair{ "basename": "asr-intrinsics_open_close_read_write-a696eca", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_open_close_read_write.f90", "infile_hash": "8e24a004c0e3b808c25b3f9037daca1bd1f7581b98199f50f3404e2e", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_open_close_read_write-a696eca.stdout", "stdout_hash": "e79d19a7f50d9b4f7206d9cac5f93a25e42b1ba6ae1536d18d16fc1e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-operator_overloading_01-33c47db.json0000664000175000017500000000116115227365530026361 0ustar alastairalastair{ "basename": "llvm-operator_overloading_01-33c47db", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/operator_overloading_01.f90", "infile_hash": "f44f3172b4b5235b41deb5a4d4eaadc61a6b7c51e002a983889cf38f", "outfile": null, "outfile_hash": null, "stdout": "llvm-operator_overloading_01-33c47db.stdout", "stdout_hash": "ff3c78f3c1639b0a0d775c2ea732d6b53a99a8884a166c75e264c7e4", "stderr": "llvm-operator_overloading_01-33c47db.stderr", "stderr_hash": "bc887b577bc8ccfc15f212c070a67ee8c67af8d343abdd0132e6b6fb", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixedform_assignment-58b5a6f.json0000664000175000017500000000077415227365530025705 0ustar alastairalastair{ "basename": "ast-fixedform_assignment-58b5a6f", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_assignment.f", "infile_hash": "a5ce54b54cc0b1865c8561b13812ea8490888bb2807c4a7bddd5ba39", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_assignment-58b5a6f.stdout", "stdout_hash": "ebcb76376b470c899d2a26a11e4e649e9a3b30343bcb3be43053fd9f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/enable_disable_style_suggestion-style1-55a065c.stderr0000664000175000017500000000011315227365530030751 0ustar alastairalastairCannot use --no-style-suggestions and --style-suggestions at the same time lfortran-0.64.0/tests/reference/run-array_bounds_check_09-afed6c8.json0000664000175000017500000000074315227365530026000 0ustar alastairalastair{ "basename": "run-array_bounds_check_09-afed6c8", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_09.f90", "infile_hash": "a0763b8438157b6413dbda8eb34da783f57fcdb6f82be814b39f6a35", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_09-afed6c8.stderr", "stderr_hash": "a39767384e7aa938a9cee070458502f180e48eddeadb1e875a29e6bf", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-polymorphic_class_compare-e58def6.json0000664000175000017500000000102515227365530027004 0ustar alastairalastair{ "basename": "asr-polymorphic_class_compare-e58def6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/polymorphic_class_compare.f90", "infile_hash": "ed9ac85fcf47a406efa5f7672115ca698b4be28ba5c667c2371591fb", "outfile": null, "outfile_hash": null, "stdout": "asr-polymorphic_class_compare-e58def6.stdout", "stdout_hash": "d93c806fde984dd8befe67f234e4d10e2b4a66d236b9a7d8894f638e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-expr3-c9c0bd7.stdout0000664000175000017500000003175015227365530026106 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f2: (Variable 2 f2 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f3: (Variable 2 f3 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f4: (Variable 2 f4 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f5: (Variable 2 f5 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f6: (Variable 2 f6 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f7: (Variable 2 f7 [] Local () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f8: (Variable 2 f8 [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 f2) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f3) (IntegerBinOp (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) Mul (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 16 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f4) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Mul (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant 6 (Integer 4) Decimal) ) (Integer 4) (IntegerConstant 11 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f5) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Sub (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f6) (IntegerBinOp (IntegerConstant 4 (Integer 4) Decimal) Pow (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 64 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f7) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 f8) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) () .false. .false. )] (Var 2 f8) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-dependency_test_03-86dce2a.stdout0000664000175000017500000001516115227365530025570 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { m_cli2: (Module (SymbolTable 4 { check_commandline: (Function (SymbolTable 5 { default_help: (Function (SymbolTable 6 { ilength: (Variable 6 ilength [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) default_help (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(IntrinsicImpureSubroutine GetCommandArgument [(IntegerConstant 0 (Integer 4) Decimal) (Var 6 ilength)] 2 )] () Public .false. .false. () ) }) check_commandline (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(SubroutineCall 5 default_help () [] () .false. )] () Public .true. .true. () ) }) m_cli2 () [] .true. .false. .false. ), m_cli2_user: (Module (SymbolTable 2 { check_commandline: (ExternalSymbol 2 check_commandline 4 check_commandline m_cli2 [] check_commandline Public ) }) m_cli2_user () [m_cli2] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/pass_global_stmts-expr6-a926072.json0000664000175000017500000000076415227365530025320 0ustar alastairalastair{ "basename": "pass_global_stmts-expr6-a926072", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr6.f90", "infile_hash": "722af2f789e614d9acf6975aae8260e4949a360066d5aa53a3f05944", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-expr6-a926072.stdout", "stdout_hash": "e193590ceb1905470d7bd728a4e3257c1d212b7937757a954c8a1825", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-types_11-696c3ee.stdout0000664000175000017500000000264215227365530023510 0ustar alastairalastair(TranslationUnit [(Program types_11 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Enum [(AttrBind (Bind [c] [] ) )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(Declaration () [(SimpleAttribute AttrEnumerator )] [(a [] [] () 1 Equal ())] () ) (Declaration () [(SimpleAttribute AttrEnumerator )] [(b [] [] () 2 Equal ())] () ) (Declaration () [(SimpleAttribute AttrEnumerator )] [(c [] [] () 3 Equal ())] () )] )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-expr9-c1303f2.json0000664000175000017500000000071715227365530023115 0ustar alastairalastair{ "basename": "ast_f90-expr9-c1303f2", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/expr9.f90", "infile_hash": "72b98645e78d4c2860107f173940315443535270bca4d18d631ea006", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-expr9-c1303f2.stdout", "stdout_hash": "d6888988904544626c2adaff83ce70adc5f226e814b3c3ab8430eca7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-doloop_19-08eb1cf.json0000664000175000017500000000074515227365530023345 0ustar alastairalastair{ "basename": "ast-doloop_19-08eb1cf", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_19.f90", "infile_hash": "780ed4dd8cdb1d585c739619b6e0d88136ec21fc7c9ac78574421b23", "outfile": null, "outfile_hash": null, "stdout": "ast-doloop_19-08eb1cf.stdout", "stdout_hash": "30be67d399aa0357cd5e09cbeeb5677844657382d8fcde83eda5161c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-expr5-f0a7df6.stdout0000664000175000017500000000502315227365530023151 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { expr_05: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) expr_05 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (If () (IntegerCompare (Var 2 x) Eq (IntegerConstant 25 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-string_54-06ad64c.json0000664000175000017500000000075015227365530023454 0ustar alastairalastair{ "basename": "llvm-string_54-06ad64c", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/string_54.f90", "infile_hash": "ac362ebe23bff5072f61252724ef01399d95e4783cbf9330a49acf86", "outfile": null, "outfile_hash": null, "stdout": "llvm-string_54-06ad64c.stdout", "stdout_hash": "ade750df89e7948b2e534bc2b7e77dadd75ef27dc6d16379a5e38c86", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-case_01-49038b7.stdout0000664000175000017500000000240515227365530023102 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { int64_t i; int64_t out; i = 4; if (i == 1) { out = 10; std::cout<< "1"< tests/errors/scalar_allocation_check_07.f90:5:14 | 5 | call ss2(y) | ^ This is unallocated lfortran-0.64.0/tests/reference/ast-complex_02-0f52aa7.json0000664000175000017500000000075015227365530023421 0ustar alastairalastair{ "basename": "ast-complex_02-0f52aa7", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_02.f90", "infile_hash": "c5e28327787e2c4dd5e42cc1c527749eb2e7b7f27623222a118f3bbe", "outfile": null, "outfile_hash": null, "stdout": "ast-complex_02-0f52aa7.stdout", "stdout_hash": "f6bf1ebacd758b9b5d53183435894d2ac93b704c4a09a8a57a9995fc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-types_03-ce710b0.json0000664000175000017500000000074515227365530023302 0ustar alastairalastair{ "basename": "llvm-types_03-ce710b0", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/types_03.f90", "infile_hash": "388683b8609d91d174ceb8c24787c982bf1ea22d342e94d44457b861", "outfile": null, "outfile_hash": null, "stdout": "llvm-types_03-ce710b0.stdout", "stdout_hash": "0f20e3b48e9ff1094209149c10583d43238d7636ee64d884b02dc41b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-case_06-3550f46.stdout0000664000175000017500000000332615227365530023430 0ustar alastairalastairfunction main() local a::Int32 = 1 local ap::Int32 = 1 local b::Int32 = 2 local bp::Int32 = 2 local c::Float32 = 1.00000000000000000e+00 local cp::Float32 = 1.00000000000000000e+00 local d::Float32 = 2.00000000000000000e+00 local dp::Float32 = 2.00000000000000000e+00 local grade_fixed::String = "B" local marks::Int32 local marks_fixed::Int32 = 94 if grade_fixed == "A" println("Excellent!") elseif grade_fixed == "B" if a == b println("a == b") if ap == bp println("ap == bp") else println("ap /= bp") end else if Float32(ap) == cp println("ap == cp") if cp == dp println("cp == dp") else println("cp /= dp") end else if c == d println("c == d") end end end elseif grade_fixed == "C" println("Well done") elseif grade_fixed == "D" println("You passed") elseif grade_fixed == "F" println("Better try again") else println("Invalid grade") end println("Your grade is ", " ", grade_fixed) marks = 94 if marks ≥ 40 + bp println("Pass!") elseif marks ≤ 39 - ap println("Failed!") else println("Invalid marks") end println("Your marks are ", " ", marks) if marks_fixed ≥ 40 + bp println("Pass!") elseif 0 ≤ marks_fixed ≤ 39 - ap println("Failed!") else println("Invalid marks") end println("Your marks are ", " ", marks) end main() lfortran-0.64.0/tests/reference/ast-interface4-ad40742.stdout0000664000175000017500000001464115227365530023772 0ustar alastairalastair(TranslationUnit [(Module DOT (TriviaNode [(EndOfLine) (Comment "! Module for dot product of two real arrays of rank 1." ) (Comment "! The caller needs to ensure that exceptions do not cause halting." ) (Comment "! Source https://j3-fortran.org/doc/year/18/18-007r1.pdf" )] [] ) [(Use [(SimpleAttribute AttrIntrinsic )] IEEE_EXCEPTIONS [] .false. () )] [] [(Declaration (AttrType TypeLogical [] () () None ) [] [(MATRIX_ERROR [] [] () (Logical .false. ()) Equal ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Interface (InterfaceHeaderDefinedOperator "dot" ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [MULT] [(SimpleAttribute AttrModule )] () )] )] [] [(Function MULT [(A) (B)] [(AttrType TypeReal [] () () None )] () () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(A [(() () DimensionExpr)] [] () () None ()) (B [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(I [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(OVERFLOW [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(If 0 () (/= (FuncCallOrArray SIZE [] [(() A () 0)] [] [] [] ) (FuncCallOrArray SIZE [] [(() B () 0)] [] [] [] )) [(Assignment 0 MATRIX_ERROR (Logical .true. ()) () ) (Return 0 () () )] [] () () (TriviaNode [] [(EndOfLine) (Comment "! The processor ensures that IEEE_OVERFLOW is quiet." ) (EndOfLine)] ) ) (Assignment 0 MULT (Real "0.0") () ) (DoLoop 0 () 0 I 1 (FuncCallOrArray SIZE [] [(() A () 0)] [] [] [] ) () [(Assignment 0 MULT (+ MULT (* (FuncCallOrArray A [] [(() I () 0)] [] [] [] ) (FuncCallOrArray B [] [(() I () 0)] [] [] [] ))) () )] () () ) (SubroutineCall 0 IEEE_GET_FLAG [] [(() IEEE_OVERFLOW () 0) (() OVERFLOW () 0)] [] [] () ) (If 0 () OVERFLOW [(Assignment 0 MATRIX_ERROR (Logical .true. ()) () )] [] () () () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/asr-modules_31-cd9bfef.stdout0000664000175000017500000022472215227365530024237 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { fpm_cmd_update_modules_31: (Module (SymbolTable 4 { 1_dependency_config_t: (ExternalSymbol 4 1_dependency_config_t 9 dependency_config_t fpm_dependency_modules_31 [] dependency_config_t Public ), cmd_update: (Function (SymbolTable 7 { 1_dependency_config_t_name: (ExternalSymbol 7 1_dependency_config_t_name 10 name fpm_dependency_modules_31 [dependency_config_t] name Public ), 1_dependency_tree_t_dep: (ExternalSymbol 7 1_dependency_tree_t_dep 12 dep fpm_dependency_modules_31 [dependency_tree_t] dep Public ), 1_dependency_tree_t_update_dependency: (ExternalSymbol 7 1_dependency_tree_t_update_dependency 12 update_dependency fpm_dependency_modules_31 [dependency_tree_t] update_dependency Public ), 1_update: (ExternalSymbol 7 1_update 12 update dependency_tree_t [] update Private ), deps: (Variable 7 deps [] Local () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 4 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), error: (Variable 7 error [] Local () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 4 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ii: (Variable 7 ii [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), settings: (Variable 7 settings [] In () () Default (StructType [(Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) (Logical 4) (Logical 4)] [] .true. .false. ) 4 fpm_update_settings Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cmd_update (FunctionType [(StructType [(Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) (Logical 4) (Logical 4)] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 settings)] [(SubroutineCall 7 1_dependency_tree_t_update_dependency 7 1_update [((Var 7 deps)) ((StructInstanceMember (ArrayItem (StructInstanceMember (Var 7 deps) 7 1_dependency_tree_t_dep (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) () ) [(() (Var 7 ii) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) ColMajor () ) 7 1_dependency_config_t_name (Allocatable (String 1 () DeferredLength DescriptorString) ) () )) ((Var 7 error))] (Var 7 deps) .false. )] () Public .true. .true. () ), dependency_tree_t: (ExternalSymbol 4 dependency_tree_t 9 dependency_tree_t fpm_dependency_modules_31 [] dependency_tree_t Public ), error_t: (ExternalSymbol 4 error_t 9 error_t fpm_dependency_modules_31 [] error_t Public ), fpm_cmd_settings: (Struct (SymbolTable 5 { verbose: (Variable 5 verbose [] Local (LogicalConstant .true. (Logical 4) ) (LogicalConstant .true. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), working_dir: (Variable 5 working_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_cmd_settings (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4)] [] .true. .false. ) [] [working_dir verbose] [] Source Public .false. .true. .false. [] () () [] ), fpm_update_settings: (Struct (SymbolTable 6 { clean: (Variable 6 clean [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), fetch_only: (Variable 6 fetch_only [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 6 name [] Local () () Default (Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) fpm_update_settings (StructType [(Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) (Logical 4) (Logical 4)] [] .true. .false. ) [] [name fetch_only clean] [] Source Public .false. .false. .false. [] () 4 fpm_cmd_settings [] ) }) fpm_cmd_update_modules_31 () [fpm_dependency_modules_31] .true. .false. .false. ), fpm_dependency_modules_31: (Module (SymbolTable 9 { dependency_config_t: (Struct (SymbolTable 10 { name: (Variable 10 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 10 path [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [name path] [] Source Public .false. .false. .false. [] () () [] ), dependency_node_t: (Struct (SymbolTable 11 { done: (Variable 11 done [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), proj_dir: (Variable 11 proj_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), revision: (Variable 11 revision [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), update: (Variable 11 update [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_node_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [] [proj_dir revision done update] [] Source Public .false. .false. .false. [] () 9 dependency_config_t [] ), dependency_tree_t: (Struct (SymbolTable 12 { cache: (Variable 12 cache [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dep: (Variable 12 dep [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 9 dependency_node_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dep_dir: (Variable 12 dep_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ndep: (Variable 12 ndep [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 12 unit [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), update: (GenericProcedure 12 update [12 update_dependency] Public ), update_dependency: (StructMethodDeclaration 12 update_dependency () update_dependency 9 update_dependency Source .false. .false. ), verbosity: (Variable 12 verbosity [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_tree_t (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [unit verbosity dep_dir ndep dep cache] [] Source Public .false. .false. .false. [] () () [] ), error_t: (Struct (SymbolTable 13 { message: (Variable 13 message [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) error_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [message] [] Source Public .false. .false. .false. [] () () [] ), update_dependency: (Function (SymbolTable 14 { error: (Variable 14 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 9 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 14 name [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 14 self [] InOut () () Default (StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) 9 dependency_tree_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) update_dependency (FunctionType [(StructType [(Integer 4) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Logical 4) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) (String 1 () AssumedLength DescriptorString) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 14 self) (Var 14 name) (Var 14 error)] [] () Public .true. .true. () ) }) fpm_dependency_modules_31 () [] .true. .false. .false. ), modules_31: (Program (SymbolTable 2 { 1_dependency_config_t: (ExternalSymbol 2 1_dependency_config_t 9 dependency_config_t fpm_dependency_modules_31 [] dependency_config_t Public ), cmd_update: (ExternalSymbol 2 cmd_update 4 cmd_update fpm_cmd_update_modules_31 [] cmd_update Public ), dependency_tree_t: (ExternalSymbol 2 dependency_tree_t 9 dependency_tree_t fpm_dependency_modules_31 [] dependency_tree_t Public ), error_t: (ExternalSymbol 2 error_t 9 error_t fpm_dependency_modules_31 [] error_t Public ), fpm_cmd_settings: (ExternalSymbol 2 fpm_cmd_settings 4 fpm_cmd_settings fpm_cmd_update_modules_31 [] fpm_cmd_settings Public ), fpm_update_settings: (ExternalSymbol 2 fpm_update_settings 4 fpm_update_settings fpm_cmd_update_modules_31 [] fpm_update_settings Public ) }) modules_31 [fpm_cmd_update_modules_31 fpm_dependency_modules_31] [(Print (StringConstant "running modules_31 program" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_indent-subroutine1-fdc40b3.stdout0000664000175000017500000000362715227365530025731 0ustar alastairalastair(TranslationUnit [(Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 x 1 () ) (DoLoop 0 () 0 i 1 10 () [(Assignment 0 x (* x i) () )] () () )] [] [] ) (Subroutine h [] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 x 1 () ) (DoLoop 0 () 0 i 1 10 () [(Assignment 0 x (* i x) () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-doloop_01-bb1c596.stderr0000664000175000017500000000072215227365530023602 0ustar alastairalastairwarning: Start expression in DO loop must be integer --> tests/warnings/doloop_01.f90:4:12 | 4 | do i = 1.5, 10.5, 2.4 | ^^^ warning: End expression in DO loop must be integer --> tests/warnings/doloop_01.f90:4:17 | 4 | do i = 1.5, 10.5, 2.4 | ^^^^ warning: Step expression (increment) in DO loop must be integer --> tests/warnings/doloop_01.f90:4:23 | 4 | do i = 1.5, 10.5, 2.4 | ^^^ lfortran-0.64.0/tests/reference/asr-min_02-21863aa.json0000664000175000017500000000105115227365530022446 0ustar alastairalastair{ "basename": "asr-min_02-21863aa", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/min_02.f90", "infile_hash": "395cfc5a8d60d306a6e51a8c1619bb4e36adede48c2fc96880e6c260", "outfile": null, "outfile_hash": null, "stdout": "asr-min_02-21863aa.stdout", "stdout_hash": "5129e520b4b3af48453c0447adb32290d8192e1895fe5d55a1b98f64", "stderr": "asr-min_02-21863aa.stderr", "stderr_hash": "725c31c866b6247c13d41d88baca52f0557baea049805e460d55fa23", "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-expr_05-1df98eb.f900000664000175000017500000000247115227365530023343 0ustar alastairalastairprogram expr_05 implicit none integer(4) :: a integer(4) :: b integer(4) :: c logical(4) :: l integer(4) :: x a = 3 b = 4 c = 5 x = 2*3 x = (-2)*3 x = 2*(-3) x = (-2)*(-3) x = (-2)*(-3) x = -2**3 x = -2**3 x = -2*3 x = 2**(-3) x = a x = a x = a*b x = (-a)*b x = -a*b x = a*(-b) x = (-a)*(-b) x = a*b*c x = (-a)*b*c x = a*(-b)*c x = a*b*(-c) x = (-a)*(-b)*(-c) x = 3 + 4*5 x = (3 + 4)*5 x = a*(b + 5*(c - b)) x = (3 - 2*a*b)*5 x = ((-2)*a*b + 3)*5 x = ((-2)*a*b + 3*b*a)*5 x = ((-2)*a/b + (a + (-b))**2)*5 x = (2*a*b + 3)*5 x = a**2 + 2*a*b + b**2 x = (a + b)*(a - b) x = (a + b)**2 x = (a + b)*(a**2 - a*b + b**2) x = (a - b)*(a + b)*(a**2 + b**2) x = 1/(a*b) x = 1/a*b x = 1/a*b x = 1/((a*b + 1)) x = 1/a*b + 1 x = 1/a*b + 1 x = 2 - (-2) x = a - ((-b) - c) x = a - (-2)*b x = c - (-2)/b x = a - (2 + 3 + 4) x = a + 2 + 3 + 4 x = 2*a + a*b - (a*b + 2*a) x = 2*a + a*b - (a*b - 2*a) x = a - (b - (c - 1)) x = a - b x = a - (b - c) x = a - b - c x = -(a - ((-b) + (-b) - (-b)*b)) x = -(3 + 5) x = -(a + 5) l = x**3*4 + a <= 4 .or. x < 5 .and. x < 6 .eqv. .true. .or. .not. .false. .and. .true. l = l .or. l .and. l l = (l .or. l) .and. l l = l .and. l .or. l l = l .and. (l .or. l) l = l .or. .not. l .and. l l = l .or. l .and. .not. l l = l .and. l .or. .not. l l = l .and. .not. l .or. l l = l .and. .not. (l .or. l) end program expr_05 lfortran-0.64.0/tests/reference/wat-doloop_01-4e94eaf.json0000664000175000017500000000073015227365530023343 0ustar alastairalastair{ "basename": "wat-doloop_01-4e94eaf", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/doloop_01.f90", "infile_hash": "14818f8f39c32bf890cf7906fe8a9692b270ad81a49bcdf0486f8e84", "outfile": null, "outfile_hash": null, "stdout": "wat-doloop_01-4e94eaf.stdout", "stdout_hash": "185a1f350c3f225982b7770df44453159d54798ec1a262b383159c53", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-private1-f9f97ce.stderr0000664000175000017500000000020315227365530023634 0ustar alastairalastairsemantic error: Variable 'x' is not declared --> tests/errors/private1.f90:21:5 | 21 | x = 5 | ^ 'x' is undeclared lfortran-0.64.0/tests/reference/ast_f90-arrays_02-d2f7107.stdout0000664000175000017500000000033415227365530024225 0ustar alastairalastairprogram arrays_02 implicit none integer, parameter :: dp = kind(0.d0) real(dp) :: a(3), b a(1) = 3._dp a(2) = 2._dp a(3) = 1._dp b = sum(a) if (abs(b - 6._dp) > 1e-12_dp) then error stop end if end program arrays_02 lfortran-0.64.0/tests/reference/asr-select_type_01-204dfa1.stdout0000664000175000017500000010316315227365530024636 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { select_type_01: (Program (SymbolTable 2 { 1_base_i: (ExternalSymbol 2 1_base_i 3 i base [] i Public ), 1_child_j: (ExternalSymbol 2 1_child_j 4 j child [] j Public ), base: (Struct (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) base (StructType [(Integer 4)] [] .true. .false. ) [] [i] [] Source Public .false. .false. .false. [] () () [] ), base_target: (Variable 2 base_target [] Local (StructConstructor 2 base [((IntegerConstant 10 (Integer 4) Decimal))] (StructType [(Integer 4)] [] .true. .false. ) () ) () Default (StructType [(Integer 4)] [] .true. .false. ) 2 base Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), bptr: (Variable 2 bptr [] Local () () Default (Pointer (StructType [(Integer 4)] [] .false. .false. ) ) 2 base Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), child: (Struct (SymbolTable 4 { j: (Variable 4 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) child (StructType [(Integer 4)] [] .true. .false. ) [] [j] [] Source Public .false. .false. .false. [] () 2 base [] ), child_target: (Variable 2 child_target [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 child Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), perform_select_type: (Function (SymbolTable 5 { bptr: (Variable 5 bptr [] Unspecified () () Default (Pointer (StructType [(Integer 4)] [] .false. .false. ) ) 2 base Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~select_type_block_: (Block (SymbolTable 6 { 1_base_i: (ExternalSymbol 6 1_base_i 3 i base [] i Public ) }) ~select_type_block_ [(Print (StringFormat () [(StringConstant "base type: component value: " (String 1 (IntegerConstant 28 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 base) ) 6 1_base_i (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 base) ) 6 1_base_i (Integer 4) () ) NotEq (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ), ~select_type_block_1: (Block (SymbolTable 7 { 1_base_i: (ExternalSymbol 7 1_base_i 3 i base [] i Public ), 1_child_j: (ExternalSymbol 7 1_child_j 4 j child [] j Public ) }) ~select_type_block_1 [(Print (StringFormat () [(StringConstant "child type: component values: " (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 child) ) 7 1_base_i (Integer 4) () ) (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 child) ) 7 1_child_j (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 child) ) 7 1_base_i (Integer 4) () ) NotEq (IntegerConstant 20 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (StructInstanceMember (Cast (Var 5 bptr) ClassToStruct (Pointer (StructType [(Integer 4)] [] .true. .false. ) ) () (Var 2 child) ) 7 1_child_j (Integer 4) () ) NotEq (IntegerConstant 30 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) perform_select_type (FunctionType [(Pointer (StructType [(Integer 4)] [] .false. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 bptr)] [(SelectType (Var 5 bptr) () [(TypeStmtName 2 base [(BlockCall -1 5 ~select_type_block_ )] ) (TypeStmtName 2 child [(BlockCall -1 5 ~select_type_block_1 )] )] [] )] () Public .false. .false. () ) }) select_type_01 [] [(Assignment (Var 2 child_target) (StructConstructor 2 child [((IntegerConstant 20 (Integer 4) Decimal)) ((IntegerConstant 30 (Integer 4) Decimal))] (StructType [(Integer 4)] [] .true. .false. ) () ) () .false. .false. ) (Print (StringFormat () [(StructInstanceMember (Var 2 base_target) 2 1_base_i (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StructInstanceMember (Var 2 child_target) 2 1_base_i (Integer 4) () ) (StructInstanceMember (Var 2 child_target) 2 1_child_j (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Associate (Var 2 bptr) (Var 2 child_target) ) (SubroutineCall 2 perform_select_type () [((Var 2 bptr))] () .false. ) (Associate (Var 2 bptr) (Var 2 base_target) ) (SubroutineCall 2 perform_select_type () [((Var 2 bptr))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-max_02-646ff6d.json0000664000175000017500000000105115227365530022550 0ustar alastairalastair{ "basename": "asr-max_02-646ff6d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/max_02.f90", "infile_hash": "bd78accf5e71c42d049416709f9c7e4f8e68f8f78e66bb1a5a47834a", "outfile": null, "outfile_hash": null, "stdout": "asr-max_02-646ff6d.stdout", "stdout_hash": "99c72cc730462c7f3808206afb58d696c21bce97a422d49284f5eca1", "stderr": "asr-max_02-646ff6d.stderr", "stderr_hash": "64e91c42f66a3935616bfc089e1051357881a0b8abc49c7a30b8f46b", "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_40-9ce331f.json0000664000175000017500000000071515227365530023272 0ustar alastairalastair{ "basename": "run-format_40-9ce331f", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_40.f90", "infile_hash": "f9b072b2e5d881b866bc93f150f89a0e537fc8cb5b7efe6bd3519a9a", "outfile": null, "outfile_hash": null, "stdout": "run-format_40-9ce331f.stdout", "stdout_hash": "d2b1f734863fed5c473c2fc70a409e7f4744908c27934abff1b94ebb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-parsing_01-c9b84fe.json0000664000175000017500000000075015227365530023513 0ustar alastairalastair{ "basename": "ast-parsing_01-c9b84fe", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/parsing_01.f90", "infile_hash": "def9551071d9aa0cfd8163560e96b69ad76bc67a9830f2531e6752a5", "outfile": null, "outfile_hash": null, "stdout": "ast-parsing_01-c9b84fe.stdout", "stdout_hash": "b4ea95da6854b7d12c06c8db17b4118ca84b5344a57ffb401305b1b8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_11-dd72b29.json0000664000175000017500000000075015227365530023430 0ustar alastairalastair{ "basename": "asr-modules_11-dd72b29", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_11.f90", "infile_hash": "f19a5ba8d01ebaae3da78891afbae58462d711a364274aa3a5569fa1", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_11-dd72b29.stdout", "stdout_hash": "04459c62cdab24e2efcbbc3f30e0952d1388ca1e8ea14e666a479cb4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-arrays_101-8ed52ae.stdout0000664000175000017500000010147115227365530024161 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [10 x i8] c"small_arr\00", align 1 @1 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @2 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @3 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @4 = private unnamed_addr constant [10 x i8] c"large_arr\00", align 1 @5 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @6 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @7 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @8 = private unnamed_addr constant [10 x i8] c"small_arr\00", align 1 @9 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @10 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @11 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [10 x i8] c"large_arr\00", align 1 @15 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @16 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @17 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @18 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @19 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @20 = private unnamed_addr constant [10 x i8] c"block_arr\00", align 1 @21 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @22 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @23 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @24 = private unnamed_addr constant [10 x i8] c"block_arr\00", align 1 @25 = private unnamed_addr constant [42 x i8] c"tests/../integration_tests/arrays_101.f90\00", align 1 @26 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @27 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @28 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @29 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @30 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [2 x i8] c"OK" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([2 x i8], [2 x i8]* @string_const_data, i32 0, i32 0), i64 2 }> @31 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @_lcompilers_real_i32(i32* %x) { .entry: %_lcompilers_real_i32 = alloca float, align 4 %0 = load i32, i32* %x, align 4 %1 = sitofp i32 %0 to float store float %1, float* %_lcompilers_real_i32, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_real_i32 FINALIZE_SYMTABLE__lcompilers_real_i32: ; preds = %return %2 = load float, float* %_lcompilers_real_i32, align 4 ret float %2 } define i32 @main(i32 %0, i8** %1) { .entry: %array_bound38 = alloca i32, align 4 %array_bound34 = alloca i32, align 4 %array_bound11 = alloca i32, align 4 %array_bound7 = alloca i32, align 4 %2 = call i8* @_lfortran_get_default_allocator() %array_bound1 = alloca i32, align 4 %array_bound = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__do_loop_end = alloca i32, align 4 %__do_loop_end1 = alloca i32, align 4 %__libasr_index_0_ = alloca i32, align 4 %__libasr_index_0_1 = alloca i32, align 4 %i = alloca i32, align 4 %3 = call i8* @_lfortran_get_default_allocator() %4 = call i8* @_lfortran_malloc_alloc(i8* %3, i64 8000) %5 = bitcast i8* %4 to [2000 x float]* %small_arr = alloca [100 x float], align 4 %sum = alloca float, align 4 br i1 true, label %then, label %else then: ; preds = %.entry store i32 100, i32* %array_bound, align 4 br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %6 = load i32, i32* %array_bound, align 4 store i32 %6, i32* %__do_loop_end, align 4 br i1 true, label %then2, label %else3 then2: ; preds = %ifcont store i32 1, i32* %array_bound1, align 4 br label %ifcont4 else3: ; preds = %ifcont br label %ifcont4 ifcont4: ; preds = %else3, %then2 %7 = load i32, i32* %array_bound1, align 4 %8 = sub i32 %7, 1 store i32 %8, i32* %__libasr_index_0_, align 4 br label %loop.head loop.head: ; preds = %ifcont6, %ifcont4 %9 = load i32, i32* %__libasr_index_0_, align 4 %10 = add i32 %9, 1 %11 = load i32, i32* %__do_loop_end, align 4 %12 = icmp sle i32 %10, %11 br i1 %12, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %13 = load i32, i32* %__libasr_index_0_, align 4 %14 = add i32 %13, 1 store i32 %14, i32* %__libasr_index_0_, align 4 %15 = load i32, i32* %__libasr_index_0_, align 4 %16 = sext i32 %15 to i64 %17 = sub i64 %16, 1 %18 = mul i64 1, %17 %19 = add i64 0, %18 %20 = icmp slt i64 %16, 1 %21 = icmp sgt i64 %16, 100 %22 = or i1 %20, %21 br i1 %22, label %then5, label %ifcont6 then5: ; preds = %loop.body %23 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %24 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %25 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %24, i32 0, i32 0 %26 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %25, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @1, i32 0, i32 0), i8** %26, align 8 %27 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %25, i32 0, i32 1 store i32 17, i32* %27, align 4 %28 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %25, i32 0, i32 2 store i32 5, i32* %28, align 4 %29 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %25, i32 0, i32 3 store i32 17, i32* %29, align 4 %30 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %25, i32 0, i32 4 store i32 13, i32* %30, align 4 %31 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @2, i32 0, i32 0)) %32 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %23, i32 0, i32 0 %33 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %24, i32 0, i32 0 %34 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %32, i32 0, i32 2 %35 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %32, i32 0, i32 0 store i1 true, i1* %35, align 1 %36 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %32, i32 0, i32 1 store i8* %31, i8** %36, align 8 store { i8*, i32, i32, i32, i32 }* %33, { i8*, i32, i32, i32, i32 }** %34, align 8 %37 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %32, i32 0, i32 3 store i32 1, i32* %37, align 4 %38 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %23, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %38, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @0, i32 0, i32 0), i64 %16, i32 1, i64 1, i64 100) call void @exit(i32 1) unreachable ifcont6: ; preds = %loop.body %39 = getelementptr [100 x float], [100 x float]* %small_arr, i32 0, i64 %19 store float 1.000000e+00, float* %39, align 4 br label %loop.head loop.end: ; preds = %loop.head br i1 true, label %then8, label %else9 then8: ; preds = %loop.end store i32 2000, i32* %array_bound7, align 4 br label %ifcont10 else9: ; preds = %loop.end br label %ifcont10 ifcont10: ; preds = %else9, %then8 %40 = load i32, i32* %array_bound7, align 4 store i32 %40, i32* %__do_loop_end1, align 4 br i1 true, label %then12, label %else13 then12: ; preds = %ifcont10 store i32 1, i32* %array_bound11, align 4 br label %ifcont14 else13: ; preds = %ifcont10 br label %ifcont14 ifcont14: ; preds = %else13, %then12 %41 = load i32, i32* %array_bound11, align 4 %42 = sub i32 %41, 1 store i32 %42, i32* %__libasr_index_0_1, align 4 br label %loop.head15 loop.head15: ; preds = %ifcont18, %ifcont14 %43 = load i32, i32* %__libasr_index_0_1, align 4 %44 = add i32 %43, 1 %45 = load i32, i32* %__do_loop_end1, align 4 %46 = icmp sle i32 %44, %45 br i1 %46, label %loop.body16, label %loop.end19 loop.body16: ; preds = %loop.head15 %47 = load i32, i32* %__libasr_index_0_1, align 4 %48 = add i32 %47, 1 store i32 %48, i32* %__libasr_index_0_1, align 4 %49 = load i32, i32* %__libasr_index_0_1, align 4 %50 = sext i32 %49 to i64 %51 = sub i64 %50, 1 %52 = mul i64 1, %51 %53 = add i64 0, %52 %54 = icmp slt i64 %50, 1 %55 = icmp sgt i64 %50, 2000 %56 = or i1 %54, %55 br i1 %56, label %then17, label %ifcont18 then17: ; preds = %loop.body16 %57 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %58 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %59 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %58, i32 0, i32 0 %60 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %59, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @5, i32 0, i32 0), i8** %60, align 8 %61 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %59, i32 0, i32 1 store i32 18, i32* %61, align 4 %62 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %59, i32 0, i32 2 store i32 5, i32* %62, align 4 %63 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %59, i32 0, i32 3 store i32 18, i32* %63, align 4 %64 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %59, i32 0, i32 4 store i32 13, i32* %64, align 4 %65 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @6, i32 0, i32 0)) %66 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %57, i32 0, i32 0 %67 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %58, i32 0, i32 0 %68 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %66, i32 0, i32 2 %69 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %66, i32 0, i32 0 store i1 true, i1* %69, align 1 %70 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %66, i32 0, i32 1 store i8* %65, i8** %70, align 8 store { i8*, i32, i32, i32, i32 }* %67, { i8*, i32, i32, i32, i32 }** %68, align 8 %71 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %66, i32 0, i32 3 store i32 1, i32* %71, align 4 %72 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %57, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %72, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @4, i32 0, i32 0), i64 %50, i32 1, i64 1, i64 2000) call void @exit(i32 1) unreachable ifcont18: ; preds = %loop.body16 %73 = getelementptr [2000 x float], [2000 x float]* %5, i32 0, i64 %53 store float 2.000000e+00, float* %73, align 4 br label %loop.head15 loop.end19: ; preds = %loop.head15 br i1 false, label %then20, label %ifcont21 then20: ; preds = %loop.end19 %74 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %75 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %76 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %75, i32 0, i32 0 %77 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @9, i32 0, i32 0), i8** %77, align 8 %78 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 1 store i32 21, i32* %78, align 4 %79 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 2 store i32 9, i32* %79, align 4 %80 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 3 store i32 21, i32* %80, align 4 %81 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 4 store i32 20, i32* %81, align 4 %82 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @10, i32 0, i32 0)) %83 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %74, i32 0, i32 0 %84 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %75, i32 0, i32 0 %85 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 2 %86 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 0 store i1 true, i1* %86, align 1 %87 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 1 store i8* %82, i8** %87, align 8 store { i8*, i32, i32, i32, i32 }* %84, { i8*, i32, i32, i32, i32 }** %85, align 8 %88 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 3 store i32 1, i32* %88, align 4 %89 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %74, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @8, i32 0, i32 0), i64 1, i32 1, i64 1, i64 100) call void @exit(i32 1) unreachable ifcont21: ; preds = %loop.end19 %90 = getelementptr [100 x float], [100 x float]* %small_arr, i32 0, i64 0 %91 = load float, float* %90, align 4 %92 = fcmp une float %91, 1.000000e+00 br i1 %92, label %then22, label %else23 then22: ; preds = %ifcont21 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont24 else23: ; preds = %ifcont21 br label %ifcont24 ifcont24: ; preds = %else23, %then22 br i1 false, label %then25, label %ifcont26 then25: ; preds = %ifcont24 %93 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %94 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %95 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %94, i32 0, i32 0 %96 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %95, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @15, i32 0, i32 0), i8** %96, align 8 %97 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %95, i32 0, i32 1 store i32 22, i32* %97, align 4 %98 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %95, i32 0, i32 2 store i32 9, i32* %98, align 4 %99 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %95, i32 0, i32 3 store i32 22, i32* %99, align 4 %100 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %95, i32 0, i32 4 store i32 20, i32* %100, align 4 %101 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @16, i32 0, i32 0)) %102 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %93, i32 0, i32 0 %103 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %94, i32 0, i32 0 %104 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %102, i32 0, i32 2 %105 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %102, i32 0, i32 0 store i1 true, i1* %105, align 1 %106 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %102, i32 0, i32 1 store i8* %101, i8** %106, align 8 store { i8*, i32, i32, i32, i32 }* %103, { i8*, i32, i32, i32, i32 }** %104, align 8 %107 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %102, i32 0, i32 3 store i32 1, i32* %107, align 4 %108 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %93, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %108, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @14, i32 0, i32 0), i64 1, i32 1, i64 1, i64 2000) call void @exit(i32 1) unreachable ifcont26: ; preds = %ifcont24 %109 = getelementptr [2000 x float], [2000 x float]* %5, i32 0, i64 0 %110 = load float, float* %109, align 4 %111 = fcmp une float %110, 2.000000e+00 br i1 %111, label %then27, label %else28 then27: ; preds = %ifcont26 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @18, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont29 else28: ; preds = %ifcont26 br label %ifcont29 ifcont29: ; preds = %else28, %then27 store float 0.000000e+00, float* %sum, align 4 store i32 0, i32* %i, align 4 br label %loop.head30 loop.head30: ; preds = %free_done, %ifcont29 %112 = load i32, i32* %i, align 4 %113 = add i32 %112, 1 %114 = icmp sle i32 %113, 1000 br i1 %114, label %loop.body31, label %loop.end49 loop.body31: ; preds = %loop.head30 %115 = load i32, i32* %i, align 4 %116 = add i32 %115, 1 store i32 %116, i32* %i, align 4 br label %block.start block.start: ; preds = %loop.body31 %117 = call i8* @llvm.stacksave() %__do_loop_end32 = alloca i32, align 4 %__libasr_index_0_33 = alloca i32, align 4 %118 = call i8* @_lfortran_get_default_allocator() %119 = call i8* @_lfortran_malloc_alloc(i8* %118, i64 2000) %120 = bitcast i8* %119 to [500 x float]* br i1 true, label %then35, label %else36 then35: ; preds = %block.start store i32 500, i32* %array_bound34, align 4 br label %ifcont37 else36: ; preds = %block.start br label %ifcont37 ifcont37: ; preds = %else36, %then35 %121 = load i32, i32* %array_bound34, align 4 store i32 %121, i32* %__do_loop_end32, align 4 br i1 true, label %then39, label %else40 then39: ; preds = %ifcont37 store i32 1, i32* %array_bound38, align 4 br label %ifcont41 else40: ; preds = %ifcont37 br label %ifcont41 ifcont41: ; preds = %else40, %then39 %122 = load i32, i32* %array_bound38, align 4 %123 = sub i32 %122, 1 store i32 %123, i32* %__libasr_index_0_33, align 4 br label %loop.head42 loop.head42: ; preds = %ifcont45, %ifcont41 %124 = load i32, i32* %__libasr_index_0_33, align 4 %125 = add i32 %124, 1 %126 = load i32, i32* %__do_loop_end32, align 4 %127 = icmp sle i32 %125, %126 br i1 %127, label %loop.body43, label %loop.end46 loop.body43: ; preds = %loop.head42 %128 = load i32, i32* %__libasr_index_0_33, align 4 %129 = add i32 %128, 1 store i32 %129, i32* %__libasr_index_0_33, align 4 %130 = load i32, i32* %__libasr_index_0_33, align 4 %131 = sext i32 %130 to i64 %132 = sub i64 %131, 1 %133 = mul i64 1, %132 %134 = add i64 0, %133 %135 = icmp slt i64 %131, 1 %136 = icmp sgt i64 %131, 500 %137 = or i1 %135, %136 br i1 %137, label %then44, label %ifcont45 then44: ; preds = %loop.body43 %138 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %139 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %140 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %139, i32 0, i32 0 %141 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %140, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @21, i32 0, i32 0), i8** %141, align 8 %142 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %140, i32 0, i32 1 store i32 30, i32* %142, align 4 %143 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %140, i32 0, i32 2 store i32 13, i32* %143, align 4 %144 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %140, i32 0, i32 3 store i32 30, i32* %144, align 4 %145 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %140, i32 0, i32 4 store i32 21, i32* %145, align 4 %146 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @22, i32 0, i32 0)) %147 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %138, i32 0, i32 0 %148 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %139, i32 0, i32 0 %149 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %147, i32 0, i32 2 %150 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %147, i32 0, i32 0 store i1 true, i1* %150, align 1 %151 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %147, i32 0, i32 1 store i8* %146, i8** %151, align 8 store { i8*, i32, i32, i32, i32 }* %148, { i8*, i32, i32, i32, i32 }** %149, align 8 %152 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %147, i32 0, i32 3 store i32 1, i32* %152, align 4 %153 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %138, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %153, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @20, i32 0, i32 0), i64 %131, i32 1, i64 1, i64 500) call void @exit(i32 1) unreachable ifcont45: ; preds = %loop.body43 %154 = getelementptr [500 x float], [500 x float]* %120, i32 0, i64 %134 %155 = call float @_lcompilers_real_i32(i32* %i) store float %155, float* %154, align 4 br label %loop.head42 loop.end46: ; preds = %loop.head42 %156 = load float, float* %sum, align 4 br i1 false, label %then47, label %ifcont48 then47: ; preds = %loop.end46 %157 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %158 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %159 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %158, i32 0, i32 0 %160 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %159, i32 0, i32 0 store i8* getelementptr inbounds ([42 x i8], [42 x i8]* @25, i32 0, i32 0), i8** %160, align 8 %161 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %159, i32 0, i32 1 store i32 31, i32* %161, align 4 %162 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %159, i32 0, i32 2 store i32 25, i32* %162, align 4 %163 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %159, i32 0, i32 3 store i32 31, i32* %163, align 4 %164 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %159, i32 0, i32 4 store i32 36, i32* %164, align 4 %165 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @26, i32 0, i32 0)) %166 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %157, i32 0, i32 0 %167 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %158, i32 0, i32 0 %168 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %166, i32 0, i32 2 %169 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %166, i32 0, i32 0 store i1 true, i1* %169, align 1 %170 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %166, i32 0, i32 1 store i8* %165, i8** %170, align 8 store { i8*, i32, i32, i32, i32 }* %167, { i8*, i32, i32, i32, i32 }** %168, align 8 %171 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %166, i32 0, i32 3 store i32 1, i32* %171, align 4 %172 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %157, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %172, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @24, i32 0, i32 0), i64 1, i32 1, i64 1, i64 500) call void @exit(i32 1) unreachable ifcont48: ; preds = %loop.end46 %173 = getelementptr [500 x float], [500 x float]* %120, i32 0, i64 0 %174 = load float, float* %173, align 4 %175 = fadd float %156, %174 store float %175, float* %sum, align 4 br label %block.end block.end: ; preds = %ifcont48 br label %FINALIZE_SYMTABLE_block FINALIZE_SYMTABLE_block: ; preds = %block.end %176 = icmp eq i8* %119, null br i1 %176, label %free_done, label %free_nonnull free_nonnull: ; preds = %FINALIZE_SYMTABLE_block call void @_lfortran_free_alloc(i8* %2, i8* %119) br label %free_done free_done: ; preds = %free_nonnull, %FINALIZE_SYMTABLE_block call void @llvm.stackrestore(i8* %117) br label %loop.head30 loop.end49: ; preds = %loop.head30 %177 = load float, float* %sum, align 4 %178 = fsub float %177, 5.005000e+05 %179 = call float @llvm.fabs.f32(float %178) %180 = fcmp ogt float %179, 0x3FB99999A0000000 br i1 %180, label %then50, label %else51 then50: ; preds = %loop.end49 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @28, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont52 else51: ; preds = %loop.end49 br label %ifcont52 ifcont52: ; preds = %else51, %then50 %181 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @31, i32 0, i32 0), i8* %181, i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @30, i32 0, i32 0), i32 1) br label %return return: ; preds = %ifcont52 br label %FINALIZE_SYMTABLE_static_large_array FINALIZE_SYMTABLE_static_large_array: ; preds = %return %182 = icmp eq i8* %4, null br i1 %182, label %free_done54, label %free_nonnull53 free_nonnull53: ; preds = %FINALIZE_SYMTABLE_static_large_array call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done54 free_done54: ; preds = %free_nonnull53, %FINALIZE_SYMTABLE_static_large_array call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() ; Function Attrs: nounwind declare i8* @llvm.stacksave() #0 declare void @_lfortran_free_alloc(i8*, i8*) ; Function Attrs: nounwind declare void @llvm.stackrestore(i8*) #0 ; Function Attrs: nounwind readnone speculatable willreturn declare float @llvm.fabs.f32(float) #1 declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) attributes #0 = { nounwind } attributes #1 = { nounwind readnone speculatable willreturn } lfortran-0.64.0/tests/reference/asr-continue_compilation_ff_2-9ba55e7.stderr0000664000175000017500000000027315227365530027133 0ustar alastairalastairtokenizer error: Expecting contains keyword before procedure definition --> tests/errors/continue_compilation_ff_2.f:3:7 | 3 | SUBROUTINE faulty_subroutine(a, b, c) | ^ lfortran-0.64.0/tests/reference/ast-fixed_form5-66fddbd.json0000664000175000017500000000074115227365530024032 0ustar alastairalastair{ "basename": "ast-fixed_form5-66fddbd", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form5.f", "infile_hash": "a40b468e72a8562746dc8711312f496a7635144b26f7cfca248cb16e", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form5-66fddbd.stdout", "stdout_hash": "2440a38ffa8af1e22b1ad974a551f85538dfa9bdeac0a333d0798817", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutines_04-c6808b6.json0000664000175000017500000000075515227365530024613 0ustar alastairalastair{ "basename": "julia-subroutines_04-c6808b6", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/subroutines_04.f90", "infile_hash": "c7f14f3cfe8c42ebbf006f4e20a30b517c9e2775e5af0f8853ae05e1", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutines_04-c6808b6.stdout", "stdout_hash": "f1ab22a6c4a89d1dc7cfb972058622e224439bc1b109e78520e02e9c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/obj-program1-785a609.json0000664000175000017500000000056515227365530023046 0ustar alastairalastair{ "basename": "obj-program1-785a609", "cmd": "lfortran --no-color -c {infile} -o output.o", "infile": "tests/program1.f90", "infile_hash": "ec4ccdfed01d45648718ca57a9ceb3e5aa82e55e57d8906636902e7b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-const_kind_02-7c339b9.stdout0000664000175000017500000001534115227365530024414 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { const_kind_02: (Program (SymbolTable 2 { i1: (Variable 2 i1 [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i2: (Variable 2 i2 [] Local (IntegerConstant 1 (Integer 8) Decimal) (IntegerConstant 1 (Integer 8) Decimal) Parameter (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i3: (Variable 2 i3 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), int32: (Variable 2 int32 [] Local (IntegerConstant 4 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), int64: (Variable 2 int64 [] Local (IntegerConstant 8 (Integer 4) Decimal) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) const_kind_02 [] [(Assignment (Var 2 i3) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i3) (Cast (IntegerConstant 1 (Integer 8) Decimal) IntegerToInteger (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 int32) (Var 2 int64) (Var 2 i1) (Var 2 i2) (Var 2 i3)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_error_09-8d590f9.json0000664000175000017500000000075715227365530024755 0ustar alastairalastair{ "basename": "asr-template_error_09-8d590f9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/template_error_09.f90", "infile_hash": "773f4dded8e565f02f43e0b053439728820619a5f8d225f2badc429e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-template_error_09-8d590f9.stderr", "stderr_hash": "126101c2d657ed18e2d1e2362f8fec3a618565917fa77fd78e5c61d5", "returncode": 2 }lfortran-0.64.0/tests/reference/asr_preprocess-unterminated_if_01-6989548.stderr0000664000175000017500000000015115227365530027531 0ustar alastairalastairC preprocessor error: Unterminated #if --> tests/errors/unterminated_if_01.f90:1:1 | 1 | #if a | ^ lfortran-0.64.0/tests/reference/pass_nested_vars-nested_call_filter_01-5a87413.json0000664000175000017500000000106615227365530030217 0ustar alastairalastair{ "basename": "pass_nested_vars-nested_call_filter_01-5a87413", "cmd": "lfortran --pass=nested_vars --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_call_filter_01.f90", "infile_hash": "8cec6df4b177816ae0e3fe2e6e58db32e27ffa4afb6640cbeabd017e", "outfile": null, "outfile_hash": null, "stdout": "pass_nested_vars-nested_call_filter_01-5a87413.stdout", "stdout_hash": "86ef05c9f7fecfe5bad1a872de799907efca47b6960e0410af4a56f8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-rewind_invalid_kwarg1-54e2b4f.stderr0000664000175000017500000000023515227365530026257 0ustar alastairalastairsemantic error: Invalid argument `end` supplied --> tests/errors/rewind_invalid_kwarg1.f90:3:5 | 3 | rewind(end="world") | ^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-implied_do_loops2-98464d0.json0000664000175000017500000000077515227365530024736 0ustar alastairalastair{ "basename": "asr-implied_do_loops2-98464d0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/implied_do_loops2.f90", "infile_hash": "52395150c001e73afe37bfe9d3ea099d5e75e2704bd1733457496ad2", "outfile": null, "outfile_hash": null, "stdout": "asr-implied_do_loops2-98464d0.stdout", "stdout_hash": "cf0ea2bebb9d68582a3350d22fba5558af8c3a7a93d772734088082f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-case_05-0476e14.stdout0000664000175000017500000000065515227365530023570 0ustar alastairalastairprogram case_05 implicit none ! local variable declaration character :: grade = "B" select case (grade) case ("A") print *, "Excellent!" case ("B") case ("C") print *, "Well done" case ("D") print *, "You passed" case ("F") print *, "Better try again" case default print *, "Invalid grade" end select print *, "Your grade is ", grade end program case_05 lfortran-0.64.0/tests/reference/asr-derived_types_07-c5a29e3.json0000664000175000017500000000074515227365530024635 0ustar alastairalastair{ "basename": "asr-derived_types_07-c5a29e3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/derived_types_07.f90", "infile_hash": "1113bb8810a8cabbaa2deaee33aa216082f6086f7cc9b8b2f34fd466", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_07-c5a29e3.stdout", "stdout_hash": "c5a1c9b4a4f22a535cf939b9d35a09372ed66fef4efc7cf9774a7d22", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-derived_types_03-1824805.json0000664000175000017500000000100515227365530025057 0ustar alastairalastair{ "basename": "ast_f90-derived_types_03-1824805", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/derived_types_03.f90", "infile_hash": "fd0a87db249f310cd20a90b39d5eb4627597acf774b62bdb8c4256c4", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-derived_types_03-1824805.stdout", "stdout_hash": "8f12723d8d2fb1e4c6890b2db2487fc67677b2fe12564be64ec454b9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-string_03-bda189f.stdout0000664000175000017500000000074515227365530024405 0ustar alastairalastairmodule string_03_mod implicit none character(len=5), parameter :: intro = "I've " end module string_03_mod program string_03 use string_03_mod, only: intro implicit none character(len=8) :: verb character(len=5) :: posit character(len=4) :: title character(len=7) :: last_name character(len=29) :: combined verb = "learned " posit = "from " title = "the " last_name = "best" combined = intro // verb // posit // title // last_name // "." print *, combined end program string_03 lfortran-0.64.0/tests/reference/fortran-coarray_sync_01-4cab83b.f900000664000175000017500000000413315227365530025036 0ustar alastairalastairtype :: prif_coarray_handle type(c_ptr) :: info end type prif_coarray_handle program coarray_sync_01 implicit none integer(4), dimension(2) :: images integer(4) :: stat call __module_prif_prif_init(stat) call __module_prif_prif_sync_all() call __module_prif_prif_sync_all() call __module_prif_prif_sync_memory() images(1) = 1 images(2) = 2 call __module_prif_prif_sync_images(images) call __module_prif_prif_sync_images() call __module_prif_prif_stop(.false.) contains interface subroutine __module_prif_prif_init(exit_code) integer(4), intent(out) :: exit_code end subroutine __module_prif_prif_init end interface interface subroutine __module_prif_prif_stop(quiet, stop_code_int, stop_code_char) logical(1), intent(in), value :: quiet character(len=*, kind=1), intent(in), optional, value :: stop_code_char integer(4), intent(in), optional, value :: stop_code_int end subroutine __module_prif_prif_stop end interface interface subroutine __module_prif_prif_sync_all(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_all end interface interface subroutine __module_prif_prif_sync_images(image_set, stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), dimension(:), intent(in), optional :: image_set integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_images end interface interface subroutine __module_prif_prif_sync_memory(stat, errmsg, errmsg_alloc) character(len=*, kind=1), intent(inout), optional :: errmsg character(len=:, kind=1), allocatable, intent(inout), optional :: errmsg_alloc integer(4), intent(out), optional :: stat end subroutine __module_prif_prif_sync_memory end interface end program coarray_sync_01 lfortran-0.64.0/tests/reference/llvm-complex_dp_param-5efce36.json0000664000175000017500000000077515227365530025250 0ustar alastairalastair{ "basename": "llvm-complex_dp_param-5efce36", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_dp_param.f90", "infile_hash": "0d4d9eaf5bcc2cee6a8b57ee6a66b5a10ced2edf6d64b5d2e2a0bcb8", "outfile": null, "outfile_hash": null, "stdout": "llvm-complex_dp_param-5efce36.stdout", "stdout_hash": "aa6de0c128626de468525684391f07ca3f513daba639c2463704e61a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-program1-5e4637e.stdout0000664000175000017500000000126215227365530023501 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { int32_t i; i = 5; std::cout << i << std::endl; std::cout << i + 1 << std::endl; } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/tokens-subroutine1-c249ad5.json0000664000175000017500000000073715227365530024460 0ustar alastairalastair{ "basename": "tokens-subroutine1-c249ad5", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/subroutine1.f90", "infile_hash": "e209c22328b423e75d6801f3c0ef19bc120936196435dff2cb19df31", "outfile": null, "outfile_hash": null, "stdout": "tokens-subroutine1-c249ad5.stdout", "stdout_hash": "e48e3d92e7b293dcc3b2c28a10054c5191a8c2bda04d3a63a8c1b50e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-rewind_invalid_kwarg1-54e2b4f.json0000664000175000017500000000077315227365530025734 0ustar alastairalastair{ "basename": "asr-rewind_invalid_kwarg1-54e2b4f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/rewind_invalid_kwarg1.f90", "infile_hash": "1a5966a45bdcff87457415865fdeba35d60b85be63db448a4c1203c9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-rewind_invalid_kwarg1-54e2b4f.stderr", "stderr_hash": "e0c4f2ddc1407c75eeb039d0ad31c950720cdc8effb8614a4fe7ce51", "returncode": 2 }lfortran-0.64.0/tests/reference/run-implied_do_loop3-52d2c18.stdout0000664000175000017500000000005015227365530025174 0ustar alastairalastairHello Hello Hello HHH Hello Hello Hello lfortran-0.64.0/tests/reference/ast-sole_intrinsic-1ce1e44.stdout0000664000175000017500000000463115227365530025051 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [(Declaration () [(SimpleAttribute AttrIntrinsic )] [(aimag [] [] () () None ()) (cmplx [] [] () () None ()) (real [] [] () () None ())] () ) (Declaration (AttrType TypeComplex [] () () None ) [] [(f [] [] () () None ())] () ) (Declaration (AttrType TypeComplex [] () () None ) [] [(x [] [] () (Complex (Real "1.0") (u- (Real "3.0"))) Equal ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(y [] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrIntrinsic )] [(mod [] [] () () None ())] () )] [(Assignment 0 f (FuncCallOrArray cmplx [] [(() 3 () 0) (() 1 () 0)] [] [] [] ) () ) (Assignment 0 y (FuncCallOrArray aimag [] [(() x () 0)] [] [] [] ) () )] [] )] ) lfortran-0.64.0/tests/reference/ast-selectrank1-5d08637.stdout0000664000175000017500000001310715227365530024111 0ustar alastairalastair(TranslationUnit [(Subroutine process [(x)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [] [(x [(() () AssumedRank)] [] () () None ())] () )] [(SelectRank 0 () () x [(RankExpr 0 () [(Assignment 0 x 0 () )] ) (RankExpr 2 () [(If 0 () (>= (FuncCallOrArray size [] [(() x () 0) (() 2 () 0)] [] [] [] ) 2) [(Assignment 0 (FuncCallOrArray x [] [(() () 1 0) (() 2 () 0)] [] [] [] ) 2 () )] [] () () () )] ) (RankDefault () [(Print 0 () [(String "i did not expect rank" ()) (FuncCallOrArray rank [] [(() x () 0)] [] [] [] ) (String "shape" ()) (FuncCallOrArray shape [] [(() x () 0)] [] [] [] )] () ) (ErrorStop 0 (String "process bad arg" ()) () () )] )] () () ) (Return 0 () () )] [] [] ) (Subroutine initialize [(arg) (size)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrContiguous )] [(arg [(() () AssumedRank)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(size [] [] () () None ()) (i [] [] () () None ())] () )] [(SelectRank 0 () () arg [(RankExpr 0 (TriviaNode [] [(EOLComment "! special case the scalar case" )] ) [(Assignment 0 arg (Real "0.0") () )] ) (RankStar () [(DoLoop 0 () 0 i 1 size () [(Assignment 0 (FuncCallOrArray arg [] [(() i () 0)] [] [] [] ) (Real "0.0") () )] () () )] )] () () ) (Return 0 () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-template_sort_02-0aa4518.stdout0000664000175000017500000106243615227365530025133 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_sort_02: (Program (SymbolTable 16 { lt_integer: (ExternalSymbol 16 lt_integer 5 lt_integer template_sort_02_m [] lt_integer Public ), lt_my_type: (ExternalSymbol 16 lt_my_type 2 lt_my_type template_sort_02_type [] lt_my_type Public ), lt_real: (ExternalSymbol 16 lt_real 5 lt_real template_sort_02_m [] lt_real Public ), my_type: (ExternalSymbol 16 my_type 2 my_type template_sort_02_type [] my_type Public ), op_r: (ExternalSymbol 16 op_r 5 op_r template_sort_02_m [] op_r Public ), quicksort: (ExternalSymbol 16 quicksort 5 quicksort template_sort_02_m [] quicksort Public ), swap: (ExternalSymbol 16 swap 5 swap template_sort_02_m [] swap Public ), test_template: (ExternalSymbol 16 test_template 5 test_template template_sort_02_m [] test_template Public ) }) template_sort_02 [template_sort_02_m template_sort_02_type] [(SubroutineCall 16 test_template () [] () .false. )] ), template_sort_02_m: (Module (SymbolTable 5 { lt_integer: (Function (SymbolTable 14 { lhs: (Variable 14 lhs [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 14 res [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 14 rhs [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) lt_integer (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 14 lhs) (Var 14 rhs)] [(Assignment (Var 14 res) (IntegerCompare (Var 14 lhs) Lt (Var 14 rhs) (Logical 4) () ) () .false. .false. )] (Var 14 res) Public .true. .true. () ), lt_my_type: (ExternalSymbol 5 lt_my_type 2 lt_my_type template_sort_02_type [] lt_my_type Public ), lt_real: (Function (SymbolTable 13 { lhs: (Variable 13 lhs [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 13 res [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 13 rhs [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) lt_real (FunctionType [(Real 4) (Real 4)] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 13 lhs) (Var 13 rhs)] [(Assignment (Var 13 res) (RealCompare (Var 13 lhs) Lt (Var 13 rhs) (Logical 4) () ) () .false. .false. )] (Var 13 res) Public .true. .true. () ), my_type: (ExternalSymbol 5 my_type 2 my_type template_sort_02_type [] my_type Public ), op_r: (Requirement (SymbolTable 6 { op_func: (Function (SymbolTable 7 { lhs: (Variable 7 lhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 7 res [] ReturnVar () () Default (TypeParameter v ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 7 rhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) op_func (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter v ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 7 lhs) (Var 7 rhs)] [] (Var 7 res) Public .true. .true. () ), t: (Variable 6 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 6 u [] In () () Default (TypeParameter u ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 6 v [] In () () Default (TypeParameter v ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) op_r [t u v op_func] [] ), quicksort: (Template (SymbolTable 10 { __instantiated_swap: (Function (SymbolTable 17 { lhs: (Variable 17 lhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 17 rhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 17 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 17 tmp [] Local () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_swap (FunctionType [(TypeParameter t ) (TypeParameter t )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 17 lhs) (Var 17 rhs)] [(Assignment (Var 17 tmp) (Var 17 lhs) () .false. .false. ) (Assignment (Var 17 lhs) (Var 17 rhs) () .false. .false. ) (Assignment (Var 17 rhs) (Var 17 tmp) () .false. .false. )] () Public .true. .true. () ), __instantiated_swap1: (Function (SymbolTable 18 { lhs: (Variable 18 lhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 18 rhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 18 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 18 tmp [] Local () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_swap1 (FunctionType [(TypeParameter t ) (TypeParameter t )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 18 lhs) (Var 18 rhs)] [(Assignment (Var 18 tmp) (Var 18 lhs) () .false. .false. ) (Assignment (Var 18 lhs) (Var 18 rhs) () .false. .false. ) (Assignment (Var 18 rhs) (Var 18 tmp) () .false. .false. )] () Public .true. .true. () ), logical: (Variable 10 logical [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lt: (Function (SymbolTable 11 { lhs: (Variable 11 lhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 11 res [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 11 rhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) lt (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 11 lhs) (Var 11 rhs)] [] (Var 11 res) Public .true. .true. () ), quicksort: (Function (SymbolTable 12 { arr: (Variable 12 arr [] InOut () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), high: (Variable 12 high [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 12 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 12 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 12 low [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pivot: (Variable 12 pivot [] Local () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) quicksort (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray ) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [lt __instantiated_swap __instantiated_swap1 quicksort] [(Var 12 arr) (Var 12 low) (Var 12 high)] [(If () (IntegerCompare (Var 12 low) Lt (Var 12 high) (Logical 4) () ) [(Assignment (Var 12 pivot) (ArrayItem (Var 12 arr) [(() (Var 12 high) ())] (TypeParameter t ) ColMajor () ) () .false. .false. ) (Assignment (Var 12 last) (IntegerBinOp (Var 12 low) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (DoLoop () ((Var 12 i) (Var 12 low) (IntegerBinOp (Var 12 high) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ()) [(If () (FunctionCall 10 lt () [((ArrayItem (Var 12 arr) [(() (Var 12 i) ())] (TypeParameter t ) ColMajor () )) ((Var 12 pivot))] (Logical 4) () () ) [(Assignment (Var 12 last) (IntegerBinOp (Var 12 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 10 __instantiated_swap () [((ArrayItem (Var 12 arr) [(() (Var 12 last) ())] (TypeParameter t ) ColMajor () )) ((ArrayItem (Var 12 arr) [(() (Var 12 i) ())] (TypeParameter t ) ColMajor () ))] () .false. )] [] )] [] ) (SubroutineCall 10 __instantiated_swap1 () [((ArrayItem (Var 12 arr) [(() (IntegerBinOp (Var 12 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (TypeParameter t ) ColMajor () )) ((ArrayItem (Var 12 arr) [(() (Var 12 high) ())] (TypeParameter t ) ColMajor () ))] () .false. ) (SubroutineCall 10 quicksort () [((ArrayPhysicalCast (Var 12 arr) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ())] DescriptorArray ) () )) ((Var 12 low)) ((Var 12 last))] () .false. ) (SubroutineCall 10 quicksort () [((ArrayPhysicalCast (Var 12 arr) DescriptorArray DescriptorArray (Array (TypeParameter t ) [(() ())] DescriptorArray ) () )) ((IntegerBinOp (Var 12 last) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((Var 12 high))] () .false. )] [] )] () Public .true. .true. () ), t: (Variable 10 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) quicksort [t lt] [(Require op_r [t logical lt] )] ), swap: (Template (SymbolTable 8 { swap: (Function (SymbolTable 9 { lhs: (Variable 9 lhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 9 rhs [] InOut () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 9 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 9 tmp [] Local () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) swap (FunctionType [(TypeParameter t ) (TypeParameter t )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 lhs) (Var 9 rhs)] [(Assignment (Var 9 tmp) (Var 9 lhs) () .false. .false. ) (Assignment (Var 9 lhs) (Var 9 rhs) () .false. .false. ) (Assignment (Var 9 rhs) (Var 9 tmp) () .false. .false. )] () Public .true. .true. () ), t: (Variable 8 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) swap [t] [] ), test_template: (Function (SymbolTable 15 { __asr___instantiated_swap: (Function (SymbolTable 20 { lhs: (Variable 20 lhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 20 rhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 20 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 20 tmp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 20 lhs) (Var 20 rhs)] [(Assignment (Var 20 tmp) (Var 20 lhs) () .false. .false. ) (Assignment (Var 20 lhs) (Var 20 rhs) () .false. .false. ) (Assignment (Var 20 rhs) (Var 20 tmp) () .false. .false. )] () Public .true. .true. () ), __asr___instantiated_swap1: (Function (SymbolTable 21 { lhs: (Variable 21 lhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 21 rhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 21 t [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 21 tmp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap1 (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 21 lhs) (Var 21 rhs)] [(Assignment (Var 21 tmp) (Var 21 lhs) () .false. .false. ) (Assignment (Var 21 lhs) (Var 21 rhs) () .false. .false. ) (Assignment (Var 21 rhs) (Var 21 tmp) () .false. .false. )] () Public .true. .true. () ), __asr___instantiated_swap11: (Function (SymbolTable 24 { lhs: (Variable 24 lhs [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 24 rhs [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 24 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 24 tmp [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap11 (FunctionType [(Real 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 24 lhs) (Var 24 rhs)] [(Assignment (Var 24 tmp) (Var 24 lhs) () .false. .false. ) (Assignment (Var 24 lhs) (Var 24 rhs) () .false. .false. ) (Assignment (Var 24 rhs) (Var 24 tmp) () .false. .false. )] () Public .true. .true. () ), __asr___instantiated_swap12: (Function (SymbolTable 27 { lhs: (Variable 27 lhs [] InOut () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 27 rhs [] InOut () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 27 t [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 27 tmp [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap12 (FunctionType [(StructType [(Real 4)] [] .true. .false. ) (StructType [(Real 4)] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 27 lhs) (Var 27 rhs)] [(Assignment (Var 27 tmp) (Var 27 lhs) () .false. .false. ) (Assignment (Var 27 lhs) (Var 27 rhs) () .false. .false. ) (Assignment (Var 27 rhs) (Var 27 tmp) () .false. .false. )] () Public .true. .true. () ), __asr___instantiated_swap2: (Function (SymbolTable 23 { lhs: (Variable 23 lhs [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 23 rhs [] InOut () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 23 t [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 23 tmp [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap2 (FunctionType [(Real 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 23 lhs) (Var 23 rhs)] [(Assignment (Var 23 tmp) (Var 23 lhs) () .false. .false. ) (Assignment (Var 23 lhs) (Var 23 rhs) () .false. .false. ) (Assignment (Var 23 rhs) (Var 23 tmp) () .false. .false. )] () Public .true. .true. () ), __asr___instantiated_swap3: (Function (SymbolTable 26 { lhs: (Variable 26 lhs [] InOut () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 26 rhs [] InOut () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 26 t [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 26 tmp [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __asr___instantiated_swap3 (FunctionType [(StructType [(Real 4)] [] .true. .false. ) (StructType [(Real 4)] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 26 lhs) (Var 26 rhs)] [(Assignment (Var 26 tmp) (Var 26 lhs) () .false. .false. ) (Assignment (Var 26 lhs) (Var 26 rhs) () .false. .false. ) (Assignment (Var 26 rhs) (Var 26 tmp) () .false. .false. )] () Public .true. .true. () ), __instantiated_quicksort: (Function (SymbolTable 19 { arr: (Variable 19 arr [] InOut () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), high: (Variable 19 high [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 19 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 19 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 19 low [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pivot: (Variable 19 pivot [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_quicksort (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [lt_integer __asr___instantiated_swap __asr___instantiated_swap1 __instantiated_quicksort] [(Var 19 arr) (Var 19 low) (Var 19 high)] [(If () (IntegerCompare (Var 19 low) Lt (Var 19 high) (Logical 4) () ) [(Assignment (Var 19 pivot) (ArrayItem (Var 19 arr) [(() (Var 19 high) ())] (Integer 4) ColMajor () ) () .false. .false. ) (Assignment (Var 19 last) (IntegerBinOp (Var 19 low) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (DoLoop () ((Var 19 i) (Var 19 low) (IntegerBinOp (Var 19 high) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ()) [(If () (FunctionCall 5 lt_integer () [((ArrayItem (Var 19 arr) [(() (Var 19 i) ())] (Integer 4) ColMajor () )) ((Var 19 pivot))] (Logical 4) () () ) [(Assignment (Var 19 last) (IntegerBinOp (Var 19 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 15 __asr___instantiated_swap () [((ArrayItem (Var 19 arr) [(() (Var 19 last) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 19 arr) [(() (Var 19 i) ())] (Integer 4) ColMajor () ))] () .false. )] [] )] [] ) (SubroutineCall 15 __asr___instantiated_swap1 () [((ArrayItem (Var 19 arr) [(() (IntegerBinOp (Var 19 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 19 arr) [(() (Var 19 high) ())] (Integer 4) ColMajor () ))] () .false. ) (SubroutineCall 15 __instantiated_quicksort () [((ArrayPhysicalCast (Var 19 arr) DescriptorArray DescriptorArray (Array (Integer 4) [(() ())] DescriptorArray ) () )) ((Var 19 low)) ((Var 19 last))] () .false. ) (SubroutineCall 15 __instantiated_quicksort () [((ArrayPhysicalCast (Var 19 arr) DescriptorArray DescriptorArray (Array (Integer 4) [(() ())] DescriptorArray ) () )) ((IntegerBinOp (Var 19 last) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((Var 19 high))] () .false. )] [] )] () Public .true. .true. () ), __instantiated_quicksort1: (Function (SymbolTable 22 { arr: (Variable 22 arr [] InOut () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), high: (Variable 22 high [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 22 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 22 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 22 low [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pivot: (Variable 22 pivot [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_quicksort1 (FunctionType [(Array (Real 4) [(() ())] DescriptorArray ) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [lt_real __asr___instantiated_swap2 __asr___instantiated_swap11 __instantiated_quicksort1] [(Var 22 arr) (Var 22 low) (Var 22 high)] [(If () (IntegerCompare (Var 22 low) Lt (Var 22 high) (Logical 4) () ) [(Assignment (Var 22 pivot) (ArrayItem (Var 22 arr) [(() (Var 22 high) ())] (Real 4) ColMajor () ) () .false. .false. ) (Assignment (Var 22 last) (IntegerBinOp (Var 22 low) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (DoLoop () ((Var 22 i) (Var 22 low) (IntegerBinOp (Var 22 high) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ()) [(If () (FunctionCall 5 lt_real () [((ArrayItem (Var 22 arr) [(() (Var 22 i) ())] (Real 4) ColMajor () )) ((Var 22 pivot))] (Logical 4) () () ) [(Assignment (Var 22 last) (IntegerBinOp (Var 22 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 15 __asr___instantiated_swap2 () [((ArrayItem (Var 22 arr) [(() (Var 22 last) ())] (Real 4) ColMajor () )) ((ArrayItem (Var 22 arr) [(() (Var 22 i) ())] (Real 4) ColMajor () ))] () .false. )] [] )] [] ) (SubroutineCall 15 __asr___instantiated_swap11 () [((ArrayItem (Var 22 arr) [(() (IntegerBinOp (Var 22 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () )) ((ArrayItem (Var 22 arr) [(() (Var 22 high) ())] (Real 4) ColMajor () ))] () .false. ) (SubroutineCall 15 __instantiated_quicksort1 () [((ArrayPhysicalCast (Var 22 arr) DescriptorArray DescriptorArray (Array (Real 4) [(() ())] DescriptorArray ) () )) ((Var 22 low)) ((Var 22 last))] () .false. ) (SubroutineCall 15 __instantiated_quicksort1 () [((ArrayPhysicalCast (Var 22 arr) DescriptorArray DescriptorArray (Array (Real 4) [(() ())] DescriptorArray ) () )) ((IntegerBinOp (Var 22 last) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((Var 22 high))] () .false. )] [] )] () Public .true. .true. () ), __instantiated_quicksort2: (Function (SymbolTable 25 { arr: (Variable 25 arr [] InOut () () Default (Array (StructType [(Real 4)] [] .true. .false. ) [(() ())] DescriptorArray ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), high: (Variable 25 high [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 25 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 25 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 25 low [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pivot: (Variable 25 pivot [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_quicksort2 (FunctionType [(Array (StructType [(Real 4)] [] .true. .false. ) [(() ())] DescriptorArray ) (Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [__asr___instantiated_swap3 __asr___instantiated_swap12 __instantiated_quicksort2] [(Var 25 arr) (Var 25 low) (Var 25 high)] [(If () (IntegerCompare (Var 25 low) Lt (Var 25 high) (Logical 4) () ) [(Assignment (Var 25 pivot) (ArrayItem (Var 25 arr) [(() (Var 25 high) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () ) () .false. .false. ) (Assignment (Var 25 last) (IntegerBinOp (Var 25 low) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (DoLoop () ((Var 25 i) (Var 25 low) (IntegerBinOp (Var 25 high) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ()) [(If () (FunctionCall 5 lt_my_type () [((ArrayItem (Var 25 arr) [(() (Var 25 i) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () )) ((Var 25 pivot))] (Logical 4) () () ) [(Assignment (Var 25 last) (IntegerBinOp (Var 25 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 15 __asr___instantiated_swap3 () [((ArrayItem (Var 25 arr) [(() (Var 25 last) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () )) ((ArrayItem (Var 25 arr) [(() (Var 25 i) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () ))] () .false. )] [] )] [] ) (SubroutineCall 15 __asr___instantiated_swap12 () [((ArrayItem (Var 25 arr) [(() (IntegerBinOp (Var 25 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () )) ((ArrayItem (Var 25 arr) [(() (Var 25 high) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () ))] () .false. ) (SubroutineCall 15 __instantiated_quicksort2 () [((ArrayPhysicalCast (Var 25 arr) DescriptorArray DescriptorArray (Array (StructType [(Real 4)] [] .true. .false. ) [(() ())] DescriptorArray ) () )) ((Var 25 low)) ((Var 25 last))] () .false. ) (SubroutineCall 15 __instantiated_quicksort2 () [((ArrayPhysicalCast (Var 25 arr) DescriptorArray DescriptorArray (Array (StructType [(Real 4)] [] .true. .false. ) [(() ())] DescriptorArray ) () )) ((IntegerBinOp (Var 25 last) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((Var 25 high))] () .false. )] [] )] () Public .true. .true. () ), i: (Variable 15 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), xi: (Variable 15 xi [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), xm: (Variable 15 xm [] Local () () Default (Array (StructType [(Real 4)] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) 5 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), xr: (Variable 15 xr [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 15 xi) (ArrayConstant 40 [2, 4, 1, ...., 3, 42, 2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 15 xr) (ArrayConstant 40 [2.00000000e+00, 4.00000000e+00, 1.00000000e+00, ...., 3.00000000e+00, 4.20000000e+01, 2.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (DoLoop () ((Var 15 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 15 xm) [(() (Var 15 i) ())] (StructType [(Real 4)] [] .true. .false. ) ColMajor () ) (StructConstructor 5 my_type [((ArrayItem (Var 15 xr) [(() (Var 15 i) ())] (Real 4) ColMajor () ))] (StructType [(Real 4)] [] .true. .false. ) () ) () .false. .false. )] [] ) (SubroutineCall 15 __instantiated_quicksort () [((ArrayPhysicalCast (Var 15 xi) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )) ((IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 10 (Integer 4) Decimal))] () .false. ) (SubroutineCall 15 __instantiated_quicksort1 () [((ArrayPhysicalCast (Var 15 xr) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )) ((IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 10 (Integer 4) Decimal))] () .false. ) (SubroutineCall 15 __instantiated_quicksort2 () [((ArrayPhysicalCast (Var 15 xm) FixedSizeArray DescriptorArray (Array (StructType [(Real 4)] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () )) ((IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 10 (Integer 4) Decimal))] () .false. ) (Print (StringFormat () [(Var 15 xi)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 15 xr)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 15 xm)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_sort_02_m () [template_sort_02_type template_sort_02_m] .false. .false. .false. ), template_sort_02_type: (Module (SymbolTable 2 { lt_my_type: (Function (SymbolTable 4 { 1_my_type_d: (ExternalSymbol 4 1_my_type_d 3 d template_sort_02_type [my_type] d Public ), lhs: (Variable 4 lhs [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) lt_my_type (FunctionType [(StructType [(Real 4)] [] .true. .false. ) (StructType [(Real 4)] [] .true. .false. )] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 4 lhs) (Var 4 rhs)] [(Assignment (Var 4 res) (RealCompare (StructInstanceMember (Var 4 lhs) 4 1_my_type_d (Real 4) () ) LtE (StructInstanceMember (Var 4 rhs) 4 1_my_type_d (Real 4) () ) (Logical 4) () ) () .false. .false. )] (Var 4 res) Public .true. .true. () ), my_type: (Struct (SymbolTable 3 { d: (Variable 3 d [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_type (StructType [(Real 4)] [] .true. .false. ) [] [d] [] Source Public .false. .false. .false. [] () () [] ) }) template_sort_02_type () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-doloop_03-d4372bd.stdout0000664000175000017500000003031115227365530024003 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc29 = alloca %string_descriptor, align 8 %stringFormat_desc17 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %j = alloca i32, align 4 store i32 0, i32* %j, align 4 store i32 0, i32* %i, align 4 br label %loop.head loop.head: ; preds = %ifcont3, %.entry %3 = load i32, i32* %i, align 4 %4 = add i32 %3, 1 %5 = icmp sle i32 %4, 10 br i1 %5, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %6 = load i32, i32* %i, align 4 %7 = add i32 %6, 1 store i32 %7, i32* %i, align 4 %8 = load i32, i32* %j, align 4 %9 = load i32, i32* %i, align 4 %10 = add i32 %8, %9 store i32 %10, i32* %j, align 4 %11 = load i32, i32* %i, align 4 %12 = icmp eq i32 %11, 3 br i1 %12, label %then, label %else then: ; preds = %loop.body br label %ifcont else: ; preds = %loop.body br label %ifcont ifcont: ; preds = %else, %then %13 = load i32, i32* %i, align 4 %14 = icmp eq i32 %13, 2 br i1 %14, label %then1, label %else2 then1: ; preds = %ifcont br label %loop.end unreachable_after_exit: ; No predecessors! br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %unreachable_after_exit br label %loop.head loop.end: ; preds = %then1, %loop.head %15 = load i32, i32* %j, align 4 %16 = icmp ne i32 %15, 3 br i1 %16, label %then4, label %else5 then4: ; preds = %loop.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %loop.end br label %ifcont6 ifcont6: ; preds = %else5, %then4 %17 = alloca i64, align 8 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %19 = load i64, i64* %17, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont6 call void @_lfortran_free_alloc(i8* %2, i8* %18) br label %free_done free_done: ; preds = %free_nonnull, %ifcont6 store i32 0, i32* %j, align 4 store i32 0, i32* %i, align 4 br label %loop.head7 loop.head7: ; preds = %ifcont12, %free_done %28 = load i32, i32* %i, align 4 %29 = add i32 %28, 1 %30 = icmp sle i32 %29, 10 br i1 %30, label %loop.body8, label %loop.end13 loop.body8: ; preds = %loop.head7 %31 = load i32, i32* %i, align 4 %32 = add i32 %31, 1 store i32 %32, i32* %i, align 4 %33 = load i32, i32* %i, align 4 %34 = icmp eq i32 %33, 2 br i1 %34, label %then9, label %else11 then9: ; preds = %loop.body8 br label %loop.end13 unreachable_after_exit10: ; No predecessors! br label %ifcont12 else11: ; preds = %loop.body8 br label %ifcont12 ifcont12: ; preds = %else11, %unreachable_after_exit10 %35 = load i32, i32* %j, align 4 %36 = load i32, i32* %i, align 4 %37 = add i32 %35, %36 store i32 %37, i32* %j, align 4 br label %loop.head7 loop.end13: ; preds = %then9, %loop.head7 %38 = load i32, i32* %j, align 4 %39 = icmp ne i32 %38, 1 br i1 %39, label %then14, label %else15 then14: ; preds = %loop.end13 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont16 else15: ; preds = %loop.end13 br label %ifcont16 ifcont16: ; preds = %else15, %then14 %40 = alloca i64, align 8 %41 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %40, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %42 = load i64, i64* %40, align 8 %43 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc17, i32 0, i32 0 store i8* %41, i8** %43, align 8 %44 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc17, i32 0, i32 1 store i64 %42, i64* %44, align 8 %45 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc17, i32 0, i32 0 %46 = load i8*, i8** %45, align 8 %47 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc17, i32 0, i32 1 %48 = load i64, i64* %47, align 8 %49 = trunc i64 %48 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %46, i32 %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %50 = icmp eq i8* %41, null br i1 %50, label %free_done19, label %free_nonnull18 free_nonnull18: ; preds = %ifcont16 call void @_lfortran_free_alloc(i8* %2, i8* %41) br label %free_done19 free_done19: ; preds = %free_nonnull18, %ifcont16 store i32 0, i32* %j, align 4 store i32 0, i32* %i, align 4 br label %loop.head20 loop.head20: ; preds = %ifcont24, %then22, %free_done19 %51 = load i32, i32* %i, align 4 %52 = add i32 %51, 1 %53 = icmp sle i32 %52, 10 br i1 %53, label %loop.body21, label %loop.end25 loop.body21: ; preds = %loop.head20 %54 = load i32, i32* %i, align 4 %55 = add i32 %54, 1 store i32 %55, i32* %i, align 4 %56 = load i32, i32* %i, align 4 %57 = icmp eq i32 %56, 2 br i1 %57, label %then22, label %else23 then22: ; preds = %loop.body21 br label %loop.head20 unreachable_after_cycle: ; No predecessors! br label %ifcont24 else23: ; preds = %loop.body21 br label %ifcont24 ifcont24: ; preds = %else23, %unreachable_after_cycle %58 = load i32, i32* %j, align 4 %59 = load i32, i32* %i, align 4 %60 = add i32 %58, %59 store i32 %60, i32* %j, align 4 br label %loop.head20 loop.end25: ; preds = %loop.head20 %61 = load i32, i32* %j, align 4 %62 = icmp ne i32 %61, 53 br i1 %62, label %then26, label %else27 then26: ; preds = %loop.end25 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont28 else27: ; preds = %loop.end25 br label %ifcont28 ifcont28: ; preds = %else27, %then26 %63 = alloca i64, align 8 %64 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %63, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %65 = load i64, i64* %63, align 8 %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc29, i32 0, i32 0 store i8* %64, i8** %66, align 8 %67 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc29, i32 0, i32 1 store i64 %65, i64* %67, align 8 %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc29, i32 0, i32 0 %69 = load i8*, i8** %68, align 8 %70 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc29, i32 0, i32 1 %71 = load i64, i64* %70, align 8 %72 = trunc i64 %71 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %69, i32 %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %73 = icmp eq i8* %64, null br i1 %73, label %free_done31, label %free_nonnull30 free_nonnull30: ; preds = %ifcont28 call void @_lfortran_free_alloc(i8* %2, i8* %64) br label %free_done31 free_done31: ; preds = %free_nonnull30, %ifcont28 br label %return return: ; preds = %free_done31 br label %FINALIZE_SYMTABLE_doloop_03 FINALIZE_SYMTABLE_doloop_03: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/asr-flush_invalid_kwarg1-9fc0c7b.json0000664000175000017500000000077015227365530025644 0ustar alastairalastair{ "basename": "asr-flush_invalid_kwarg1-9fc0c7b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/flush_invalid_kwarg1.f90", "infile_hash": "bdc773dad035cc26560f79155d871b9ca6c927b0f94ed47ab162d321", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-flush_invalid_kwarg1-9fc0c7b.stderr", "stderr_hash": "dba53e91602bf50354de524fc4de3525c7a64d318761b9fac931cfed", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-kind1-5b1b058.stderr0000664000175000017500000000017315227365530022727 0ustar alastairalastairsemantic error: Kind 3 is not supported for Real --> tests/errors/kind1.f90:4:10 | 4 | real(3) :: x | ^ lfortran-0.64.0/tests/reference/run-format_29-75ca0a0.json0000664000175000017500000000071515227365530023264 0ustar alastairalastair{ "basename": "run-format_29-75ca0a0", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_29.f90", "infile_hash": "aa0372ac3a2fd155e624df2b5e21032f0fea28f9b97dedb127fdaeb7", "outfile": null, "outfile_hash": null, "stdout": "run-format_29-75ca0a0.stdout", "stdout_hash": "4dab09a4ac764306403c70a659731bc69757ed28b130ef1d2d1f46d4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-types_04-513a7e4.json0000664000175000017500000000072515227365530023041 0ustar alastairalastair{ "basename": "cpp-types_04-513a7e4", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/types_04.f90", "infile_hash": "da21466af87608d5d323360a130e0a5542261d98fabaeebb5adc16d3", "outfile": null, "outfile_hash": null, "stdout": "cpp-types_04-513a7e4.stdout", "stdout_hash": "0da727ad563ef43d5a8a91a69c4e298aebf6ea8c22d103cf88493afe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_35-3cec85a.stdout0000664000175000017500000000006515227365530023723 0ustar alastairalastair a b c d e f g h i j k l m n o p q r s t u v w x y z lfortran-0.64.0/tests/reference/asr-complex_02-af31c89.stdout0000664000175000017500000002714215227365530024005 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { complex_02: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i_: (Variable 2 i_ [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 2 w [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) complex_02 [] [(Assignment (Var 2 x) (ComplexConstructor (RealConstant 1.000000 (Real 4) ) (RealUnaryMinus (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant -3.000000 (Real 4) ) ) (Complex 4) (ComplexConstant 1.000000 -3.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 a) (RealConstant 3.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 b) (RealConstant 4.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 i_) (ComplexConstructor (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (Complex 4) (ComplexConstant 0.000000 1.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 z) (ComplexBinOp (Cast (Var 2 a) RealToComplex (Complex 4) () () ) Add (ComplexBinOp (Var 2 i_) Mul (Cast (Var 2 b) RealToComplex (Complex 4) () () ) (Complex 4) () ) (Complex 4) () ) () .false. .false. ) (Assignment (Var 2 w) (ComplexBinOp (Cast (RealBinOp (Var 2 a) Add (Var 2 b) (Real 4) () ) RealToComplex (Complex 4) () () ) Add (ComplexBinOp (Var 2 i_) Mul (Cast (RealBinOp (Var 2 a) Sub (Var 2 b) (Real 4) () ) RealToComplex (Complex 4) () () ) (Complex 4) () ) (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (Var 2 z) (Var 2 w)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_13-07b50ad.json0000664000175000017500000000076115227365530024136 0ustar alastairalastair{ "basename": "asr-intrinsics_13-07b50ad", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_13.f90", "infile_hash": "71322461e1575230ec6b7f06378bb7a3d3f21a3575676307ac8ea762", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_13-07b50ad.stdout", "stdout_hash": "f2233dc65ce290694493d73e5ea5917457f2ae8c1cf772cd472307cd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-recursion_03-3285725.stdout0000664000175000017500000003167415227365530024323 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__sub1__x = global i32 0 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [12 x i8] c"S-DESC-7,I4\00", align 1 @string_const_data = private constant [7 x i8] c"before:" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data, i32 0, i32 0), i64 7 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [12 x i8] c"S-DESC-6,I4\00", align 1 @string_const_data.3 = private constant [6 x i8] c"after:" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([6 x i8], [6 x i8]* @string_const_data.3, i32 0, i32 0), i64 6 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.5 = private unnamed_addr constant [12 x i8] c"S-DESC-9,I4\00", align 1 @string_const_data.6 = private constant [9 x i8] c"x in getx" @string_const.7 = private global %string_descriptor <{ i8* getelementptr inbounds ([9 x i8], [9 x i8]* @string_const_data.6, i32 0, i32 0), i64 9 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.8 = private constant [7 x i8] c"in sub1" @string_const.9 = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data.8, i32 0, i32 0), i64 7 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.10 = private unnamed_addr constant [12 x i8] c"S-DESC-3,I4\00", align 1 @string_const_data.11 = private constant [3 x i8] c"r =" @string_const.12 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.11, i32 0, i32 0), i64 3 }> @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_recursion_03_solver(i32 ()* %f, i32* %iter) { .entry: %stringFormat_desc2 = alloca %string_descriptor, align 8 %call_arg_value1 = alloca i32, align 4 %call_arg_value = alloca i32, align 4 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %f_val = alloca i32, align 4 %solver = alloca i32, align 4 %1 = call i32 %f() store i32 %1, i32* %f_val, align 4 %2 = alloca i64, align 8 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %2, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* %f_val) %4 = load i64, i64* %2, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry store i32 2, i32* %call_arg_value, align 4 %13 = load i32, i32* %iter, align 4 %14 = sub i32 %13, 1 store i32 %14, i32* %call_arg_value1, align 4 %15 = call i32 @__module_recursion_03_sub1(i32* %call_arg_value, i32* %call_arg_value1) store i32 %15, i32* %solver, align 4 %16 = call i32 %f() store i32 %16, i32* %f_val, align 4 %17 = alloca i64, align 8 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.2, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.4, i32* %f_val) %19 = load i64, i64* %17, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done4, label %free_nonnull3 free_nonnull3: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %18) br label %free_done4 free_done4: ; preds = %free_nonnull3, %free_done br label %return return: ; preds = %free_done4 br label %FINALIZE_SYMTABLE_solver FINALIZE_SYMTABLE_solver: ; preds = %return %28 = load i32, i32* %solver, align 4 ret i32 %28 } declare i32 @f() define i32 @__module_recursion_03_solver_caller(i32 ()* %f, i32* %iter) { .entry: %solver_caller = alloca i32, align 4 %0 = call i32 @__module_recursion_03_solver(i32 ()* %f, i32* %iter) store i32 %0, i32* %solver_caller, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_solver_caller FINALIZE_SYMTABLE_solver_caller: ; preds = %return %1 = load i32, i32* %solver_caller, align 4 ret i32 %1 } declare i32 @f.1() define i32 @__module_recursion_03_sub1(i32* %y, i32* %iter) { .entry: %sub1 = alloca i32, align 4 %tmp = alloca i32, align 4 %x = alloca i32, align 4 %0 = load i32, i32* %y, align 4 store i32 %0, i32* %x, align 4 %1 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.9, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %1, i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %2 = load i32, i32* %iter, align 4 %3 = icmp eq i32 %2, 1 br i1 %3, label %then, label %else then: ; preds = %.entry store i32 1, i32* %sub1, align 4 br label %return unreachable_after_return: ; No predecessors! br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %unreachable_after_return %4 = load i32, i32* %x, align 4 store i32 %4, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %5 = call i32 @sub1.__module_recursion_03_getx() store i32 %5, i32* %tmp, align 4 %6 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %6, i32* %x, align 4 %7 = load i32, i32* %x, align 4 store i32 %7, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %8 = call i32 @__module_recursion_03_solver_caller(i32 ()* @sub1.__module_recursion_03_getx, i32* %iter) store i32 %8, i32* %sub1, align 4 %9 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %9, i32* %x, align 4 br label %return return: ; preds = %ifcont, %then br label %FINALIZE_SYMTABLE_sub1 FINALIZE_SYMTABLE_sub1: ; preds = %return %10 = load i32, i32* %sub1, align 4 ret i32 %10 } define i32 @sub1.__module_recursion_03_getx() { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %getx = alloca i32, align 4 %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.5, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.7, i32* @__module___lcompilers_created__nested_context__sub1__x) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry %12 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %12, i32* %getx, align 4 br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_getx FINALIZE_SYMTABLE_getx: ; preds = %return %13 = load i32, i32* %getx, align 4 ret i32 %13 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %call_arg_value1 = alloca i32, align 4 %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %r = alloca i32, align 4 store i32 3, i32* %call_arg_value, align 4 store i32 3, i32* %call_arg_value1, align 4 %3 = call i32 @__module_recursion_03_sub1(i32* %call_arg_value, i32* %call_arg_value1) store i32 %3, i32* %r, align 4 %4 = alloca i64, align 8 %5 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.10, i32 0, i32 0), i64* %4, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.12, i32* %r) %6 = load i64, i64* %4, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %5, i8** %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %6, i64* %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %10 = load i8*, i8** %9, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %12 = load i64, i64* %11, align 8 %13 = trunc i64 %12 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %14 = icmp eq i8* %5, null br i1 %14, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %5) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/x86-program_cmake_01-fc45ca9.json0000664000175000017500000000064315227365530024510 0ustar alastairalastair{ "basename": "x86-program_cmake_01-fc45ca9", "cmd": "lfortran --no-color --backend=x86 {infile} -o output", "infile": "tests/../integration_tests/program_cmake_01.f90", "infile_hash": "0e854d9b2ed613d6193d78290dc20a45ec66f60ab17e1c0229c3febe", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_check-32a1dba.json0000664000175000017500000000100615227365530024461 0ustar alastairalastair{ "basename": "asr-implicit_check-32a1dba", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/implicit_check.f90", "infile_hash": "4913776655a2aab98265358375f290eedb9b92a2ef7424536067345c", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_check-32a1dba.stdout", "stdout_hash": "f5db4bb18322b5946f9b1b07708d5aa93abb8f40b7505b8050412bed", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-arrays_01_logical-f19a63d.json0000664000175000017500000000100015227365530025124 0ustar alastairalastair{ "basename": "llvm-arrays_01_logical-f19a63d", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_logical.f90", "infile_hash": "494cd2aba8ceee4c9a0bddba4b51d7a4b0b3f817d92e8c0894e4b08b", "outfile": null, "outfile_hash": null, "stdout": "llvm-arrays_01_logical-f19a63d.stdout", "stdout_hash": "634c7c7cbfdcf0da8a22126a8a8d3cc204e97b8bb56e51368d4c36fa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_25-b0e87c0.json0000664000175000017500000000075015227365530023430 0ustar alastairalastair{ "basename": "asr-modules_25-b0e87c0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_25.f90", "infile_hash": "5354e419ff15c42c940ee6e22e7a2d6dd70b8aeba170fd2eb83da168", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_25-b0e87c0.stdout", "stdout_hash": "8dc0ca8ba73e072aca2b7b8c28bc4178b88f34c8eb92e9c7e1c38d7d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-print1-a173a20.json0000664000175000017500000000072215227365530023254 0ustar alastairalastair{ "basename": "ast_f90-print1-a173a20", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/print1.f90", "infile_hash": "b39169477bbb20a9f0fc581832d539c45122fbc253e90314075c6581", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-print1-a173a20.stdout", "stdout_hash": "e1464ab402d54ce71669c3f81dfcff8642f127a654b17ec4596b93f3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-continue_body_if_loop-406ed85.json0000664000175000017500000000077715227365530025764 0ustar alastairalastair{ "basename": "ast-continue_body_if_loop-406ed85", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/continue_body_if_loop.f", "infile_hash": "0b34e65df675e3b4009fe5659fbc93ca52002eb7781599ebb9fe7613", "outfile": null, "outfile_hash": null, "stdout": "ast-continue_body_if_loop-406ed85.stdout", "stdout_hash": "8a077924389c2cbf7a2e8f0698d99257e6ecdfbb365826848216163d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-iostat_constant_integer-4f6f5d4.stderr0000664000175000017500000000026415227365530026747 0ustar alastairalastairsemantic error: Non-variable expression for `iostat` --> tests/errors/iostat_constant_integer.f90:7:5 | 7 | read(buffer, *, iostat=ios) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-program_without_line_cc-78281a4.stdout0000664000175000017500000000015615227365530026601 0ustar alastairalastair(TranslationUnit [(Print 0 () [(String "OK" ())] () ) contains] ) lfortran-0.64.0/tests/reference/ast-program1-caa9665.json0000664000175000017500000000071515227365530023213 0ustar alastairalastair{ "basename": "ast-program1-caa9665", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/program1.f90", "infile_hash": "ec4ccdfed01d45648718ca57a9ceb3e5aa82e55e57d8906636902e7b", "outfile": null, "outfile_hash": null, "stdout": "ast-program1-caa9665.stdout", "stdout_hash": "0d118f67ddc1e7368ee04f80885a7ab69369f987486d8ea44a9ca808", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_open_close_read_write-a696eca.stdout0000664000175000017500000006154415227365530030721 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { open_close_read_write: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), lfortran_iomsg: (Variable 2 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lfortran_iomsg1: (Variable 2 lfortran_iomsg1 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), msg: (Variable 2 msg [] Local (StringConstant "Some error occured" (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "Some error occured" (String 1 (IntegerConstant 18 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 20 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p: (Variable 2 p [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), q: (Variable 2 q [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 2 u [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), u_ptr: (Variable 2 u_ptr [] Local () () Default (Pointer (Integer 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) open_close_read_write [] [(Associate (Var 2 u_ptr) (Var 2 u) ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 x) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Mul (RealConstant 0.100000 (Real 4) ) (Real 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 y) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (RealBinOp (IntrinsicElementalFunction Sin [(ArrayItem (Var 2 x) [(() (Var 2 i) ())] (Real 4) ColMajor () )] 0 (Real 4) () ) Mul (RealBinOp (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) Sub (IntrinsicElementalFunction Cos [(RealBinOp (ArrayItem (Var 2 x) [(() (Var 2 i) ())] (Real 4) ColMajor () ) Div (RealConstant 3.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) (Real 4) () ) (Real 4) () ) () .false. .false. )] [] ) (FileOpen 0 (Var 2 u_ptr) (StringConstant "open_close_read_write_data.dat" (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "replace" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () () () () () () () () () () ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) ()) [(FileWrite 0 (Var 2 u) (Var 2 lfortran_iomsg) () () [(StringFormat (StringConstant "(10F8.2)" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(ArrayItem (Var 2 x) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (ArrayItem (Var 2 y) [(() (Var 2 i) ())] (Real 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () )] [] ) (FileClose 0 (IntegerConstant 1 (Integer 4) Decimal) (Var 2 u) (Var 2 msg) (IntegerConstant 999 (Integer 4) Decimal) () ) (GoToTarget 999 999 ) (FileOpen 999 (IntegerConstant 2 (Integer 4) Decimal) (StringConstant "open_close_read_write_data.dat" (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "old" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () () () () () () () () () () ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) ()) [(FileRead 0 (IntegerConstant 2 (Integer 4) Decimal) () () () () () () () [(ArrayItem (Var 2 p) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (ArrayItem (Var 2 q) [(() (Var 2 i) ())] (Real 4) ColMajor () )] () .true. () () () )] [] ) (FileClose 0 (IntegerConstant 2 (Integer 4) Decimal) () () () () ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 100 (Integer 4) Decimal) ()) [(FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 2 lfortran_iomsg1) () () [(StringFormat () [(ArrayItem (Var 2 p) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (ArrayItem (Var 2 q) [(() (Var 2 i) ())] (Real 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-external_01-6754623.stdout0000664000175000017500000001756315227365530023747 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { foo: (Function (SymbolTable 2 { a: (Variable 2 a [] Out () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] In () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 5 { f_arg_0: (Variable 5 f_arg_0 [] Unspecified () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f_return_var_name: (Variable 5 f_return_var_name [] ReturnVar () () Default (Complex 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Complex 4)] (Complex 4) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 f_arg_0)] [] (Var 5 f_return_var_name) Public .false. .false. () ) }) foo (FunctionType [(Complex 4) (Complex 4) (FunctionType [(Complex 4)] (Complex 4) BindC Interface () .false. .false. .false. .false. .false. [] .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 a) (Var 2 b) (Var 2 f)] [(Assignment (Var 2 a) (FunctionCall 2 f () [((Var 2 b))] (Complex 4) () () ) () .false. .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-interface_05-5639d22.stdout0000664000175000017500000004523215227365530024141 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { interface_05: (Program (SymbolTable 5 { a: (ExternalSymbol 5 a 2 a interface_05_mod [] a Public ), a1@a: (ExternalSymbol 5 a1@a 2 a1 interface_05_mod [] a1 Public ), a2@a: (ExternalSymbol 5 a2@a 2 a2 interface_05_mod [] a2 Public ), a@a1: (ExternalSymbol 5 a@a1 2 a1 interface_05_mod [] a1 Private ), a@a2: (ExternalSymbol 5 a@a2 2 a2 interface_05_mod [] a2 Private ), i: (Variable 5 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 5 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) interface_05 [interface_05_mod] [(Assignment (Var 5 i) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 i) (FunctionCall 5 a@a1 5 a [((Var 5 i))] (Integer 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 5 i) NotEq (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 5 r) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 6.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 5 r) (FunctionCall 5 a@a2 5 a [((Var 5 r))] (Real 4) () () ) () .false. .false. ) (If () (RealCompare (Var 5 r) NotEq (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 7.000000 (Real 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 5 i) (IntegerConstant 7 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 i) (FunctionCall 5 a@a1 5 a [((Var 5 i))] (Integer 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 5 i) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ), interface_05_mod: (Module (SymbolTable 2 { a: (GenericProcedure 2 a [2 a1 2 a2] Public ), a1: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a1: (Variable 3 a1 [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a1 (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a)] [(Assignment (Var 3 a1) (IntegerBinOp (Var 3 a) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] (Var 3 a1) Public .true. .true. () ), a2: (Function (SymbolTable 4 { a: (Variable 4 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a2: (Variable 4 a2 [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a2 (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 a)] [(Assignment (Var 4 a2) (RealBinOp (Var 4 a) Add (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) (Real 4) () ) () .false. .false. )] (Var 4 a2) Public .true. .true. () ) }) interface_05_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-more_kwargs_than_acceptable_to_subroutine-a276855.json0000664000175000017500000000106715227365530032003 0ustar alastairalastair{ "basename": "asr-more_kwargs_than_acceptable_to_subroutine-a276855", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/more_kwargs_than_acceptable_to_subroutine.f90", "infile_hash": "53bcdc1ab7927132cd66432768e210576758731906f98e632f7d9874", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-more_kwargs_than_acceptable_to_subroutine-a276855.stderr", "stderr_hash": "17aa57c1237631cb4ad11a7f81f495e987f715d878fddd46a7b660c2", "returncode": 2 }lfortran-0.64.0/tests/reference/cpp-subroutine5-272e7be.stdout0000664000175000017500000000100615227365530024304 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations void add(float a, float b, float &c); // Implementations void add(float a, float b, float &c) { c = a + b; } lfortran-0.64.0/tests/reference/run-format_23-fdedfdb.json0000664000175000017500000000071515227365530023574 0ustar alastairalastair{ "basename": "run-format_23-fdedfdb", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_23.f90", "infile_hash": "ed10c322714afdc86cceeb03cfb60fce8c15d3b5e9c03df061e2ca56", "outfile": null, "outfile_hash": null, "stdout": "run-format_23-fdedfdb.stdout", "stdout_hash": "4a8f73290e4f60373242bec2b4360d8b5406de116f313eae712b6a57", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_11-83e9417.stderr0000664000175000017500000000053415227365530026025 0ustar alastairalastairruntime error: Array shape mismatch in assignment to 'e'. Tried to match size 4 of dimension 1 of LHS with size 2 of dimension 1 of RHS. Use '--realloc-lhs-arrays' option to reallocate LHS automatically. --> tests/errors/array_bounds_check_11.f90:9:5 | 9 | e = a + b | ^ LHS size is 4 | 9 | e = a + b | ^ RHS size is 2 lfortran-0.64.0/tests/reference/run-array16-b6f006f.json0000664000175000017500000000066215227365530022761 0ustar alastairalastair{ "basename": "run-array16-b6f006f", "cmd": "lfortran --no-color {infile}", "infile": "tests/array16.f90", "infile_hash": "dce0c722304d803515ce62f5177a5d6e6bb748f800cbfbd8cb90f9bb", "outfile": null, "outfile_hash": null, "stdout": "run-array16-b6f006f.stdout", "stdout_hash": "e5f93f612f4bffd6f23541ab4f791950fa2a66239520000641961c2c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-parsing_01-c9b84fe.stdout0000664000175000017500000001147015227365530024065 0ustar alastairalastair(TranslationUnit [(Module submodule (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(complex [] [] () 1 Equal ())] () ) (Interface (InterfaceHeader) () [(InterfaceProc (Subroutine function [(integer) (real)] [(SimpleAttribute AttrModule )] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(integer [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent Out )] [(real [] [] () () None ())] () )] [] [] [] ) )] )] [] [] ) (Submodule submodule () module (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Procedure function [] [(SimpleAttribute AttrModule )] () [] [] [] [] [(Assignment 0 real (* 2 integer) () )] [] )] ) (Program program (TriviaNode [(EndOfLine) (EndOfLine)] [] ) [(Use [] submodule [(UseSymbol complex character ) (UseSymbol function subroutine )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(integer [] [] () () None ()) (real [] [] () () None ())] () )] [(Assignment 0 integer character () ) (AssociateBlock 0 associate [(logical [] [] () character Arrow ()) (complex [] [] () real Arrow ())] [(SubroutineCall 0 subroutine [] [(() logical () 0) (() complex () 0)] [] [] () ) (Print 0 () [(Parenthesis complex )] () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/run-array_bounds_check_14-8de1244.json0000664000175000017500000000074315227365530025547 0ustar alastairalastair{ "basename": "run-array_bounds_check_14-8de1244", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_14.f90", "infile_hash": "903c2c243c58a9f5be4755cc907a5af3c34f90078c03dd8850a7e932", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_14-8de1244.stderr", "stderr_hash": "ea18e894d1ce9f5e6c92334962a28c33e8f34a265e597f38db4f15f5", "returncode": 1 }lfortran-0.64.0/tests/reference/llvm-write3-49c0266.json0000664000175000017500000000071215227365530022717 0ustar alastairalastair{ "basename": "llvm-write3-49c0266", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/write3.f90", "infile_hash": "18ea0138e234c907c606aa064960397fc7dd75f1f2fab0ca42f74c13", "outfile": null, "outfile_hash": null, "stdout": "llvm-write3-49c0266.stdout", "stdout_hash": "5ac63f8009c1144c7d0e4184260bf30246bad72199eae07f6f285481", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-loop_test3-f4e458f.json0000664000175000017500000000073615227365530023570 0ustar alastairalastair{ "basename": "ast-loop_test3-f4e458f", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop_test3.f", "infile_hash": "563e057e78a555b01f0ba784adcca08cd39669ac229fc2d62af5f13a", "outfile": null, "outfile_hash": null, "stdout": "ast-loop_test3-f4e458f.stdout", "stdout_hash": "c1ea5142131bb85d6cf2b1ae1d2c458f8b43166e8d2051b323404151", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_01_pack-6c829d9.json0000664000175000017500000000076115227365530024030 0ustar alastairalastair{ "basename": "asr-array_01_pack-6c829d9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_01_pack.f90", "infile_hash": "02d7dd22ece04cc492f6d7bb57b8d91a311419e3fab2294a2c809d22", "outfile": null, "outfile_hash": null, "stdout": "asr-array_01_pack-6c829d9.stdout", "stdout_hash": "a41fa75f75c898c0839fe41041431fe7d2dc6abcdca93c7c6e51ce39", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-block_02-1362742.stdout0000664000175000017500000000047415227365530023520 0ustar alastairalastairfunction square(b::Int32) local result::Int32 result = b * b println(result) end function main() local a::Int32 a = 10 @label label_1 let b::Int32 a = a + 5 if a == 15 @goto label_1 end b = a ÷ 2 square(b) end end main() lfortran-0.64.0/tests/reference/llvm-types_01-642cab3.json0000664000175000017500000000074515227365530023303 0ustar alastairalastair{ "basename": "llvm-types_01-642cab3", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/types_01.f90", "infile_hash": "1987d8bcc6219e1bf0134a0123e23d9e02a0a8efb6989074d1537f46", "outfile": null, "outfile_hash": null, "stdout": "llvm-types_01-642cab3.stdout", "stdout_hash": "497d05d87dbced2d3c9eb49cd730d4c8b5b51e6a95b4330dbb8bb43d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_op_simplifier_test-ba92920.stdout0000664000175000017500000002107215227365530027041 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Allocate [((Var 2 d) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] () () ())] () () () ) (Assignment (Var 2 d) (RealBinOp (RealBinOp (Var 2 a) Add (Var 2 b) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) Add (ArrayBroadcast (Var 2 c) (ArrayConstant 8 [5, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-doconcurrentloop_01-ebe9543.json0000664000175000017500000000101615227365530026035 0ustar alastairalastair{ "basename": "ast_f90-doconcurrentloop_01-ebe9543", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/doconcurrentloop_01.f90", "infile_hash": "467f7dbdb5186badc19797a42685003effc780bd17088ab9fcc27efb", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-doconcurrentloop_01-ebe9543.stdout", "stdout_hash": "bbcd3ccdc8b250286bfc3b3c0766dea1f078a6e9bc5b3e732fc44e5d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-data_implied_do3-831f843.stderr0000664000175000017500000000030615227365530025032 0ustar alastairalastairsemantic error: The start variable of the data implied do loop must be constants --> tests/errors/data_implied_do3.f90:5:21 | 5 | data(iarx(i), i=k, 3) / 1, 2, 3 / | ^ lfortran-0.64.0/tests/reference/ast-case_02-cf1eb8d.json0000664000175000017500000000073715227365530023041 0ustar alastairalastair{ "basename": "ast-case_02-cf1eb8d", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_02.f90", "infile_hash": "76d3020fba89787d565870ed03c1b5e8914d12b062cb9ca7a8c37550", "outfile": null, "outfile_hash": null, "stdout": "ast-case_02-cf1eb8d.stdout", "stdout_hash": "2e5de1b8f68962eb6066ffec0ed52e76873db31cbbe5305b5104fac3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-complex_02-af31c89.json0000664000175000017500000000075015227365530023430 0ustar alastairalastair{ "basename": "asr-complex_02-af31c89", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_02.f90", "infile_hash": "c5e28327787e2c4dd5e42cc1c527749eb2e7b7f27623222a118f3bbe", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_02-af31c89.stdout", "stdout_hash": "be514f1d9304560dc866b757349ea7ca6c16f2dcd3db561b42444d31", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-types_05-fa1bde9.json0000664000175000017500000000074215227365530023266 0ustar alastairalastair{ "basename": "asr-types_05-fa1bde9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_05.f90", "infile_hash": "96f8e950abafbc42b9d0438efdca0a8355bb2bd7b4b168ee23063521", "outfile": null, "outfile_hash": null, "stdout": "asr-types_05-fa1bde9.stdout", "stdout_hash": "75fd2c3454128378a86130051eec68a64bc51db8d9544c1e2b96cbc3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-flush2-9767ece.stdout0000664000175000017500000000415515227365530023252 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { flush2: (Program (SymbolTable 2 { }) flush2 [] [(Flush 0 (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) () () () ) (FileOpen 0 (IntegerConstant 10 (Integer 4) Decimal) (StringConstant "file_01_data.txt" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () () () () () () () () () () () ) (Flush 0 (IntegerConstant 10 (Integer 4) Decimal) () () () ) (Flush 0 (IntegerUnaryMinus (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) (IntegerConstant -1 (Integer 4) Decimal) ) () () () )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit6-061f8e3.json0000664000175000017500000000106215227365530023273 0ustar alastairalastair{ "basename": "asr-implicit6-061f8e3", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit6.f90", "infile_hash": "ec52eac2f61928998941f6ef5395e23263fedec17cbec758e10e24ef", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit6-061f8e3.stdout", "stdout_hash": "0ac5afb76e476ae8b708a34cb1634d648d9eb0ab0c2e2c2dfb78e54e", "stderr": "asr-implicit6-061f8e3.stderr", "stderr_hash": "3dae74d301e53effbbe322b0da76528b0a55ed4a7d3d784ca7da3e51", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-call1-ae0bbbd.stdout0000664000175000017500000000507615227365530023236 0ustar alastairalastair(TranslationUnit [(Program call1 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(callf [] [] () () None ())] () )] [(SubroutineCall 0 f [] [] [] [] () ) (SubroutineCall 0 f [] [] [] [] () ) (Assignment 0 callf 5 () ) (SubroutineCall 0 f_s [] [(() 3 () 0) (() 2 () 0)] [] [] () ) (Assignment 0 (FuncCallOrArray callf_s [] [(() 3 () 0) (() 2 () 0)] [] [] [] ) 5 () ) (SubroutineCall 0 f_s [] [(() 3 () 0) (() 2 () 0) (() (FuncCallOrArray f [] [(() (String "(" ()) () 0)] [] [] [] ) () 0)] [] [] () ) (Assignment 0 (FuncCallOrArray callf_s [] [(() 3 () 0) (() 2 () 0) (() (FuncCallOrArray f [] [(() (String "(" ()) () 0)] [] [] [] ) () 0)] [] [] [] ) 5 () )] [] )] ) lfortran-0.64.0/tests/reference/asr-implicit_typing4-df7d614.stderr0000664000175000017500000000032615227365530025302 0ustar alastairalastairsemantic error: Dummy argument 'matvect' not defined --> tests/errors/implicit_typing4.f90:1:1 - 3:3 | 1 | subroutine iddr_rsvd(matvect) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ... | 3 | end | ...^^^ lfortran-0.64.0/tests/reference/asr-intrinsics_02-1c20d1a.stdout0000664000175000017500000004447015227365530024503 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_02: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (IntrinsicElementalFunction Sin [(RealConstant 1.500000 (Real 4) )] 0 (Real 4) (RealConstant 0.997495 (Real 4) ) ) (RealConstant 0.997495 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_02 [] [(Assignment (Var 2 y) (Cast (IntrinsicElementalFunction Sin [(RealConstant 1.500000 (Real 4) )] 0 (Real 4) (RealConstant 0.997495 (Real 4) ) ) RealToReal (Real 8) (RealConstant 0.997495 (Real 8) ) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (Var 2 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealConstant 0.997495 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Sin [(Var 2 x)] 0 (Real 4) () ) Sub (RealConstant 0.840115 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 y) Sub (Cast (RealConstant 0.997495 (Real 4) ) RealToReal (Real 8) (RealConstant 0.997495 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Sin [(RealBinOp (IntrinsicElementalFunction Sin [(RealConstant 1.500000 (Real 4) )] 0 (Real 4) (RealConstant 0.997495 (Real 4) ) ) Add (IntrinsicElementalFunction Sin [(RealBinOp (RealConstant 0.500000 (Real 4) ) Add (IntrinsicElementalFunction Sin [(RealConstant 0.500000 (Real 4) )] 0 (Real 4) (RealConstant 0.479426 (Real 4) ) ) (Real 4) (RealConstant 0.979426 (Real 4) ) )] 0 (Real 4) (RealConstant 0.830177 (Real 4) ) ) (Real 4) (RealConstant 1.827672 (Real 4) ) )] 0 (Real 4) (RealConstant 0.967188 (Real 4) ) ) Sub (RealConstant 0.967188 (Real 4) ) (Real 4) (RealConstant -0.000000 (Real 4) ) )] 0 (Real 4) (RealConstant 0.000000 (Real 4) ) ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (IntrinsicElementalFunction Sin [(RealBinOp (IntrinsicElementalFunction Sin [(Var 2 y)] 0 (Real 8) () ) Add (Cast (IntrinsicElementalFunction Sin [(RealBinOp (Var 2 x) Add (IntrinsicElementalFunction Sin [(Var 2 x)] 0 (Real 4) () ) (Real 4) () )] 0 (Real 4) () ) RealToReal (Real 8) () () ) (Real 8) () )] 0 (Real 8) () ) Sub (Cast (RealConstant 0.972762 (Real 4) ) RealToReal (Real 8) (RealConstant 0.972762 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-unlimited_polymorphic_intrinsic_type_allocate-3e26601.json0000664000175000017500000000107715227365530033106 0ustar alastairalastair{ "basename": "llvm-unlimited_polymorphic_intrinsic_type_allocate-3e26601", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/unlimited_polymorphic_intrinsic_type_allocate.f90", "infile_hash": "5e3fd98f08d2d9173c3610e43114224b2865c77917c3c0faa1951861", "outfile": null, "outfile_hash": null, "stdout": "llvm-unlimited_polymorphic_intrinsic_type_allocate-3e26601.stdout", "stdout_hash": "3126adfc39caf17c06b21a415600fcdfa30ec8b502ac0438449e3025", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-doloop_04-e25bf76.stdout0000664000175000017500000003727615227365530024034 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__do_loop_inc = alloca i32, align 4 %__do_loop_inc1 = alloca i32, align 4 %__do_loop_inc2 = alloca i32, align 4 %i = alloca i32, align 4 %j = alloca i32, align 4 %k = alloca i32, align 4 store i32 0, i32* %j, align 4 store i32 2, i32* %k, align 4 %3 = load i32, i32* %k, align 4 store i32 %3, i32* %__do_loop_inc, align 4 %4 = load i32, i32* %__do_loop_inc, align 4 %5 = sub i32 1, %4 store i32 %5, i32* %i, align 4 br label %loop.head loop.head: ; preds = %loop.body, %.entry %6 = load i32, i32* %__do_loop_inc, align 4 %7 = icmp sgt i32 %6, 0 %8 = load i32, i32* %i, align 4 %9 = load i32, i32* %__do_loop_inc, align 4 %10 = add i32 %8, %9 %11 = icmp sle i32 %10, 10 %12 = and i1 %7, %11 %13 = load i32, i32* %__do_loop_inc, align 4 %14 = icmp sle i32 %13, 0 %15 = load i32, i32* %i, align 4 %16 = load i32, i32* %__do_loop_inc, align 4 %17 = add i32 %15, %16 %18 = icmp sge i32 %17, 10 %19 = and i1 %14, %18 %20 = or i1 %12, %19 br i1 %20, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %21 = load i32, i32* %i, align 4 %22 = load i32, i32* %__do_loop_inc, align 4 %23 = add i32 %21, %22 store i32 %23, i32* %i, align 4 %24 = load i32, i32* %j, align 4 %25 = load i32, i32* %i, align 4 %26 = add i32 %24, %25 store i32 %26, i32* %j, align 4 br label %loop.head loop.end: ; preds = %loop.head %27 = load i32, i32* %j, align 4 %28 = icmp ne i32 %27, 25 br i1 %28, label %then, label %else then: ; preds = %loop.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %loop.end br label %ifcont ifcont: ; preds = %else, %then %29 = alloca i64, align 8 %30 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %29, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %31 = load i64, i64* %29, align 8 %32 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %30, i8** %32, align 8 %33 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %31, i64* %33, align 8 %34 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %35 = load i8*, i8** %34, align 8 %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %37 = load i64, i64* %36, align 8 %38 = trunc i64 %37 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %35, i32 %38, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %39 = icmp eq i8* %30, null br i1 %39, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont call void @_lfortran_free_alloc(i8* %2, i8* %30) br label %free_done free_done: ; preds = %free_nonnull, %ifcont store i32 0, i32* %j, align 4 store i32 -2, i32* %k, align 4 %40 = load i32, i32* %k, align 4 store i32 %40, i32* %__do_loop_inc1, align 4 %41 = load i32, i32* %__do_loop_inc1, align 4 %42 = sub i32 10, %41 store i32 %42, i32* %i, align 4 br label %loop.head1 loop.head1: ; preds = %loop.body2, %free_done %43 = load i32, i32* %__do_loop_inc1, align 4 %44 = icmp sgt i32 %43, 0 %45 = load i32, i32* %i, align 4 %46 = load i32, i32* %__do_loop_inc1, align 4 %47 = add i32 %45, %46 %48 = icmp sle i32 %47, 1 %49 = and i1 %44, %48 %50 = load i32, i32* %__do_loop_inc1, align 4 %51 = icmp sle i32 %50, 0 %52 = load i32, i32* %i, align 4 %53 = load i32, i32* %__do_loop_inc1, align 4 %54 = add i32 %52, %53 %55 = icmp sge i32 %54, 1 %56 = and i1 %51, %55 %57 = or i1 %49, %56 br i1 %57, label %loop.body2, label %loop.end3 loop.body2: ; preds = %loop.head1 %58 = load i32, i32* %i, align 4 %59 = load i32, i32* %__do_loop_inc1, align 4 %60 = add i32 %58, %59 store i32 %60, i32* %i, align 4 %61 = load i32, i32* %j, align 4 %62 = load i32, i32* %i, align 4 %63 = add i32 %61, %62 store i32 %63, i32* %j, align 4 br label %loop.head1 loop.end3: ; preds = %loop.head1 %64 = load i32, i32* %j, align 4 %65 = icmp ne i32 %64, 30 br i1 %65, label %then4, label %else5 then4: ; preds = %loop.end3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %loop.end3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 %66 = alloca i64, align 8 %67 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %66, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %j) %68 = load i64, i64* %66, align 8 %69 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %67, i8** %69, align 8 %70 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %68, i64* %70, align 8 %71 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %72 = load i8*, i8** %71, align 8 %73 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %74 = load i64, i64* %73, align 8 %75 = trunc i64 %74 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %72, i32 %75, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %76 = icmp eq i8* %67, null br i1 %76, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %ifcont6 call void @_lfortran_free_alloc(i8* %2, i8* %67) br label %free_done9 free_done9: ; preds = %free_nonnull8, %ifcont6 store i32 0, i32* %j, align 4 store i32 0, i32* %i, align 4 br label %a.head a.head: ; preds = %ifcont12, %free_done9 %77 = load i32, i32* %i, align 4 %78 = add i32 %77, 1 %79 = icmp sle i32 %78, 10 br i1 %79, label %a.body, label %a.end a.body: ; preds = %a.head %80 = load i32, i32* %i, align 4 %81 = add i32 %80, 1 store i32 %81, i32* %i, align 4 %82 = load i32, i32* %j, align 4 %83 = load i32, i32* %i, align 4 %84 = add i32 %82, %83 store i32 %84, i32* %j, align 4 %85 = load i32, i32* %i, align 4 %86 = icmp eq i32 %85, 2 br i1 %86, label %then10, label %else11 then10: ; preds = %a.body br label %a.end unreachable_after_exit: ; No predecessors! br label %ifcont12 else11: ; preds = %a.body br label %ifcont12 ifcont12: ; preds = %else11, %unreachable_after_exit br label %a.head a.end: ; preds = %then10, %a.head %87 = load i32, i32* %j, align 4 %88 = icmp ne i32 %87, 3 br i1 %88, label %then13, label %else14 then13: ; preds = %a.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %a.end br label %ifcont15 ifcont15: ; preds = %else14, %then13 store i32 0, i32* %j, align 4 store i32 -1, i32* %i, align 4 br label %b.head b.head: ; preds = %ifcont19, %ifcont15 %89 = load i32, i32* %i, align 4 %90 = add i32 %89, 2 %91 = icmp sle i32 %90, 10 br i1 %91, label %b.body, label %b.end b.body: ; preds = %b.head %92 = load i32, i32* %i, align 4 %93 = add i32 %92, 2 store i32 %93, i32* %i, align 4 %94 = load i32, i32* %j, align 4 %95 = load i32, i32* %i, align 4 %96 = add i32 %94, %95 store i32 %96, i32* %j, align 4 %97 = load i32, i32* %i, align 4 %98 = icmp eq i32 %97, 3 br i1 %98, label %then16, label %else18 then16: ; preds = %b.body br label %b.end unreachable_after_exit17: ; No predecessors! br label %ifcont19 else18: ; preds = %b.body br label %ifcont19 ifcont19: ; preds = %else18, %unreachable_after_exit17 br label %b.head b.end: ; preds = %then16, %b.head %99 = load i32, i32* %j, align 4 %100 = icmp ne i32 %99, 4 br i1 %100, label %then20, label %else21 then20: ; preds = %b.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont22 else21: ; preds = %b.end br label %ifcont22 ifcont22: ; preds = %else21, %then20 store i32 0, i32* %j, align 4 store i32 1, i32* %i, align 4 br label %c.head c.head: ; preds = %ifcont26, %ifcont22 br i1 true, label %c.body, label %c.end c.body: ; preds = %c.head %101 = load i32, i32* %j, align 4 %102 = load i32, i32* %i, align 4 %103 = add i32 %101, %102 store i32 %103, i32* %j, align 4 %104 = load i32, i32* %i, align 4 %105 = icmp eq i32 %104, 2 br i1 %105, label %then23, label %else25 then23: ; preds = %c.body br label %c.end unreachable_after_exit24: ; No predecessors! br label %ifcont26 else25: ; preds = %c.body br label %ifcont26 ifcont26: ; preds = %else25, %unreachable_after_exit24 %106 = load i32, i32* %i, align 4 %107 = add i32 %106, 1 store i32 %107, i32* %i, align 4 br label %c.head c.end: ; preds = %then23, %c.head %108 = load i32, i32* %j, align 4 %109 = icmp ne i32 %108, 3 br i1 %109, label %then27, label %else28 then27: ; preds = %c.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont29 else28: ; preds = %c.end br label %ifcont29 ifcont29: ; preds = %else28, %then27 store i32 2, i32* %k, align 4 %110 = load i32, i32* %k, align 4 store i32 %110, i32* %__do_loop_inc2, align 4 %111 = load i32, i32* %__do_loop_inc2, align 4 %112 = sub i32 1, %111 store i32 %112, i32* %i, align 4 br label %loop.head30 loop.head30: ; preds = %goto_target, %ifcont29 %113 = load i32, i32* %__do_loop_inc2, align 4 %114 = icmp sgt i32 %113, 0 %115 = load i32, i32* %i, align 4 %116 = load i32, i32* %__do_loop_inc2, align 4 %117 = add i32 %115, %116 %118 = icmp sle i32 %117, 10 %119 = and i1 %114, %118 %120 = load i32, i32* %__do_loop_inc2, align 4 %121 = icmp sle i32 %120, 0 %122 = load i32, i32* %i, align 4 %123 = load i32, i32* %__do_loop_inc2, align 4 %124 = add i32 %122, %123 %125 = icmp sge i32 %124, 10 %126 = and i1 %121, %125 %127 = or i1 %119, %126 br i1 %127, label %loop.body31, label %loop.end32 loop.body31: ; preds = %loop.head30 %128 = load i32, i32* %i, align 4 %129 = load i32, i32* %__do_loop_inc2, align 4 %130 = add i32 %128, %129 store i32 %130, i32* %i, align 4 br label %goto_target goto_target: ; preds = %loop.body31 br label %loop.head30 loop.end32: ; preds = %loop.head30 br label %return return: ; preds = %loop.end32 br label %FINALIZE_SYMTABLE_doloop_04 FINALIZE_SYMTABLE_doloop_04: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/asr-associate_03-bc2b027.stdout0000664000175000017500000001471415227365530024276 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { associate_03: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p1: (Variable 2 p1 [] Local () () Default (Pointer (Integer 4) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 2 t1 [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ), t2: (Variable 2 t2 [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .true. .false. () .false. .false. NotMethod () [] ) }) associate_03 [] [(Print (StringFormat () [(Var 2 t1) (Var 2 t2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 t1) Gt (Var 2 t2) (Logical 4) () ) [(Associate (Var 2 p1) (Var 2 t1) )] [(Associate (Var 2 p1) (Var 2 t2) )] ) (Print (StringFormat () [(Var 2 p1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (Var 2 p1) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Eq (Var 2 t2) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-derived_types_32-4684b97.json0000664000175000017500000000077515227365530024677 0ustar alastairalastair{ "basename": "llvm-derived_types_32-4684b97", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_32.f90", "infile_hash": "39d5cc6685aacdb41dd366f4a5147c66847cad929d59546701732401", "outfile": null, "outfile_hash": null, "stdout": "llvm-derived_types_32-4684b97.stdout", "stdout_hash": "a85bb846d5580291fbd2a7412b3d1cec7ca8c82fdb982ac977c50b5c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-open_notimplemented_kwarg1-24818cb.stdout0000664000175000017500000000301115227365530027260 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { open_notimplemented_kwargs: (Program (SymbolTable 2 { }) open_notimplemented_kwargs [] [(FileOpen 0 (IntegerConstant 10 (Integer 4) Decimal) (StringConstant "file_01_data.txt" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "old" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () (StringConstant "read" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () () () () () () () () () () )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_loop_unroll-loop_unroll_large-8723774.stdout0000664000175000017500000025574615227365530030164 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { loop_unroll_large: (Program (SymbolTable 2 { array: (Variable 2 array [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), first: (Variable 2 first [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 2 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) loop_unroll_large [] [(Allocate [((Var 2 array) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 35 (Integer 4) Decimal))] () () ())] () () () ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 32 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop () (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 32 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(ArrayItem (Var 2 array) [(() (Var 2 i) ())] (Integer 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-array_bounds_check_04-2e3d8fb.json0000664000175000017500000000074315227365530025710 0ustar alastairalastair{ "basename": "run-array_bounds_check_04-2e3d8fb", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_04.f90", "infile_hash": "daa672fe4c03715eb861e1221cb21768fb0b297213ccbe906ea2871c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_04-2e3d8fb.stderr", "stderr_hash": "f264953961ec266c4921c4bbb5029374f7c651c00180dfc87ce5fe18", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-idint_real4-b5321a5.json0000664000175000017500000000073515227365530023565 0ustar alastairalastair{ "basename": "asr-idint_real4-b5321a5", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/idint_real4.f90", "infile_hash": "bd122b4a77e689953e6ee65cb703713f546485a4104e5985208c98e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-idint_real4-b5321a5.stderr", "stderr_hash": "3eda84427fd2599286c76e6f20adfe2b7e1d404a35ec18616acefe58", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-maskr_incorrect_bit_size-0d2cb26.json0000664000175000017500000000100415227365530026512 0ustar alastairalastair{ "basename": "asr-maskr_incorrect_bit_size-0d2cb26", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/maskr_incorrect_bit_size.f90", "infile_hash": "55ab6743eeb879b04470a9eafcb50e5fc4b79731f759b1bb0f41d6b2", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-maskr_incorrect_bit_size-0d2cb26.stderr", "stderr_hash": "245a1c253a53c1c9b0e01daf29fa89c70f4bcea5c93cb74c0d1b0818", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-flush2-9767ece.json0000664000175000017500000000102415227365530022671 0ustar alastairalastair{ "basename": "asr-flush2-9767ece", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/flush2.f90", "infile_hash": "e4912e2bc379b34e493cdd9c89f76794bb32113af915d2ca96793675", "outfile": null, "outfile_hash": null, "stdout": "asr-flush2-9767ece.stdout", "stdout_hash": "eae607a1f4445cf5d71d0fffe0a1513a389e24fbd8a1288f0328892e", "stderr": "asr-flush2-9767ece.stderr", "stderr_hash": "9a387f3a8657746f5eb56f5e5a03771cfe161a73d9fb1a50cc03e6ae", "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-allocate_03-495d621.json0000664000175000017500000000075615227365530023601 0ustar alastairalastair{ "basename": "llvm-allocate_03-495d621", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/allocate_03.f90", "infile_hash": "1f3440c7b139aaa793981c1458c516ddc41106d2950a39f47077b0f5", "outfile": null, "outfile_hash": null, "stdout": "llvm-allocate_03-495d621.stdout", "stdout_hash": "934b2bee5ecc9890b46ec3aff03c112054d106bdfdbeefab8b96c5c2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-logical2-94a2259.stdout0000664000175000017500000000471715227365530023562 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [26 x i8] c"Line 1 - Condition is true" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([26 x i8], [26 x i8]* @string_const_data, i32 0, i32 0), i64 26 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.1 = private constant [27 x i8] c"Line 1 - Condition is false" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([27 x i8], [27 x i8]* @string_const_data.1, i32 0, i32 0), i64 27 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %a = alloca i32, align 4 %b = alloca i32, align 4 store i32 1, i32* %a, align 4 store i32 0, i32* %b, align 4 %2 = load i32, i32* %a, align 4 %3 = load i32, i32* %b, align 4 %4 = and i32 %2, %3 %5 = icmp ne i32 %4, 0 br i1 %5, label %then, label %else then: ; preds = %.entry %6 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %6, i32 26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %ifcont else: ; preds = %.entry %7 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %7, i32 27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_logical2 FINALIZE_SYMTABLE_logical2: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast_f90-flush1-1eb6a16.stdout0000664000175000017500000000022615227365530023700 0ustar alastairalastairprogram flush1 ! Tests for syntax (AST only): flush(10, IOSTAT=n) flush(20, IOMSG=n) flush(ERR=label) flush(30, UNIT=40) flush(50) end program flush1 lfortran-0.64.0/tests/reference/ast-common1-abbc59b.json0000664000175000017500000000071215227365530023162 0ustar alastairalastair{ "basename": "ast-common1-abbc59b", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/common1.f90", "infile_hash": "d7a7a1f2f3dfe2e00668bce25dbd3dc8830df902ed2c7841ef1bc6e8", "outfile": null, "outfile_hash": null, "stdout": "ast-common1-abbc59b.stdout", "stdout_hash": "d3d7c74010f253585e6e6e08caef2d514f2df042adefcdfd197df655", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incorrect_allocate_for_array-b52ea30.stderr0000664000175000017500000000041115227365530027667 0ustar alastairalastairsemantic error: Allocate for arrays should have dimensions specified, found only array variable with no dimensions --> tests/errors/incorrect_allocate_for_array.f90:3:14 | 3 | allocate(a) | ^ Array specification required in allocate statement lfortran-0.64.0/tests/reference/asr-incorrect_number_args_subroutine-126ac8b.json0000664000175000017500000000103415227365530030277 0ustar alastairalastair{ "basename": "asr-incorrect_number_args_subroutine-126ac8b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_number_args_subroutine.f90", "infile_hash": "9f8831c31b6db61388a9bd52b8dbbc41806e77a125bcd3988587b34b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_number_args_subroutine-126ac8b.stderr", "stderr_hash": "8a32ff11fe84eec3e2ceb96907bdfd6f0a07253dee9905138cbdadd9", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_inline_function_calls-functions_05-5502cc1.json0000664000175000017500000000110015227365530030470 0ustar alastairalastair{ "basename": "pass_inline_function_calls-functions_05-5502cc1", "cmd": "lfortran --pass=inline_function_calls --show-asr --no-color --fast {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_05.f90", "infile_hash": "cf4cc8e65f95bcf5b5aacbb6d16d2aa40ef2f4c8442d1cb19b680a35", "outfile": null, "outfile_hash": null, "stdout": "pass_inline_function_calls-functions_05-5502cc1.stdout", "stdout_hash": "d2a18f4633d311e0173a0de845693bb0fe10f3f88b0436918b86c3a0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_07-ccfd81f.json0000664000175000017500000000077215227365530025000 0ustar alastairalastair{ "basename": "asr-derived_types_07-ccfd81f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_07.f90", "infile_hash": "33107b2d28cc81b22f81d3874dcb73e2941e7687400413569dd293e2", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_07-ccfd81f.stdout", "stdout_hash": "b9c5d61096de2e0c9a7e635cb93b0b11a35d2a2d7cb28f29f5a70b4b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-doloop_01-4e94eaf.stdout0000664000175000017500000003765415227365530023733 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 i32) i32.const 0 local.set 1 i32.const 1 i32.const 1 i32.sub local.set 0 loop local.get 0 i32.const 1 i32.add i32.const 10 i32.le_s if local.get 0 i32.const 1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 55 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 10 i32.const -1 i32.sub local.set 0 loop local.get 0 i32.const -1 i32.add i32.const 1 i32.ge_s if local.get 0 i32.const -1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 55 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const 2 i32.sub local.set 0 loop local.get 0 i32.const 2 i32.add i32.const 9 i32.le_s if local.get 0 i32.const 2 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 25 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 9 i32.const -2 i32.sub local.set 0 loop local.get 0 i32.const -2 i32.add i32.const 1 i32.ge_s if local.get 0 i32.const -2 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 25 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const 2 i32.sub local.set 0 loop local.get 0 i32.const 2 i32.add i32.const 10 i32.le_s if local.get 0 i32.const 2 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 25 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const 3 i32.sub local.set 0 loop local.get 0 i32.const 3 i32.add i32.const 10 i32.le_s if local.get 0 i32.const 3 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 22 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 10 i32.const -3 i32.sub local.set 0 loop local.get 0 i32.const -3 i32.add i32.const 1 i32.ge_s if local.get 0 i32.const -3 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 22 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const 1 i32.sub local.set 0 loop local.get 0 i32.const 1 i32.add i32.const 1 i32.le_s if local.get 0 i32.const 1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 1 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const -1 i32.sub local.set 0 loop local.get 0 i32.const -1 i32.add i32.const 1 i32.ge_s if local.get 0 i32.const -1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 1 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 1 i32.const 1 i32.sub local.set 0 loop local.get 0 i32.const 1 i32.add i32.const 0 i32.le_s if local.get 0 i32.const 1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 0 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 local.set 1 i32.const 0 i32.const -1 i32.sub local.set 0 loop local.get 0 i32.const -1 i32.add i32.const 1 i32.ge_s if local.get 0 i32.const -1 i32.add local.set 0 local.get 1 local.get 0 i32.add local.set 1 br 1 else end end local.get 1 i32.const 0 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end local.get 1 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") (data (;34;) (i32.const 208) "\d8\00\00\00\0b\00\00\00") (data (;35;) (i32.const 216) "ERROR STOP\n ") ) lfortran-0.64.0/tests/reference/ast-return1-517cbf1.stderr0000664000175000017500000000071715227365530023411 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/return1.f90:8:11 | 8 | if (i .eq. a) return 1 | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/return1.f90:9:11 | 9 | if (i .eq. b) return 2 | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/return1.f90:10:11 | 10 | if (i .eq. c) return 3 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/asr-template_02-021cc51.stdout0000664000175000017500000033413315227365530024052 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_02: (Program (SymbolTable 8 { change_positions_chr: (Function (SymbolTable 12 { i: (Variable 12 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 12 j [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), mask: (Variable 12 mask [] ReturnVar () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 12 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), pos: (Variable 12 pos [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), vec: (Variable 12 vec [] In () () Default (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) change_positions_chr (FunctionType [(Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray )] (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~neq_intrinsic1] [(Var 12 vec)] [(Assignment (Var 12 n) (ArraySize (Var 12 vec) () (Integer 4) () ) () .false. .false. ) (Allocate [((Var 12 pos) [((IntegerConstant 1 (Integer 4) Decimal) (Var 12 n))] () () ())] () () () ) (If () (IntegerCompare (Var 12 n) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Return)] [] ) (Assignment (Var 12 pos) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 12 pos)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 12 pos) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 12 j) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 12 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 12 n) ()) [(If () (FunctionCall 8 ~neq_intrinsic1 () [((ArrayItem (Var 12 vec) [(() (Var 12 i) ())] (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ColMajor () )) ((ArrayItem (Var 12 vec) [(() (IntegerBinOp (Var 12 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ColMajor () ))] (Logical 4) () () ) [(Assignment (Var 12 j) (IntegerBinOp (Var 12 j) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 12 pos) [(() (Var 12 j) ())] (Integer 4) ColMajor () ) (Var 12 i) () .false. .false. )] [] )] [] ) (Allocate [((Var 12 mask) [((IntegerConstant 1 (Integer 4) Decimal) (Var 12 j))] () () ())] () () () ) (DoLoop () ((Var 12 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 12 j) ()) [(Assignment (ArrayItem (Var 12 mask) [(() (Var 12 i) ())] (Integer 4) ColMajor () ) (ArrayItem (Var 12 pos) [(() (Var 12 i) ())] (Integer 4) ColMajor () ) () .false. .false. )] [] )] (Var 12 mask) Public .true. .true. () ), change_positions_int: (Function (SymbolTable 10 { i: (Variable 10 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 10 j [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), mask: (Variable 10 mask [] ReturnVar () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 10 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), pos: (Variable 10 pos [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), vec: (Variable 10 vec [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) change_positions_int (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~neq_intrinsic] [(Var 10 vec)] [(Assignment (Var 10 n) (ArraySize (Var 10 vec) () (Integer 4) () ) () .false. .false. ) (Allocate [((Var 10 pos) [((IntegerConstant 1 (Integer 4) Decimal) (Var 10 n))] () () ())] () () () ) (If () (IntegerCompare (Var 10 n) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Return)] [] ) (Assignment (Var 10 pos) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 10 pos)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 10 pos) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 10 j) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 10 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 10 n) ()) [(If () (FunctionCall 8 ~neq_intrinsic () [((ArrayItem (Var 10 vec) [(() (Var 10 i) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 10 vec) [(() (IntegerBinOp (Var 10 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Integer 4) ColMajor () ))] (Logical 4) () () ) [(Assignment (Var 10 j) (IntegerBinOp (Var 10 j) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 10 pos) [(() (Var 10 j) ())] (Integer 4) ColMajor () ) (Var 10 i) () .false. .false. )] [] )] [] ) (Allocate [((Var 10 mask) [((IntegerConstant 1 (Integer 4) Decimal) (Var 10 j))] () () ())] () () () ) (DoLoop () ((Var 10 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 10 j) ()) [(Assignment (ArrayItem (Var 10 mask) [(() (Var 10 i) ())] (Integer 4) ColMajor () ) (ArrayItem (Var 10 pos) [(() (Var 10 i) ())] (Integer 4) ColMajor () ) () .false. .false. )] [] )] (Var 10 mask) Public .true. .true. () ), change_positions_tmpl: (ExternalSymbol 8 change_positions_tmpl 2 change_positions_tmpl template_02_m [] change_positions_tmpl Public ), eq: (ExternalSymbol 8 eq 2 eq template_02_m [] eq Public ), ~neq: (CustomOperator 8 ~neq [8 ~neq_intrinsic 8 ~neq_intrinsic1] Public ), ~neq_intrinsic: (Function (SymbolTable 9 { arg0: (Variable 9 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 9 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 9 ret [] ReturnVar () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~neq_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 9 arg0) (Var 9 arg1)] [(Assignment (Var 9 ret) (IntegerCompare (Var 9 arg0) NotEq (Var 9 arg1) (Logical 4) () ) () .false. .false. )] (Var 9 ret) Public .true. .true. () ), ~neq_intrinsic1: (Function (SymbolTable 11 { arg0: (Variable 11 arg0 [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 11 arg1 [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 11 ret [] ReturnVar () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~neq_intrinsic1 (FunctionType [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 11 arg0) (Var 11 arg1)] [(Assignment (Var 11 ret) (StringCompare (Var 11 arg0) NotEq (Var 11 arg1) (Logical 4) () ) () .false. .false. )] (Var 11 ret) Public .true. .true. () ) }) template_02 [template_02_m] [(Print (StringFormat () [(FunctionCall 8 change_positions_int () [((ArrayPhysicalCast (ArrayConstant 28 [3, 3, 6, ...., 2, 2, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] DescriptorArray ) () ))] (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(FunctionCall 8 change_positions_chr () [((ArrayPhysicalCast (ArrayConstant 7 ["a", "a", "b", ...., "p", "p", "o"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] PointerArray ) ColMajor ) PointerArray DescriptorArray (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] DescriptorArray ) () ))] (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), template_02_m: (Module (SymbolTable 2 { change_positions_tmpl: (Template (SymbolTable 5 { change_positions_t: (Function (SymbolTable 7 { i: (Variable 7 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 7 j [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), mask: (Variable 7 mask [] ReturnVar () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 7 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), pos: (Variable 7 pos [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), vec: (Variable 7 vec [] In () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) change_positions_t (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray )] (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [ne] [(Var 7 vec)] [(Assignment (Var 7 n) (ArraySize (Var 7 vec) () (Integer 4) () ) () .false. .false. ) (Allocate [((Var 7 pos) [((IntegerConstant 1 (Integer 4) Decimal) (Var 7 n))] () () ())] () () () ) (If () (IntegerCompare (Var 7 n) Lt (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Return)] [] ) (Assignment (Var 7 pos) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (IntrinsicArrayFunction Shape [(Var 7 pos)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 7 pos) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 7 j) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 7 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 7 n) ()) [(If () (FunctionCall 5 ne () [((ArrayItem (Var 7 vec) [(() (Var 7 i) ())] (TypeParameter t ) ColMajor () )) ((ArrayItem (Var 7 vec) [(() (IntegerBinOp (Var 7 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (TypeParameter t ) ColMajor () ))] (Logical 4) () () ) [(Assignment (Var 7 j) (IntegerBinOp (Var 7 j) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (ArrayItem (Var 7 pos) [(() (Var 7 j) ())] (Integer 4) ColMajor () ) (Var 7 i) () .false. .false. )] [] )] [] ) (Allocate [((Var 7 mask) [((IntegerConstant 1 (Integer 4) Decimal) (Var 7 j))] () () ())] () () () ) (DoLoop () ((Var 7 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 7 j) ()) [(Assignment (ArrayItem (Var 7 mask) [(() (Var 7 i) ())] (Integer 4) ColMajor () ) (ArrayItem (Var 7 pos) [(() (Var 7 i) ())] (Integer 4) ColMajor () ) () .false. .false. )] [] )] (Var 7 mask) Public .true. .true. () ), ne: (Function (SymbolTable 6 { lhs: (Variable 6 lhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ne: (Variable 6 ne [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 6 rhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ne (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 6 lhs) (Var 6 rhs)] [] (Var 6 ne) Public .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) change_positions_tmpl [t ne] [(Require eq [t ne] )] ), eq: (Requirement (SymbolTable 3 { ne: (Function (SymbolTable 4 { lhs: (Variable 4 lhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ne: (Variable 4 ne [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ne (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 4 lhs) (Var 4 rhs)] [] (Var 4 ne) Public .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) eq [t ne] [] ) }) template_02_m () [template_02_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-array_bounds_check_15-9f619ed.stderr0000664000175000017500000000023115227365530026166 0ustar alastairalastairruntime error: Argument 1 is unallocated. --> tests/errors/array_bounds_check_15.f90:6:14 | 6 | print *, x | ^ This is unallocated ././@LongLink0000644000000000000000000000015200000000000011601 Lustar rootrootlfortran-0.64.0/tests/reference/asr-incompatible_dimension_logical_arrays_logical_binop_02-5be1708.stderrlfortran-0.64.0/tests/reference/asr-incompatible_dimension_logical_arrays_logical_binop_02-5be1708.s0000664000175000017500000000031315227365530033631 0ustar alastairalastairsemantic error: Shapes for operands are not conformable --> tests/errors/incompatible_dimension_logical_arrays_logical_binop_02.f90:4:14 | 4 | print *, x1 .neqv. x2 | ^^ ^^ lfortran-0.64.0/tests/reference/ast_f90-substring-73a0b8e.stdout0000664000175000017500000000031515227365530024521 0ustar alastairalastairprogram substring implicit none character(len=5) :: str character(len=5), parameter :: s = "Hello World"(7:11) str = "12345"(2:4) print *, str print *, s print *, "SubString"(4:9) end program substring lfortran-0.64.0/tests/reference/asr-function_call1-0b992da.json0000664000175000017500000000073715227365530024362 0ustar alastairalastair{ "basename": "asr-function_call1-0b992da", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/function_call1.f90", "infile_hash": "45acf463b1d977f1bdf3d9420205c7979fc03de58d60260cb37fd0bc", "outfile": null, "outfile_hash": null, "stdout": "asr-function_call1-0b992da.stdout", "stdout_hash": "56b93110deab3091bb7604200274dc45592dba3189fbabfb1b1ae1ef", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-associate1-2443d15.stdout0000664000175000017500000000241715227365530023721 0ustar alastairalastair(TranslationUnit [(AssociateBlock 0 () [(x [] [] () y Arrow ())] [] () () ) (AssociateBlock 0 () [(x [] [] () (Parenthesis y ) Arrow ())] [] () () ) (AssociateBlock 0 () [(x [] [] () (+ y z) Arrow ())] [] () () ) (AssociateBlock 0 () [(x [] [] () (u- y) Arrow ())] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (SubroutineCall 0 some_subroutine [] [(() x () 0) (() (Parenthesis x ) () 0)] [] [] () ) (Assignment 0 x (FuncCallOrArray f [] [(() (Parenthesis x ) () 0)] [] [] [] ) () )] ) lfortran-0.64.0/tests/reference/asr_enable_style_suggestion-style1-a2fdd22.stderr0000664000175000017500000000106015227365530030271 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/style1.f90:4:11 | 4 | if (y .eq. 1) then | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/style1.f90:10:15 | 10 | if (x .eq. 1) then | ^^^^ help: write this as '==' warning: Assuming implicit save attribute for variable declaration --> tests/style1.f90:9:20 | 9 | integer :: x = 5 | ^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement lfortran-0.64.0/tests/reference/asr-func_parameter_type_02-cef1ab3.json0000664000175000017500000000106315227365530026141 0ustar alastairalastair{ "basename": "asr-func_parameter_type_02-cef1ab3", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/func_parameter_type_02.f90", "infile_hash": "ed02fab8e69756cf65ecfb2f1861cf6fb9628838d09b3ce6875e0ffd", "outfile": null, "outfile_hash": null, "stdout": "asr-func_parameter_type_02-cef1ab3.stdout", "stdout_hash": "dc8812e33e151119067437a1e5ec142bb663e48deb51cb4522850101", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-arrays_01_real-6c5e850.json0000664000175000017500000000076715227365530024402 0ustar alastairalastair{ "basename": "llvm-arrays_01_real-6c5e850", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_real.f90", "infile_hash": "52d4b470c5523650dead5fa570d62db7293b9ecd23758e3cc4ba28c2", "outfile": null, "outfile_hash": null, "stdout": "llvm-arrays_01_real-6c5e850.stdout", "stdout_hash": "678fb87712f28eea2eb2b5c0b36dbc7a8d590462d7f3faaa1faeaec4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-arrays_01_real-6cb0873.stdout0000664000175000017500000010601015227365530024547 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_01_real: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_01_real [] [(DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 8) ColMajor () ) (Cast (IntegerBinOp (Var 2 i) Add (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 8) () () ) () .false. .false. )] [] ) (If () (RealCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 11.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 12.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 13.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 11 (Integer 4) Decimal) (IntegerConstant 14 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (IntegerBinOp (Var 2 i) Sub (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 8) ColMajor () ) (Cast (Var 2 i) IntegerToReal (Real 8) () () ) () .false. .false. )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 11.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 12.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 13.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 14 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 14.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Real 8) ColMajor () ) (RealBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 8) ColMajor () ) Sub (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 10.000000 (Real 8) ) () ) (Real 8) () ) () .false. .false. )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 1.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 2.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 3.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (RealBinOp (RealBinOp (RealBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) Add (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (Real 8) () ) Add (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (Real 8) () ) Add (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (Real 8) () ) () .false. .false. ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 17 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 17.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) () .false. .false. ) (If () (RealCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 11.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(DoLoop () ((Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 c) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Real 8) ColMajor () ) (Cast (IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Add (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) IntegerToReal (Real 8) () () ) () .false. .false. )] [] )] [] ) (If () (RealCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 12.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 13.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 13.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) NotEq (Cast (IntegerConstant 14 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 14.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-max_01-415ceb0.stderr0000664000175000017500000000036115227365530023062 0ustar alastairalastairwarning: Different kinds of args in max0 is a non-standard extension --> tests/../integration_tests/max_01.f90:6:14 | 6 | print *, max(y, z) | ^^^^^^^^^ help: ensure all arguments have the same kind to make it standard lfortran-0.64.0/tests/reference/run-integer_overflow-3cf26f8.stderr0000664000175000017500000000007315227365530025412 0ustar alastairalastairError: Value 2147483648 is out of integer(4) range (file). lfortran-0.64.0/tests/reference/asr-forall_01-11937e6.stdout0000664000175000017500000000733115227365530023453 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { forall_01: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ivec: (Variable 2 ivec [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) forall_01 [] [(ForAllSingle ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) (Assignment (ArrayItem (Var 2 ivec) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. ) ) (Print (StringFormat () [(Var 2 ivec)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_13-07b50ad.stdout0000664000175000017500000004267215227365530024516 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_13: (Program (SymbolTable 2 { p: (Variable 2 p [] Local (TypeInquiry Kind (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p1: (Variable 2 p1 [] Local (TypeInquiry Kind (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p2: (Variable 2 p2 [] Local (TypeInquiry Kind (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p3: (Variable 2 p3 [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p4: (Variable 2 p4 [] Local (TypeInquiry Kind (Real 4) (RealConstant 0.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p5: (Variable 2 p5 [] Local (TypeInquiry Kind (Real 4) (RealConstant 5.000000 (Real 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p6: (Variable 2 p6 [] Local (TypeInquiry Kind (Real 8) (RealConstant 5.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p7: (Variable 2 p7 [] Local (TypeInquiry Kind (Logical 4) (LogicalConstant .true. (Logical 4) ) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) (IntegerConstant 4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_13 [] [(If () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 p) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) And (IntegerCompare (Var 2 p1) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) And (IntegerCompare (Var 2 p2) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 p3) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) And (IntegerCompare (Var 2 p4) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) And (IntegerCompare (Var 2 p5) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (IntegerCompare (Var 2 p6) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) And (IntegerCompare (Var 2 p7) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-common_03-9052466.stdout0000664000175000017500000012200215227365530023377 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { common3: (Program (SymbolTable 5 { 1_b_e: (ExternalSymbol 5 1_b_e 7 e b [] e Public ), 1_sample_a: (ExternalSymbol 5 1_sample_a 4 a sample [] a Public ), 1_sample_b: (ExternalSymbol 5 1_sample_b 4 b sample [] b Public ), sample: (ExternalSymbol 5 sample 3 sample file_common_block_sample [] sample Public ), struct_instance_b: (ExternalSymbol 5 struct_instance_b 6 struct_instance_b file_common_block_b [] struct_instance_b Public ), struct_instance_sample: (ExternalSymbol 5 struct_instance_sample 3 struct_instance_sample file_common_block_sample [] struct_instance_sample Public ) }) common3 [] [(Assignment (StructInstanceMember (Var 5 struct_instance_sample) 5 1_sample_a (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) (ArrayConstant 8 [1.00000000e+01, 1.10000000e+01] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (StructInstanceMember (Var 5 struct_instance_sample) 5 1_sample_b (Real 4) () ) (RealConstant 20.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 5 struct_instance_b) 5 1_b_e (Integer 4) () ) (IntegerConstant 123 (Integer 4) Decimal) () .false. .false. ) (SubroutineCall 1 pass () [] () .false. )] ), file_common_block_b: (Module (SymbolTable 6 { b: (Struct (SymbolTable 7 { d: (Variable 7 d [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 7 e [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 7 f [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (StructType [] [] .true. .false. ) [] [d e f] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_b: (Variable 6 struct_instance_b [] Local () () Default (StructType [] [] .true. .false. ) 6 b Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_b () [] .false. .false. .false. ), file_common_block_blank#block: (Module (SymbolTable 8 { blank#block: (Struct (SymbolTable 9 { z1: (Variable 9 z1 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z2: (Variable 9 z2 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) blank#block (StructType [] [] .true. .false. ) [] [z1 z2] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_blank#block: (Variable 8 struct_instance_blank#block [] Local () () Default (StructType [] [] .true. .false. ) 8 blank#block Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_blank#block () [] .false. .false. .false. ), file_common_block_c: (Module (SymbolTable 10 { c: (Struct (SymbolTable 11 { c: (Variable 11 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 11 g [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 11 h [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 11 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) c (StructType [] [] .true. .false. ) [] [c g h j] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_c: (Variable 10 struct_instance_c [] Local () () Default (StructType [] [] .true. .false. ) 10 c Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_c () [] .false. .false. .false. ), file_common_block_sample: (Module (SymbolTable 3 { sample: (Struct (SymbolTable 4 { a: (Variable 4 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 4 i [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sample (StructType [] [] .true. .false. ) [] [a b i] [] Source Public .false. .false. .false. [] () () [] ), struct_instance_sample: (Variable 3 struct_instance_sample [] Local () () Default (StructType [] [] .true. .false. ) 3 sample Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) file_common_block_sample () [] .false. .false. .false. ), pass: (Function (SymbolTable 2 { 1_sample_a: (ExternalSymbol 2 1_sample_a 4 a sample [] a Public ), 1_sample_b: (ExternalSymbol 2 1_sample_b 4 b sample [] b Public ), e: (Variable 2 e [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sample: (ExternalSymbol 2 sample 3 sample file_common_block_sample [] sample Public ), struct_instance_sample: (ExternalSymbol 2 struct_instance_sample 3 struct_instance_sample file_common_block_sample [] struct_instance_sample Public ) }) pass (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (StructInstanceMember (Var 2 struct_instance_sample) 2 1_sample_a (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 10.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (StructInstanceMember (Var 2 struct_instance_sample) 2 1_sample_b (Real 4) () ) Sub (RealConstant 20.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(StructInstanceMember (Var 2 struct_instance_sample) 2 1_sample_a (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () ) (StructInstanceMember (Var 2 struct_instance_sample) 2 1_sample_b (Real 4) () ) (Var 2 e)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/julia-subroutine7-e0b863b.stdout0000664000175000017500000000014615227365530024630 0ustar alastairalastairfunction f(a::Base.RefValue{Int32}, b::Base.RefValue{Int32}) a[] = b[] + 1 b[] = a[] + 1 end lfortran-0.64.0/tests/reference/asr-intrinsics_12-ff7ce44.json0000664000175000017500000000076115227365530024235 0ustar alastairalastair{ "basename": "asr-intrinsics_12-ff7ce44", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_12.f90", "infile_hash": "7f3ef938f03d46035bb9c845b8ab1b15ac06b209b8b464f50486baf8", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_12-ff7ce44.stdout", "stdout_hash": "26e482501e820a6b861be4230bd5d6df4bd0d3ca03099b86ebf5336c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_fixed_form-doloop_19-e430eca.stdout0000664000175000017500000000753415227365530026117 0ustar alastairalastair(TranslationUnit [(Program doloop_19 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (s [] [] () () None ())] () )] [(Assignment 0 s 0 () ) (DoLoop 0 () 0 i 1 5 () [(Assignment 0 s (+ s i) () )] () () ) (If 0 () (/= s 15) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 s 0 () ) (DoLoop 0 () 1 i 1 5 () [(If 0 () (== i 3) [(GoTo 0 () 1 [] () )] [] () () () ) (Assignment 0 s (+ s i) () )] () () ) (If 0 () (/= s 12) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 s 0 () ) (DoLoop 0 () 2 i 1 5 () [(If 0 () (== i 3) [(GoTo 0 () 2 [] () )] [] () () () ) (Assignment 0 s (+ s i) () )] () () ) (If 0 () (/= s 12) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 s 0 () ) (DoLoop 0 () 3 i 1 5 () [(If 0 () (== i 3) [(GoTo 0 () 3 [] () )] [] () () () ) (Assignment 0 s (+ s i) () )] () () ) (If 0 () (/= s 12) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/ast-forallloop_01-d1e2bfa.stdout0000664000175000017500000001613615227365530024637 0ustar alastairalastair(TranslationUnit [(Program forallloop_01 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 10000 DimensionExpr)] )] [(a [] [] () () None ()) (b [] [] () () None ()) (c [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(scalar [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (nsize [] [] () () None ())] () )] [(Assignment 0 scalar 10 () ) (Assignment 0 nsize (FuncCallOrArray size [] [(() a () 0)] [] [] [] ) () ) (ForAll 0 () [(ConcurrentControl () i 1 nsize () )] () [] [(Assignment 0 (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) 5 () ) (Assignment 0 (FuncCallOrArray b [] [(() i () 0)] [] [] [] ) 5 () )] () () ) (SubroutineCall 0 triad [] [(() a () 0) (() b () 0) (() scalar () 0) (() c () 0)] [] [] () ) (Print 0 () [(String "End Stream Triad" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Subroutine triad [(a) (b) (scalar) (c)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(a [(() () DimensionExpr)] [] () () None ()) (b [(() () DimensionExpr)] [] () () None ()) (scalar [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(c [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(N [] [] () () None ()) (i [] [] () () None ())] () )] [(Assignment 0 N (FuncCallOrArray size [] [(() a () 0)] [] [] [] ) () ) (ForAllSingle 0 () [(ConcurrentControl () i 1 N () )] () (Assignment 0 (FuncCallOrArray c [] [(() i () 0)] [] [] [] ) (+ (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) (* scalar (FuncCallOrArray b [] [(() i () 0)] [] [] [] ))) () ) () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/llvm-finalize_01-5496007.stdout0000664000175000017500000004366215227365530024110 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %array.1 = type { i32*, i64, i32, i8, i8, i8, i8, i64, [1 x %dimension_descriptor] } %dimension_descriptor = type { i64, i64, i64 } %string_descriptor = type <{ i8*, i64 }> %array.2 = type { float*, i64, i32, i8, i8, i8, i8, i64, [2 x %dimension_descriptor] } @0 = private unnamed_addr constant [4 x i8] c"arr\00", align 1 @1 = private unnamed_addr constant [22 x i8] c"tests/finalize_01.f90\00", align 1 @2 = private unnamed_addr constant [53 x i8] c"Cannot allocate '%s' because it is already allocated\00", align 1 @3 = private unnamed_addr constant [55 x i8] c"Attempting to allocate already allocated variable '%s'\00", align 1 @__Wrong_allocation = private unnamed_addr constant [51 x i8] c"Attempting to allocate already allocated variable!\00", align 1 define void @__module_finalize_01_mod_ss() { .entry: %0 = call i8* @_lfortran_get_default_allocator() %arr_desc = alloca %array.1, align 8 %arr = alloca %array.1*, align 8 store %array.1* null, %array.1** %arr, align 8 %1 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 8 %2 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %1, i32 0, i32 0 %3 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %2, i32 0 %4 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 0 store i64 1, i64* %4, align 8 %5 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 1 store i64 1, i64* %5, align 8 %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 2 store i64 0, i64* %6, align 8 %7 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 3 store i8 1, i8* %7, align 1 %8 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 0 store i32* null, i32** %8, align 8 store %array.1* %arr_desc, %array.1** %arr, align 8 %9 = load %array.1*, %array.1** %arr, align 8 %10 = ptrtoint %array.1* %9 to i64 %11 = icmp eq i64 %10, 0 br i1 %11, label %merge_allocated, label %check_data check_data: ; preds = %.entry %12 = getelementptr %array.1, %array.1* %9, i32 0, i32 0 %13 = load i32*, i32** %12, align 8 %14 = ptrtoint i32* %13 to i64 %15 = icmp ne i64 %14, 0 br label %merge_allocated merge_allocated: ; preds = %check_data, %.entry %is_allocated = phi i1 [ false, %.entry ], [ %15, %check_data ] br i1 %is_allocated, label %then, label %ifcont then: ; preds = %merge_allocated %16 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %17 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %18 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %17, i32 0, i32 0 %19 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %18, i32 0, i32 0 store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @1, i32 0, i32 0), i8** %19, align 8 %20 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %18, i32 0, i32 1 store i32 15, i32* %20, align 4 %21 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %18, i32 0, i32 2 store i32 18, i32* %21, align 4 %22 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %18, i32 0, i32 3 store i32 15, i32* %22, align 4 %23 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %18, i32 0, i32 4 store i32 24, i32* %23, align 4 %24 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %0, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) %25 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %16, i32 0, i32 0 %26 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %17, i32 0, i32 0 %27 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %25, i32 0, i32 2 %28 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %25, i32 0, i32 0 store i1 true, i1* %28, align 1 %29 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %25, i32 0, i32 1 store i8* %24, i8** %29, align 8 store { i8*, i32, i32, i32, i32 }* %26, { i8*, i32, i32, i32, i32 }** %27, align 8 %30 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %25, i32 0, i32 3 store i32 1, i32* %30, align 4 %31 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %16, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %0, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %31, i32 1, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @0, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont: ; preds = %merge_allocated %32 = load %array.1*, %array.1** %arr, align 8 %33 = getelementptr %array.1, %array.1* %32, i32 0, i32 7 store i64 0, i64* %33, align 8 %34 = getelementptr %array.1, %array.1* %32, i32 0, i32 3 store i8 1, i8* %34, align 1 %35 = getelementptr %array.1, %array.1* %32, i32 0, i32 8 %36 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %35, i32 0, i32 0 %37 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %36, i32 0 %38 = getelementptr %dimension_descriptor, %dimension_descriptor* %37, i32 0, i32 2 %39 = getelementptr %dimension_descriptor, %dimension_descriptor* %37, i32 0, i32 0 %40 = getelementptr %dimension_descriptor, %dimension_descriptor* %37, i32 0, i32 1 store i64 1, i64* %38, align 8 store i64 1, i64* %39, align 8 store i64 10, i64* %40, align 8 %41 = getelementptr %array.1, %array.1* %32, i32 0, i32 0 %42 = call i8* @_lfortran_get_default_allocator() %43 = call i8* @_lfortran_malloc_alloc(i8* %42, i64 40) %44 = bitcast i8* %43 to i32* store i32* %44, i32** %41, align 8 br i1 true, label %then1, label %else then1: ; preds = %ifcont br label %return unreachable_after_return: ; No predecessors! br label %ifcont3 else: ; preds = %ifcont br label %return unreachable_after_return2: ; No predecessors! br label %ifcont3 ifcont3: ; preds = %unreachable_after_return2, %unreachable_after_return br label %return return: ; preds = %ifcont3, %else, %then1 br label %FINALIZE_SYMTABLE_ss FINALIZE_SYMTABLE_ss: ; preds = %return br label %Finalize_Variable_arr Finalize_Variable_arr: ; preds = %FINALIZE_SYMTABLE_ss %45 = load %array.1*, %array.1** %arr, align 8 call void @finalize_allocatable__Array_1_i32(%array.1* %45) ret void } declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare i8* @_lfortran_malloc_alloc(i8*, i64) define internal void @finalize_allocatable__Array_1_i32(%array.1* %0) { entry: %1 = icmp ne %array.1* %0, null br i1 %1, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry call void @finalize_descriptorArray_Array_1_i32(%array.1* %0) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then ret void } define internal void @finalize_descriptorArray_Array_1_i32(%array.1* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = getelementptr %array.1, %array.1* %0, i32 0, i32 0 %3 = load i32*, i32** %2, align 8 %4 = ptrtoint i32* %3 to i64 %5 = icmp ne i64 %4, 0 br i1 %5, label %then, label %else then: ; preds = %entry %6 = bitcast i32* %3 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %6) br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then ret void } declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() %str = alloca %string_descriptor, align 8 %arr_desc = alloca %array.1, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %arr = alloca %array.1*, align 8 store %array.1* null, %array.1** %arr, align 8 %3 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 8 %4 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %3, i32 0, i32 0 %5 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %4, i32 0 %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 0 store i64 1, i64* %6, align 8 %7 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 1 store i64 1, i64* %7, align 8 %8 = getelementptr %dimension_descriptor, %dimension_descriptor* %5, i32 0, i32 2 store i64 0, i64* %8, align 8 %9 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 3 store i8 1, i8* %9, align 1 %10 = getelementptr %array.1, %array.1* %arr_desc, i32 0, i32 0 store i32* null, i32** %10, align 8 store %array.1* %arr_desc, %array.1** %arr, align 8 store %string_descriptor zeroinitializer, %string_descriptor* %str, align 1 %11 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = icmp ne i8* %12, null br i1 %13, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @__Wrong_allocation, i32 0, i32 0)) call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %14 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %15 = call i8* @_lfortran_get_default_allocator() %16 = call i8* @_lfortran_malloc_alloc(i8* %15, i64 10) store i8* %16, i8** %14, align 8 %17 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 store i64 10, i64* %17, align 8 call void @__module_finalize_01_mod_ss() call void @internal_sub() br label %return unreachable_after_return: ; No predecessors! br label %return return: ; preds = %unreachable_after_return, %ifcont br label %FINALIZE_SYMTABLE_finalize_01 FINALIZE_SYMTABLE_finalize_01: ; preds = %return br label %Finalize_Variable_arr Finalize_Variable_arr: ; preds = %FINALIZE_SYMTABLE_finalize_01 %18 = load %array.1*, %array.1** %arr, align 8 call void @finalize_allocatable__Array_1_i32(%array.1* %18) br label %Finalize_Variable_str Finalize_Variable_str: ; preds = %Finalize_Variable_arr %19 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %20 = load i8*, i8** %19, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %20) call void @_lfortran_internal_alloc_finalize() ret i32 0 } define void @internal_sub() { .entry: %0 = call i8* @_lfortran_get_default_allocator() %arr_desc1 = alloca %array.1, align 8 %str = alloca %string_descriptor, align 8 %arr_desc = alloca %array.2, align 8 %arr_real = alloca %array.2*, align 8 store %array.2* null, %array.2** %arr_real, align 8 %1 = getelementptr %array.2, %array.2* %arr_desc, i32 0, i32 8 %2 = getelementptr [2 x %dimension_descriptor], [2 x %dimension_descriptor]* %1, i32 0, i32 0 %3 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %2, i32 0 %4 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 0 store i64 1, i64* %4, align 8 %5 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 1 store i64 1, i64* %5, align 8 %6 = getelementptr %dimension_descriptor, %dimension_descriptor* %3, i32 0, i32 2 store i64 0, i64* %6, align 8 %7 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %2, i32 1 %8 = getelementptr %dimension_descriptor, %dimension_descriptor* %7, i32 0, i32 0 store i64 1, i64* %8, align 8 %9 = getelementptr %dimension_descriptor, %dimension_descriptor* %7, i32 0, i32 1 store i64 1, i64* %9, align 8 %10 = getelementptr %dimension_descriptor, %dimension_descriptor* %7, i32 0, i32 2 store i64 0, i64* %10, align 8 %11 = getelementptr %array.2, %array.2* %arr_desc, i32 0, i32 3 store i8 2, i8* %11, align 1 %12 = getelementptr %array.2, %array.2* %arr_desc, i32 0, i32 0 store float* null, float** %12, align 8 store %array.2* %arr_desc, %array.2** %arr_real, align 8 store %string_descriptor zeroinitializer, %string_descriptor* %str, align 1 br label %bl.start bl.start: ; preds = %.entry %13 = call i8* @llvm.stacksave() %arr_in_block = alloca %array.1*, align 8 store %array.1* null, %array.1** %arr_in_block, align 8 %14 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 8 %15 = getelementptr [1 x %dimension_descriptor], [1 x %dimension_descriptor]* %14, i32 0, i32 0 %16 = getelementptr inbounds %dimension_descriptor, %dimension_descriptor* %15, i32 0 %17 = getelementptr %dimension_descriptor, %dimension_descriptor* %16, i32 0, i32 0 store i64 1, i64* %17, align 8 %18 = getelementptr %dimension_descriptor, %dimension_descriptor* %16, i32 0, i32 1 store i64 1, i64* %18, align 8 %19 = getelementptr %dimension_descriptor, %dimension_descriptor* %16, i32 0, i32 2 store i64 0, i64* %19, align 8 %20 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 3 store i8 1, i8* %20, align 1 %21 = getelementptr %array.1, %array.1* %arr_desc1, i32 0, i32 0 store i32* null, i32** %21, align 8 store %array.1* %arr_desc1, %array.1** %arr_in_block, align 8 br label %bl.end unreachable_after_exit: ; No predecessors! br label %return unreachable_after_return: ; No predecessors! br label %bl.end bl.end: ; preds = %unreachable_after_return, %bl.start br label %FINALIZE_SYMTABLE_bl FINALIZE_SYMTABLE_bl: ; preds = %bl.end br label %Finalize_Variable_arr_in_block Finalize_Variable_arr_in_block: ; preds = %FINALIZE_SYMTABLE_bl %22 = load %array.1*, %array.1** %arr_in_block, align 8 call void @finalize_allocatable__Array_1_i32(%array.1* %22) call void @llvm.stackrestore(i8* %13) br label %loop.head loop.head: ; preds = %unreachable_after_return2, %Finalize_Variable_arr_in_block br i1 true, label %loop.body, label %loop.end loop.body: ; preds = %loop.head br label %return unreachable_after_return2: ; No predecessors! br label %loop.head loop.end: ; preds = %loop.head br label %return return: ; preds = %loop.end, %loop.body, %unreachable_after_exit br label %FINALIZE_SYMTABLE_internal_sub FINALIZE_SYMTABLE_internal_sub: ; preds = %return br label %Finalize_Variable_arr_real Finalize_Variable_arr_real: ; preds = %FINALIZE_SYMTABLE_internal_sub %23 = load %array.2*, %array.2** %arr_real, align 8 call void @finalize_allocatable__Array_2_r32(%array.2* %23) br label %Finalize_Variable_str Finalize_Variable_str: ; preds = %Finalize_Variable_arr_real %24 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %25 = load i8*, i8** %24, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %25) ret void } ; Function Attrs: nounwind declare i8* @llvm.stacksave() #0 ; Function Attrs: nounwind declare void @llvm.stackrestore(i8*) #0 define internal void @finalize_allocatable__Array_2_r32(%array.2* %0) { entry: %1 = icmp ne %array.2* %0, null br i1 %1, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry call void @finalize_descriptorArray_Array_2_r32(%array.2* %0) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then ret void } define internal void @finalize_descriptorArray_Array_2_r32(%array.2* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = getelementptr %array.2, %array.2* %0, i32 0, i32 0 %3 = load float*, float** %2, align 8 %4 = ptrtoint float* %3 to i64 %5 = icmp ne i64 %4, 0 br i1 %5, label %then, label %else then: ; preds = %entry %6 = bitcast float* %3 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %6) br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then ret void } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() attributes #0 = { nounwind } lfortran-0.64.0/tests/reference/asr-derived_types_06-847ca73.stdout0000664000175000017500000040377115227365530025140 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { tomlf_datetime: (Module (SymbolTable 7 { date_to_string: (Function (SymbolTable 11 { 1_toml_date_day: (ExternalSymbol 11 1_toml_date_day 8 day tomlf_datetime [toml_date] day Public ), 1_toml_date_month: (ExternalSymbol 11 1_toml_date_month 8 month tomlf_datetime [toml_date] month Public ), 1_toml_date_year: (ExternalSymbol 11 1_toml_date_year 8 year tomlf_datetime [toml_date] year Public ), lfortran_iomsg: (Variable 11 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lhs: (Variable 11 lhs [] Out () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 11 rhs [] In () () Default (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .false. .false. ) 7 toml_date Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) date_to_string (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .false. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 11 lhs) (Var 11 rhs)] [(Allocate [((Var 11 lhs) [] (IntegerConstant 10 (Integer 4) Decimal) () (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (FileWrite 0 (Var 11 lhs) (Var 11 lfortran_iomsg) () () [(StringFormat (StringConstant "(i4.4,\"-\",i2.2,\"-\",i2.2)" (String 1 (IntegerConstant 24 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(StructInstanceMember (Var 11 rhs) 11 1_toml_date_year (Integer 4) () ) (StructInstanceMember (Var 11 rhs) 11 1_toml_date_month (Integer 4) () ) (StructInstanceMember (Var 11 rhs) 11 1_toml_date_day (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () )] () Private .true. .true. () ), datetime_to_string: (Function (SymbolTable 12 { 1_toml_date_to_string: (ExternalSymbol 12 1_toml_date_to_string 8 to_string tomlf_datetime [toml_date] to_string Public ), 1_toml_datetime_date: (ExternalSymbol 12 1_toml_datetime_date 9 date tomlf_datetime [toml_datetime] date Public ), 1_toml_datetime_time: (ExternalSymbol 12 1_toml_datetime_time 9 time tomlf_datetime [toml_datetime] time Public ), 1_toml_time_to_string: (ExternalSymbol 12 1_toml_time_to_string 10 to_string tomlf_datetime [toml_time] to_string Public ), lhs: (Variable 12 lhs [] Out () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 12 rhs [] In () () Default (StructType [(Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .false. .false. ) 7 toml_datetime Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), temporary: (Variable 12 temporary [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), time_to_string: (ExternalSymbol 12 time_to_string 7 time_to_string tomlf_datetime [] time_to_string Public ) }) datetime_to_string (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .false. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 12 lhs) (Var 12 rhs)] [(If () (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_date (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) () )] 0 (Logical 4) () ) [(SubroutineCall 12 1_toml_date_to_string () [((Var 12 lhs)) ((StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_date (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) () ))] (StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_date (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) () ) .false. ) (If () (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () )] 0 (Logical 4) () ) [(SubroutineCall 12 1_toml_time_to_string () [((Var 12 temporary)) ((StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ))] (StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ) .false. ) (Assignment (Var 12 lhs) (IntrinsicElementalFunction StringConcat [(Var 12 lhs) (Var 12 temporary)] 0 (String 1 () DeferredLength DescriptorString) () ) () .false. .false. )] [] )] [(If () (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () )] 0 (Logical 4) () ) [(Assignment (Var 12 lhs) (StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ) (SubroutineCall 12 time_to_string 12 time_to_string [((Var 12 lhs)) ((StructInstanceMember (Var 12 rhs) 12 1_toml_datetime_time (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ))] () .false. ) .false. .false. )] [] )] )] () Private .true. .true. () ), new_toml_time: (Function (SymbolTable 13 { 1_toml_time_hour: (ExternalSymbol 13 1_toml_time_hour 10 hour tomlf_datetime [toml_time] hour Public ), 1_toml_time_millisec: (ExternalSymbol 13 1_toml_time_millisec 10 millisec tomlf_datetime [toml_time] millisec Public ), 1_toml_time_minute: (ExternalSymbol 13 1_toml_time_minute 10 minute tomlf_datetime [toml_time] minute Public ), 1_toml_time_second: (ExternalSymbol 13 1_toml_time_second 10 second tomlf_datetime [toml_time] second Public ), 1_toml_time_zone: (ExternalSymbol 13 1_toml_time_zone 10 zone tomlf_datetime [toml_time] zone Public ), hour: (Variable 13 hour [] In () () Default (Integer 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ), millisec: (Variable 13 millisec [] In () () Default (Integer 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ), minute: (Variable 13 minute [] In () () Default (Integer 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ), second: (Variable 13 second [] In () () Default (Integer 4) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 13 self [] ReturnVar () () Default (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 7 toml_time Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), zone: (Variable 13 zone [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Private Optional .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_toml_time (FunctionType [(Integer 4) (Integer 4) (Integer 4) (Integer 4) (String 1 () AssumedLength DescriptorString)] (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 13 hour) (Var 13 minute) (Var 13 second) (Var 13 millisec) (Var 13 zone)] [(If () (IntrinsicElementalFunction Present [(Var 13 hour)] 0 (Logical 4) () ) [(Assignment (StructInstanceMember (Var 13 self) 13 1_toml_time_hour (Integer 4) () ) (Var 13 hour) () .false. .false. )] [] ) (If () (IntrinsicElementalFunction Present [(Var 13 minute)] 0 (Logical 4) () ) [(Assignment (StructInstanceMember (Var 13 self) 13 1_toml_time_minute (Integer 4) () ) (Var 13 minute) () .false. .false. )] [] ) (If () (IntrinsicElementalFunction Present [(Var 13 second)] 0 (Logical 4) () ) [(Assignment (StructInstanceMember (Var 13 self) 13 1_toml_time_second (Integer 4) () ) (Var 13 second) () .false. .false. )] [] ) (If () (IntrinsicElementalFunction Present [(Var 13 millisec)] 0 (Logical 4) () ) [(Assignment (StructInstanceMember (Var 13 self) 13 1_toml_time_millisec (Allocatable (Integer 4) ) () ) (Var 13 millisec) () .false. .false. )] [] ) (If () (IntrinsicElementalFunction Present [(Var 13 zone)] 0 (Logical 4) () ) [(Assignment (StructInstanceMember (Var 13 self) 13 1_toml_time_zone (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Var 13 zone) () .false. .false. )] [] )] (Var 13 self) Private .true. .true. () ), time_to_string: (Function (SymbolTable 14 { 1_toml_time_hour: (ExternalSymbol 14 1_toml_time_hour 10 hour tomlf_datetime [toml_time] hour Public ), 1_toml_time_millisec: (ExternalSymbol 14 1_toml_time_millisec 10 millisec tomlf_datetime [toml_time] millisec Public ), 1_toml_time_minute: (ExternalSymbol 14 1_toml_time_minute 10 minute tomlf_datetime [toml_time] minute Public ), 1_toml_time_second: (ExternalSymbol 14 1_toml_time_second 10 second tomlf_datetime [toml_time] second Public ), 1_toml_time_zone: (ExternalSymbol 14 1_toml_time_zone 10 zone tomlf_datetime [toml_time] zone Public ), lfortran_iomsg: (Variable 14 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lfortran_iomsg1: (Variable 14 lfortran_iomsg1 [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lhs: (Variable 14 lhs [] Out () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 14 rhs [] In () () Default (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. ) 7 toml_time Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) time_to_string (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .false. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 14 lhs) (Var 14 rhs)] [(If () (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 14 rhs) 14 1_toml_time_millisec (Allocatable (Integer 4) ) () )] 0 (Logical 4) () ) [(Allocate [((Var 14 lhs) [] (IntegerConstant 12 (Integer 4) Decimal) () (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (FileWrite 0 (Var 14 lhs) (Var 14 lfortran_iomsg) () () [(StringFormat (StringConstant "(i2.2,\":\",i2.2,\":\",i2.2,\".\",i3.3)" (String 1 (IntegerConstant 33 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(StructInstanceMember (Var 14 rhs) 14 1_toml_time_hour (Integer 4) () ) (StructInstanceMember (Var 14 rhs) 14 1_toml_time_minute (Integer 4) () ) (StructInstanceMember (Var 14 rhs) 14 1_toml_time_second (Integer 4) () ) (StructInstanceMember (Var 14 rhs) 14 1_toml_time_millisec (Allocatable (Integer 4) ) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () )] [(Allocate [((Var 14 lhs) [] (IntegerConstant 8 (Integer 4) Decimal) () (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (FileWrite 0 (Var 14 lhs) (Var 14 lfortran_iomsg1) () () [(StringFormat (StringConstant "(i2.2,\":\",i2.2,\":\",i2.2)" (String 1 (IntegerConstant 24 (Integer 4) Decimal) ExpressionLength DescriptorString) ) [(StructInstanceMember (Var 14 rhs) 14 1_toml_time_hour (Integer 4) () ) (StructInstanceMember (Var 14 rhs) 14 1_toml_time_minute (Integer 4) () ) (StructInstanceMember (Var 14 rhs) 14 1_toml_time_second (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] () () () .true. () () () () )] ) (If () (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 14 rhs) 14 1_toml_time_zone (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] 0 (Logical 4) () ) [(Assignment (Var 14 lhs) (IntrinsicElementalFunction StringConcat [(Var 14 lhs) (IntrinsicElementalFunction StringTrim [(StructInstanceMember (Var 14 rhs) 14 1_toml_time_zone (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] 0 (Allocatable (String 1 () DeferredLength DescriptorString) ) () )] 0 (String 1 () DeferredLength DescriptorString) () ) () .false. .false. )] [] )] () Private .true. .true. () ), toml_date: (Struct (SymbolTable 8 { day: (Variable 8 day [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), month: (Variable 8 month [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), to_string: (StructMethodDeclaration 8 to_string rhs date_to_string 7 date_to_string Source .false. .false. ), year: (Variable 8 year [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~assign: (CustomOperator 8 ~assign [8 to_string] Public ) }) toml_date (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) [] [year month day] [] Source Private .false. .false. .false. [] () () [] ), toml_datetime: (Struct (SymbolTable 9 { date: (Variable 9 date [] Local () () Default (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) 7 toml_date Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), time: (Variable 9 time [] Local () () Default (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 7 toml_time Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), to_string: (StructMethodDeclaration 9 to_string rhs datetime_to_string 7 datetime_to_string Source .false. .false. ), ~assign: (CustomOperator 9 ~assign [9 to_string] Public ) }) toml_datetime (StructType [(Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [] [date time] [] Source Private .false. .false. .false. [] () () [] ), toml_time: (Struct (SymbolTable 10 { hour: (Variable 10 hour [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), millisec: (Variable 10 millisec [] Local () () Default (Allocatable (Integer 4) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), minute: (Variable 10 minute [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), second: (Variable 10 second [] Local (IntegerConstant 0 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal) Save (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), to_string: (StructMethodDeclaration 10 to_string rhs time_to_string 7 time_to_string Source .false. .false. ), zone: (Variable 10 zone [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~assign: (CustomOperator 10 ~assign [10 to_string] Public ) }) toml_time (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [hour minute second millisec zone] [] Source Private .false. .false. .false. [] () () [] ), ~toml_time: (GenericProcedure 7 ~toml_time [7 new_toml_time] Public ) }) tomlf_datetime () [tomlf_datetime] .true. .false. .false. ), tomlf_utils: (Module (SymbolTable 2 { convert_raw: (ExternalSymbol 2 convert_raw 4 convert_raw tomlf_utils_convert [] convert_raw Public ), new_toml_time@~toml_time: (ExternalSymbol 2 new_toml_time@~toml_time 7 new_toml_time tomlf_datetime [] new_toml_time Public ), toml_date: (ExternalSymbol 2 toml_date 7 toml_date tomlf_datetime [] toml_date Public ), toml_datetime: (ExternalSymbol 2 toml_datetime 7 toml_datetime tomlf_datetime [] toml_datetime Public ), toml_raw_to_timestamp: (ExternalSymbol 2 toml_raw_to_timestamp 4 toml_raw_to_timestamp tomlf_utils_convert [] toml_raw_to_timestamp Public ), toml_time: (ExternalSymbol 2 toml_time 7 toml_time tomlf_datetime [] toml_time Public ), ~toml_time: (ExternalSymbol 2 ~toml_time 7 ~toml_time tomlf_datetime [] ~toml_time Public ) }) tomlf_utils () [tomlf_utils_convert tomlf_datetime] .false. .false. .false. ), tomlf_utils_convert: (Module (SymbolTable 4 { convert_raw: (GenericProcedure 4 convert_raw [4 toml_raw_to_timestamp] Public ), new_toml_time@~toml_time: (ExternalSymbol 4 new_toml_time@~toml_time 7 new_toml_time tomlf_datetime [] new_toml_time Public ), toml_date: (ExternalSymbol 4 toml_date 7 toml_date tomlf_datetime [] toml_date Public ), toml_datetime: (ExternalSymbol 4 toml_datetime 7 toml_datetime tomlf_datetime [] toml_datetime Public ), toml_raw_to_timestamp: (Function (SymbolTable 5 { 1_toml_datetime_date: (ExternalSymbol 5 1_toml_datetime_date 9 date tomlf_datetime [toml_datetime] date Public ), dot_pos: (Variable 5 dot_pos [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), err: (Variable 5 err [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), first: (Variable 5 first [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), raw: (Variable 5 raw [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), stat: (Variable 5 stat [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), timestamp: (Variable 5 timestamp [] Out () () Default (StructType [(Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) 4 toml_datetime Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) toml_raw_to_timestamp (FunctionType [(String 1 () AssumedLength DescriptorString) (StructType [(Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4) (Allocatable (Integer 4) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. )] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 raw) (Var 5 timestamp)] [(Assignment (Var 5 first) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 5 timestamp) 5 1_toml_datetime_date (Allocatable (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) ) () ) (StructConstructor 4 toml_date [((IntegerConstant 0 (Integer 4) Decimal)) ((IntegerConstant 0 (Integer 4) Decimal)) ((IntegerConstant 0 (Integer 4) Decimal))] (StructType [(Integer 4) (Integer 4) (Integer 4)] [] .true. .false. ) () ) () .false. .false. ) (Assignment (Var 5 stat) (IntegerCompare (Var 5 err) Eq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) () .false. .false. )] (Var 5 stat) Public .true. .true. () ), toml_time: (ExternalSymbol 4 toml_time 7 toml_time tomlf_datetime [] toml_time Public ), ~toml_time: (ExternalSymbol 4 ~toml_time 7 ~toml_time tomlf_datetime [] ~toml_time Public ) }) tomlf_utils_convert () [tomlf_datetime] .true. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-program_without_line_04-1467181.json0000664000175000017500000000100115227365530025771 0ustar alastairalastair{ "basename": "ast-program_without_line_04-1467181", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/errors/program_without_line_04.f90", "infile_hash": "5dd71811b458116465222710dc3764ee1b6409e2319dd89a99e0bb1d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-program_without_line_04-1467181.stderr", "stderr_hash": "22480cef181ec588afc64592b6fa0194336dc6923ce414c93fe29239", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-coarray_02-793f8b3.json0000664000175000017500000000073215227365530023350 0ustar alastairalastair{ "basename": "asr-coarray_02-793f8b3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/coarray_02.f90", "infile_hash": "44aa57421c584c7303ac985d318b599190ab1a634795e72cc1b3488a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-coarray_02-793f8b3.stderr", "stderr_hash": "08647c98a57c1f78ead31e8f8989aee8b6e65c75d38debbdf4739b7e", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-format_03-c54e532.json0000664000175000017500000000076015227365530023171 0ustar alastairalastair{ "basename": "ast-format_03-c54e532", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/format_03.f", "infile_hash": "107455615125bad6c1e6c16c87933b0eb35e24f89ade881088aa8acc", "outfile": null, "outfile_hash": null, "stdout": "ast-format_03-c54e532.stdout", "stdout_hash": "f6730381d2371bd1c655a9d3a7d35b47f4d6a952b429b6169f56fb37", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implied_do_loops3-1dce8fd.stdout0000664000175000017500000007005015227365530025575 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { implied_do_loop3: (Program (SymbolTable 2 { a: (Variable 2 a [j] Local (Cast (ArrayConstructor [(ImpliedDoLoop [(IntegerBinOp (Var 2 j) Mul (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [3, 6, 9] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) )] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [3, 6, 9] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ColMajor () ) IntegerToReal (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [3.00000000e+00, 6.00000000e+00, 9.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () ) (ArrayConstant 12 [3.00000000e+00, 6.00000000e+00, 9.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [j] Local (Cast (ArrayConstructor [(ImpliedDoLoop [(IntegerBinOp (Var 2 j) Mul (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [2, 4, 6] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) )] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [2, 4, 6] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ColMajor () ) IntegerToReal (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 12 [2.00000000e+00, 4.00000000e+00, 6.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () ) (ArrayConstant 12 [2.00000000e+00, 4.00000000e+00, 6.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Save (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) implied_do_loop3 [] [(Print (StringConstant "Loop 1" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(ImpliedDoLoop [(Var 2 i) (ImpliedDoLoop [(IntegerBinOp (Var 2 i) Mul (Var 2 j) (Integer 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Integer 4) () )] (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Loop 2" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(ImpliedDoLoop [(ImpliedDoLoop [(RealBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 4) ColMajor () ) Mul (ArrayItem (Var 2 b) [(() (Var 2 j) ())] (Real 4) ColMajor () ) (Real 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) () (Real 4) () )] (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Loop 3" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(ImpliedDoLoop [(ImpliedDoLoop [(RealBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 4) ColMajor () ) Mul (ArrayItem (Var 2 b) [(() (Var 2 j) ())] (Real 4) ColMajor () ) (Real 4) () )] (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Real 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) () (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Loop4" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(ImpliedDoLoop [(Var 2 i) (ImpliedDoLoop [(IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) (ImpliedDoLoop [(IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Add (Var 2 k) (Integer 4) () )] (Var 2 k) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) () (Integer 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) () (Integer 4) () )] (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Loop5" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(ImpliedDoLoop [(Var 2 i) (ImpliedDoLoop [(IntegerBinOp (Var 2 i) Mul (Var 2 j) (Integer 4) () ) (ImpliedDoLoop [(IntegerBinOp (IntegerBinOp (Var 2 i) Mul (Var 2 j) (Integer 4) () ) Add (Var 2 k) (Integer 4) () )] (Var 2 k) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) () (Integer 4) () )] (Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) () (Integer 4) () )] (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) () (Integer 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/run-print_09-8516006.stdout0000664000175000017500000000035015227365530023263 0ustar alastairalastair0.140000001 123.456001 1.00000005E-03 1.49999996E-05 0.14000000000000001 456.78899999999999 1.0000000000000000E-004 0.140000001 123.456001 1.00000005E-03 1.49999996E-05 0.14000000000000001 456.78899999999999 1.0000000000000000E-004 lfortran-0.64.0/tests/reference/asr-fn6-a24010a.stdout0000664000175000017500000000012715227365530022412 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { }) [] ) lfortran-0.64.0/tests/reference/cpp-case_05-96724df.stdout0000664000175000017500000000206015227365530023170 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { static std::string grade="B"; if (grade == "A") { std::cout<< "Excellent!"< define i32 @__module_string_54_mod_double_(i32* %x) { .entry: %ret = alloca i32, align 4 %0 = load i32, i32* %x, align 4 %1 = mul i32 %0, 2 store i32 %1, i32* %ret, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_double_ FINALIZE_SYMTABLE_double_: ; preds = %return %2 = load i32, i32* %ret, align 4 ret i32 %2 } define void @__module_string_54_mod_foo_sub(i32* %x, %string_descriptor* %char) { .entry: br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_foo_sub FINALIZE_SYMTABLE_foo_sub: ; preds = %return ret void } define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() %char = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store %string_descriptor zeroinitializer, %string_descriptor* %char, align 1 %3 = getelementptr %string_descriptor, %string_descriptor* %char, i32 0, i32 1 store i64 10, i64* %3, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %char, i32 0, i32 0 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 10) store i8* %6, i8** %4, align 8 %x = alloca i32, align 4 store i32 10, i32* %x, align 4 call void @__module_string_54_mod_foo_sub(i32* %x, %string_descriptor* %char) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_string_54 FINALIZE_SYMTABLE_string_54: ; preds = %return br label %Finalize_Variable_char Finalize_Variable_char: ; preds = %FINALIZE_SYMTABLE_string_54 %7 = getelementptr %string_descriptor, %string_descriptor* %char, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %8) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-array_01_transfer-125156e.json0000664000175000017500000000077515227365530024643 0ustar alastairalastair{ "basename": "asr-array_01_transfer-125156e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/array_01_transfer.f90", "infile_hash": "920caa9e18706045e10e552111ebbdee612fb11bdc829a77fcfa71ca", "outfile": null, "outfile_hash": null, "stdout": "asr-array_01_transfer-125156e.stdout", "stdout_hash": "4759d25b09e8f171189ff5ee9bb0f79be28234b8f47249915a6a78ad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-goto_02-48f3a02.stdout0000664000175000017500000000102115227365530023663 0ustar alastairalastairprogram goto2 implicit none integer :: A A = 0 1 continue write(*, *) A = A + 1 if (A > 2) then go to 95 end if write(*, *) "A =", A, " Starting" if (A == 1) then go to 10 end if go to 20 10 continue write(*, *) "A =", A, " Got to 10" go to 30 20 continue write(*, *) "A =", A, " Got to 20" 30 continue write(*, *) "A =", A, " Got to 30" if (A == 2) then go to 99 end if go to 1 95 continue write(*, *) "A =", A, " Got to 95" 99 continue write(*, *) "A =", A, " Got to 99" stop " " end program goto2 lfortran-0.64.0/tests/reference/asr-nested_06-1d576ad.json0000664000175000017500000000074515227365530023250 0ustar alastairalastair{ "basename": "asr-nested_06-1d576ad", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_06.f90", "infile_hash": "b94500b7f8becc154e61ec7d99e50e8c4cbbd4c0ca20bb262a670562", "outfile": null, "outfile_hash": null, "stdout": "asr-nested_06-1d576ad.stdout", "stdout_hash": "47546ff29c7abc34014ae4b184473fdf98026ca0387dae8c23e7bad3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-matrix_transpose_01-f8038ce.json0000664000175000017500000000076515227365530025372 0ustar alastairalastair{ "basename": "asr-matrix_transpose_01-f8038ce", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/matrix_transpose_01.f90", "infile_hash": "0c478df59b5d52e60f6b4056b366a18dcb7652c887a2edb4745bcf9d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-matrix_transpose_01-f8038ce.stderr", "stderr_hash": "ee6e99f9b10deebcb64718039cba89686a12bc1bf0e1c39e58588ca9", "returncode": 2 }lfortran-0.64.0/tests/reference/run-implicit_argument_casting_01-0d962d9.json0000664000175000017500000000110615227365530027142 0ustar alastairalastair{ "basename": "run-implicit_argument_casting_01-0d962d9", "cmd": "lfortran --implicit-argument-casting --disable-implicit-argument-casting --no-color {infile}", "infile": "tests/../integration_tests/implicit_argument_casting_01.f90", "infile_hash": "3ed389916666e17233ec1aa288c9e7cfee00c97aacc83db1aeec5c7b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-implicit_argument_casting_01-0d962d9.stderr", "stderr_hash": "79cbdb3deeefc4c8dea93fb4b13541c2b274bce36ad244f5530895b1", "returncode": 1 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor3-1a6f5d9.stdout0000664000175000017500000000750115227365530027111 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor3: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor3 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (IntegerBinOp (IntegerConstant 12345678 (Integer 4) Decimal) Add (IntegerConstant 12345678 (Integer 4) Decimal) (Integer 4) (IntegerConstant 24691356 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics4-113f724.json0000664000175000017500000000073515227365530023565 0ustar alastairalastair{ "basename": "asr-intrinsics4-113f724", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics4.f90", "infile_hash": "ed2175be9e9694d0cef36f97f3f74e236df03c8b2cc7ab3f155b5025", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics4-113f724.stderr", "stderr_hash": "e94926ba113ba92924586f3fc087a609306665c3bb90feeb36f9fc16", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-callback_01-facbb46.stdout0000664000175000017500000001042215227365530024400 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @__module_callback_01_cb(float (float*)* %f, float* %a, float* %b) { .entry: %cb = alloca float, align 4 %0 = load float, float* %b, align 4 %1 = load float, float* %a, align 4 %2 = fsub float %0, %1 %3 = call float %f(float* %a) %4 = fadd float %2, %3 %5 = call float %f(float* %b) %6 = fadd float %4, %5 store float %6, float* %cb, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_cb FINALIZE_SYMTABLE_cb: ; preds = %return %7 = load float, float* %cb, align 4 ret float %7 } declare float @f(float*) define void @__module_callback_01_foo(float* %c, float* %d) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call float @__module_callback_01_cb(float (float*)* @foo.__module_callback_01_f, float* %c, float* %d) %3 = alloca float, align 4 store float %2, float* %3, align 4 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, float* %3) %5 = load i64, i64* %1, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_foo FINALIZE_SYMTABLE_foo: ; preds = %return ret void } define float @foo.__module_callback_01_f(float* %x) { .entry: %f = alloca float, align 4 %0 = load float, float* %x, align 4 %1 = fmul float 2.000000e+00, %0 store float %1, float* %f, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return %2 = load float, float* %f, align 4 ret float %2 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value1 = alloca float, align 4 %call_arg_value = alloca float, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store float 1.500000e+00, float* %call_arg_value, align 4 store float 2.000000e+00, float* %call_arg_value1, align 4 call void @__module_callback_01_foo(float* %call_arg_value, float* %call_arg_value1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-incompatible_ranks_allocatable_arr2-699f9ab.json0000664000175000017500000000104515227365530030606 0ustar alastairalastair{ "basename": "asr-incompatible_ranks_allocatable_arr2-699f9ab", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incompatible_ranks_allocatable_arr2.f90", "infile_hash": "ffa862b282f0003e81ae019d774be1b094305f8afe7aa07a8c4fb663", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incompatible_ranks_allocatable_arr2-699f9ab.stderr", "stderr_hash": "859149ac9cbf256cb5a4318dc74776437006cbfc2044128a51f94db8", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-modules_52-5261d38.json0000664000175000017500000000075015227365530023274 0ustar alastairalastair{ "basename": "asr-modules_52-5261d38", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_52.f90", "infile_hash": "640dd46fb2d4c29ca80decea7bf1e44a075d14193b200b95c56cee89", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_52-5261d38.stdout", "stdout_hash": "5ffc9202dc16e67c1e1b52f3be95face4193431729ec886b5c848430", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-associate_01-4a4ac5c.stderr0000664000175000017500000000025615227365530024336 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/associate_01.f90:18:8 | 18 | if(a(1).EQ.5) GO TO 1 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/ast_f90-doloop_04-c0ab107.json0000664000175000017500000000076015227365530023717 0ustar alastairalastair{ "basename": "ast_f90-doloop_04-c0ab107", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/doloop_04.f90", "infile_hash": "d2027c560ba8546e31b7627200b8fb28695617c3238a8f1a086c62ef", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-doloop_04-c0ab107.stdout", "stdout_hash": "f873113b1563c79019ea37160fdf4055c707217c0becce3b009a70f6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_typing1-45de3a2.json0000664000175000017500000000077615227365530024746 0ustar alastairalastair{ "basename": "asr-implicit_typing1-45de3a2", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/errors/implicit_typing1.f90", "infile_hash": "023385ae1cffd8cc74cd969d2a2ea8fc4cbc958e5bb0ca340f5c6118", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_typing1-45de3a2.stderr", "stderr_hash": "ae9589c5db61e45a67309453ee8e0d3425e569617b4e41104f5eb62d", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-complex_pow_test-2b160e8.json0000664000175000017500000000077515227365530025160 0ustar alastairalastair{ "basename": "llvm-complex_pow_test-2b160e8", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_pow_test.f90", "infile_hash": "cc3e566ed81771c2b1c24916ac5bcd29fde8fef80826cc84d56d72fa", "outfile": null, "outfile_hash": null, "stdout": "llvm-complex_pow_test-2b160e8.stdout", "stdout_hash": "004884fb21f8c88daddbb83cb0213ae6c820977883bdc0ee06df0d9f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-float1-817e0db.json0000664000175000017500000000071615227365530022644 0ustar alastairalastair{ "basename": "asr-float1-817e0db", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/float1.f90", "infile_hash": "55dfda74a97e804376ef0789c76876426844dc611542c0c6947ef9e0", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-float1-817e0db.stderr", "stderr_hash": "1f0f7eed328eb29e5c62b7944807320a02636a5cda8da98f08f2d582", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-entry_02-b8ee2e2.json0000664000175000017500000000074215227365530023201 0ustar alastairalastair{ "basename": "asr-entry_02-b8ee2e2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/entry_02.f90", "infile_hash": "b08199e4a4c1b3cec42730d5ef5520b9f0e1d547084894787c36d877", "outfile": null, "outfile_hash": null, "stdout": "asr-entry_02-b8ee2e2.stdout", "stdout_hash": "3176f9bd4c4515deb5a65fc189e8d69045b1fe752f3069458bfec83f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-data1-4f93542.stdout0000664000175000017500000000302115227365530022661 0ustar alastairalastair(TranslationUnit [(Program test_data () [] [] [(Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [] [(coef [(1 10 DimensionExpr) (1 1 DimensionExpr)] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray coef [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 10 () )] [(Real "1.0d0") (Real "2.0d0") (Real "3.0d0") (Real "3.0d0") (Real "3.0d0") (Real "4.0d0") (Real "4.0d0") (Real "4.0d0") (Real "4.0d0") (Real "4.0d0")] )] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-template_sort_01-b412f73.json0000664000175000017500000000077215227365530024560 0ustar alastairalastair{ "basename": "asr-template_sort_01-b412f73", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_sort_01.f90", "infile_hash": "5e6f0ec6f2e9d533d188f1fa2a9b82e4c6f007962376a942c9e47b70", "outfile": null, "outfile_hash": null, "stdout": "asr-template_sort_01-b412f73.stdout", "stdout_hash": "39fea91803230a2267fbd64836f0a5470a563b8ab34f6c757c82b740", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-where_01-c45f2da.stdout0000664000175000017500000007301415227365530023520 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { where_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) where_01 [] [(Assignment (Var 2 a) (ArrayBroadcast (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [-2, -2, -2, ...., -2, -2, -2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 8 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 b) (ArrayBroadcast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [-3, -3, -3, ...., -3, -3, -3] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (Where (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (Where (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (Where (IntegerCompare (Var 2 a) GtE (IntegerConstant 0 (Integer 4) Decimal) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 1 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [1, 1, 1, ...., 1, 1, 1] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 b) (ArrayBroadcast (IntegerConstant 0 (Integer 4) Decimal) (ArrayConstant 4 [10] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 40 [0, 0, 0, ...., 0, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] ) (If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal) ()) [(If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 6 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(If () (RealCompare (Cast (IntrinsicElementalFunction Abs [(IntegerBinOp (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) Sub (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () )] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (Print (StringFormat () [(Var 2 b)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-intrinsics_23-db1ffb5.json0000664000175000017500000000076115227365530024306 0ustar alastairalastair{ "basename": "asr-intrinsics_23-db1ffb5", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_23.f90", "infile_hash": "3e162c296e5df394ddaea3689028b9cb97cd97e8bf9fdc0296eb6697", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_23-db1ffb5.stdout", "stdout_hash": "fa015434ce34a78a7912c074f27d0e4e36400cd78dcc822748e8a3b9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_06-8523892.stdout0000664000175000017500000002467715227365530024327 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_06: (Program (SymbolTable 2 { dp: (Variable 2 dp [] Local (TypeInquiry Kind (Real 8) (RealConstant 0.000000 (Real 8) ) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) (IntegerConstant 8 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_06 [] [(Assignment (Var 2 x) (IntrinsicElementalFunction Asin [(RealConstant 0.841471 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Acos [(RealConstant 0.540302 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Atan [(RealConstant 1.557408 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (Cast (IntrinsicElementalFunction Atan [(RealConstant 1.557408 (Real 8) )] 0 (Real 8) (RealConstant 1.000000 (Real 8) ) ) RealToReal (Real 4) (RealConstant 1.000000 (Real 4) ) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Asinh [(RealConstant 1.175201 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Acosh [(RealConstant 1.543081 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Atanh [(RealConstant 0.761594 (Real 4) )] 0 (Real 4) (RealConstant 1.000000 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/fortran-coarray_operations_01-fb45389.json0000664000175000017500000000110515227365530026472 0ustar alastairalastair{ "basename": "fortran-coarray_operations_01-fb45389", "cmd": "lfortran --pass=coarray --show-fortran --no-color {infile} -o {outfile} --no-error-banner --line=-1 --column=-1 --coarray=true", "infile": "tests/coarray_operations_01.f90", "infile_hash": "3dd51dbbed0a1f937dc5cd284c9bfbd0fcf6ac91c38897c48892db46", "outfile": null, "outfile_hash": null, "stdout": "fortran-coarray_operations_01-fb45389.f90", "stdout_hash": "2b2134c9f7e2fafb1a18a81991a88af8574a4151c8990e3728cf7085", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/ast_f90-types_12-e6251f2.stdout0000664000175000017500000000045415227365530024074 0ustar alastairalastairprogram types_12 use iso_c_binding, only: c_int, c_double implicit none interface integer(c_int) function f(a, b) result(r) import :: c_int, c_double integer(c_int), value, intent(in) :: a real(c_double), value, intent(in) :: b end function f end interface end program types_12 lfortran-0.64.0/tests/reference/run-scalar_allocation_check_02-b6aed2a.stderr0000664000175000017500000000033015227365530027261 0ustar alastairalastairruntime error: Tried to access member of unallocated variable 'var' --> tests/errors/scalar_allocation_check_02.f90:14:22 | 14 | print *, var%x | ^^^^^ 'var' unallocated here lfortran-0.64.0/tests/reference/run-file_53-1d4a0dc.json0000664000175000017500000000070715227365530022771 0ustar alastairalastair{ "basename": "run-file_53-1d4a0dc", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/file_53.f90", "infile_hash": "1937fd46d6c05258e36dfe4dbdd82dc619c68d2ba71c76a7944c142d", "outfile": null, "outfile_hash": null, "stdout": "run-file_53-1d4a0dc.stdout", "stdout_hash": "91e44f36e9c7d4fd09362ee3916db19e31bc82217699314c386977cc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-return_02-99fb0b3.stderr0000664000175000017500000000105215227365530024013 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/return_02.f90:13:15 | 13 | if (i .EQ. 1) then | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/return_02.f90:17:15 | 17 | if (i .EQ. 2) then | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/return_02.f90:21:15 | 21 | if (i .EQ. 3) then | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/asr-template_simple_01-964c12e.json0000664000175000017500000000100015227365530025050 0ustar alastairalastair{ "basename": "asr-template_simple_01-964c12e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_simple_01.f90", "infile_hash": "52481db9c7b9e39192c8e234b6229517bfb5fb1ddc464a8bb4868784", "outfile": null, "outfile_hash": null, "stdout": "asr-template_simple_01-964c12e.stdout", "stdout_hash": "a1ec7332a7f67f037c2db850066e49eba896ba2251777f481302ca3a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-interface_05-5639d22.json0000664000175000017500000000075615227365530023572 0ustar alastairalastair{ "basename": "asr-interface_05-5639d22", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/interface_05.f90", "infile_hash": "a6509198926e454d1aa09c90a70bf6760452f8ed5923cebde47a166f", "outfile": null, "outfile_hash": null, "stdout": "asr-interface_05-5639d22.stdout", "stdout_hash": "659379696314f3017b5609fc2ac4c6a29b23329528cd1087233e010d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_13-e4a94c8.stderr0000664000175000017500000000027715227365530026170 0ustar alastairalastairruntime error: Argument 1 of subroutine my is unallocated. --> tests/errors/array_bounds_check_13.f90:27:13 | 27 | call my(my_array, i) | ^^^^^^^^ This is unallocated lfortran-0.64.0/tests/reference/asr-modules_29-dc71c55.stdout0000664000175000017500000027146015227365530024020 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { fpm_git1: (Module (SymbolTable 15 { git_target_branch: (Function (SymbolTable 17 { 1_git_target_t_object: (ExternalSymbol 17 1_git_target_t_object 16 object fpm_git1 [git_target_t] object Public ), 1_git_target_t_url: (ExternalSymbol 17 1_git_target_t_url 16 url fpm_git1 [git_target_t] url Public ), branch: (Variable 17 branch [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 17 self [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 15 git_target_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), url: (Variable 17 url [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) git_target_branch (FunctionType [(String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString)] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 17 url) (Var 17 branch)] [(Assignment (StructInstanceMember (Var 17 self) 17 1_git_target_t_url (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Var 17 url) () .false. .false. ) (Assignment (StructInstanceMember (Var 17 self) 17 1_git_target_t_object (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Var 17 branch) () .false. .false. )] (Var 17 self) Public .true. .true. () ), git_target_t: (Struct (SymbolTable 16 { object: (Variable 16 object [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), url: (Variable 16 url [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) git_target_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [url object] [] Source Public .false. .false. .false. [] () () [] ) }) fpm_git1 () [] .true. .false. .false. ), fpm_manifest_dependency1: (Module (SymbolTable 8 { dependency_config_t: (Struct (SymbolTable 9 { git: (Variable 9 git [] Local () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 8 git_target_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 9 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), path: (Variable 9 path [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dependency_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [] [name path git] [] Source Public .false. .false. .false. [] () () [] ), error_t: (Struct (SymbolTable 10 { message: (Variable 10 message [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) error_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [message] [] Source Public .false. .false. .false. [] () () [] ), git_target_branch: (ExternalSymbol 8 git_target_branch 15 git_target_branch fpm_git1 [] git_target_branch Public ), git_target_t: (ExternalSymbol 8 git_target_t 15 git_target_t fpm_git1 [] git_target_t Public ), new_dependencies: (Function (SymbolTable 12 { deps: (Variable 12 deps [] Out () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 8 dependency_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), error: (Variable 12 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 8 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), root: (Variable 12 root [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), table: (Variable 12 table [] InOut () () Default (StructType [(Logical 4)] [] .true. .false. ) 8 toml_table Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_dependencies (FunctionType [(Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) (StructType [(Logical 4)] [] .true. .false. ) (String 1 () AssumedLength DescriptorString) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 12 deps) (Var 12 table) (Var 12 root) (Var 12 error)] [] () Public .true. .true. () ), new_dependency: (Function (SymbolTable 13 { 1_dependency_config_t_git: (ExternalSymbol 13 1_dependency_config_t_git 9 git fpm_manifest_dependency1 [dependency_config_t] git Public ), obj: (Variable 13 obj [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 13 self [] Out () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) 8 dependency_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), url: (Variable 13 url [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_dependency (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 13 self)] [(If () (LogicalNot (IntrinsicImpureFunction Allocated [(StructInstanceMember (Var 13 self) 13 1_dependency_config_t_git (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () )] 0 (Logical 4) () ) (Logical 4) () ) [(Allocate [((StructInstanceMember (Var 13 self) 13 1_dependency_config_t_git (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ) [] () () ())] () () () )] [] ) (Assignment (StructInstanceMember (Var 13 self) 13 1_dependency_config_t_git (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) () ) (FunctionCall 8 git_target_branch () [((Var 13 url)) ((Var 13 obj))] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () () ) () .false. .false. )] () Public .true. .true. () ), toml_table: (Struct (SymbolTable 11 { inline: (Variable 11 inline [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) toml_table (StructType [(Logical 4)] [] .true. .false. ) [] [inline] [] Source Public .false. .false. .false. [] () () [] ) }) fpm_manifest_dependency1 () [fpm_git1] .true. .false. .false. ), fpm_manifest_executable: (Module (SymbolTable 4 { dependency_config_t: (ExternalSymbol 4 dependency_config_t 8 dependency_config_t fpm_manifest_dependency1 [] dependency_config_t Public ), error_t: (ExternalSymbol 4 error_t 8 error_t fpm_manifest_dependency1 [] error_t Public ), executable_config_t: (Struct (SymbolTable 5 { dependency: (Variable 5 dependency [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 4 dependency_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), main: (Variable 5 main [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), name: (Variable 5 name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), source_dir: (Variable 5 source_dir [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) executable_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) [] [name source_dir main dependency] [] Source Public .false. .false. .false. [] () () [] ), new_dependencies: (ExternalSymbol 4 new_dependencies 8 new_dependencies fpm_manifest_dependency1 [] new_dependencies Public ), new_executable: (Function (SymbolTable 6 { 1_executable_config_t_dependency: (ExternalSymbol 6 1_executable_config_t_dependency 5 dependency fpm_manifest_executable [executable_config_t] dependency Public ), child: (Variable 6 child [] Local () () Default (Pointer (StructType [(Logical 4)] [] .true. .false. ) ) 4 toml_table Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), error: (Variable 6 error [] Out () () Default (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ) 4 error_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 6 self [] Out () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) 4 executable_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), table: (Variable 6 table [] InOut () () Default (StructType [(Logical 4)] [] .true. .false. ) 4 toml_table Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_executable (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) )] [] .true. .false. ) (StructType [(Logical 4)] [] .true. .false. ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 self) (Var 6 table) (Var 6 error)] [(SubroutineCall 4 new_dependencies () [((StructInstanceMember (Var 6 self) 6 1_executable_config_t_dependency (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) () )) ((Var 6 child)) (()) ((Var 6 error))] () .false. )] () Public .true. .true. () ), toml_table: (ExternalSymbol 4 toml_table 8 toml_table fpm_manifest_dependency1 [] toml_table Public ) }) fpm_manifest_executable () [fpm_manifest_dependency1] .true. .false. .false. ), modules_29: (Program (SymbolTable 2 { dependency_config_t: (ExternalSymbol 2 dependency_config_t 8 dependency_config_t fpm_manifest_dependency1 [] dependency_config_t Public ), error_t: (ExternalSymbol 2 error_t 8 error_t fpm_manifest_dependency1 [] error_t Public ), executable_config_t: (ExternalSymbol 2 executable_config_t 4 executable_config_t fpm_manifest_executable [] executable_config_t Public ), new_dependencies: (ExternalSymbol 2 new_dependencies 8 new_dependencies fpm_manifest_dependency1 [] new_dependencies Public ), new_executable: (ExternalSymbol 2 new_executable 4 new_executable fpm_manifest_executable [] new_executable Public ), toml_table: (ExternalSymbol 2 toml_table 8 toml_table fpm_manifest_dependency1 [] toml_table Public ) }) modules_29 [fpm_manifest_executable fpm_manifest_dependency1] [(Print (StringConstant "running modules_29 program" (String 1 (IntegerConstant 26 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-bits1-e91f9ad.stdout0000664000175000017500000000736115227365530023144 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { bits1: (Program (SymbolTable 2 { arr2: (Variable 2 arr2 [] Local (ArrayConstant 24 [1042890, 20, 30] (Array (Integer 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (ArrayConstant 24 [1042890, 20, 30] (Array (Integer 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Save (Array (Integer 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bits1 [] [(Print (StringFormat () [(IntrinsicElementalFunction Ibits [(Var 2 arr2) (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)] 0 (Array (Integer 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-bin_op_complex_dp-8ead434.stdout0000664000175000017500000000624515227365530025701 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> %complex_8 = type <{ double, double }> %complex_4 = type <{ float, float }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [32 x i8] c"{R4,R4},{R8,R8},{R4,R4},{R8,R8}\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %u = alloca %complex_8, align 8 %v = alloca %complex_8, align 8 %x = alloca %complex_4, align 8 %zero = alloca %complex_4, align 8 store %complex_4 <{ float 0x3FC24924A0000000, float 0.000000e+00 }>, %complex_4* %zero, align 1 store %complex_8 <{ double 0x3FC2492492492492, double 0.000000e+00 }>, %complex_8* %u, align 1 store %complex_8 <{ double 0x3FC2492492492492, double 0.000000e+00 }>, %complex_8* %v, align 1 store %complex_4 <{ float 0x3FC24924A0000000, float 0.000000e+00 }>, %complex_4* %x, align 1 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* %zero, %complex_8* %v, %complex_4* %x, %complex_8* %u) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_bin_op_complex_dp FINALIZE_SYMTABLE_bin_op_complex_dp: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/cpp-types_05-06dea62.json0000664000175000017500000000072515227365530023120 0ustar alastairalastair{ "basename": "cpp-types_05-06dea62", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/types_05.f90", "infile_hash": "96f8e950abafbc42b9d0438efdca0a8355bb2bd7b4b168ee23063521", "outfile": null, "outfile_hash": null, "stdout": "cpp-types_05-06dea62.stdout", "stdout_hash": "a5794213f0c176d630f4d6bf958bdb932d7c8d293fa6eaddb5b62cfd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-external_03-c3442bb.json0000664000175000017500000000076515227365530023764 0ustar alastairalastair{ "basename": "llvm-external_03-c3442bb", "cmd": "lfortran --show-llvm --implicit-typing --implicit-interface {infile} -o {outfile}", "infile": "tests/external_03.f90", "infile_hash": "82ee198be6d031398277671c0c2f48a832124a1458e94c3317d080ba", "outfile": null, "outfile_hash": null, "stdout": "llvm-external_03-c3442bb.stdout", "stdout_hash": "326d816fcba3e1950dee57dfba2201f9889ab012b051a6a0cde7d03f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-modules_12-09f81d9.stdout0000664000175000017500000000022515227365530024245 0ustar alastairalastairmodule module_12 end function main() a[5] = 5 if a[5] ≠ 5 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/ast-loop_test3-f4e458f.stdout0000664000175000017500000001117315227365530024136 0ustar alastairalastair(TranslationUnit [(Program test () [] [] [] [(DoLoop 0 () 240 k 1 mp () [(Assignment 0 (FuncCallOrArray con [] [(() k () 0)] [] [] [] ) (u- (FuncCallOrArray datmat [] [(() k () 0) (() np () 0)] [] [] [] )) () ) (DoLoop 0 () 220 j 1 n () [(Assignment 220 (FuncCallOrArray w [] [(() j () 0)] [] [] [] ) (+ (FuncCallOrArray datmat [] [(() k () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray con [] [(() k () 0)] [] [] [] )) () )] () () ) (DoLoop 0 () 240 i 1 n () [(Assignment 0 temp (Real "0.0d0") () ) (DoLoop 0 () 230 j 1 n () [(Assignment 230 temp (+ temp (* (FuncCallOrArray w [] [(() j () 0)] [] [] [] ) (FuncCallOrArray simi [] [(() j () 0) (() i () 0)] [] [] [] ))) () )] () () ) (If 0 () (== k mp) [(Assignment 0 temp (u- temp) () )] [] () () () ) (Assignment 240 (FuncCallOrArray a [] [(() i () 0) (() k () 0)] [] [] [] ) temp () )] () () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/wat-doloop_02-1ee6409.json0000664000175000017500000000073015227365530023200 0ustar alastairalastair{ "basename": "wat-doloop_02-1ee6409", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/doloop_02.f90", "infile_hash": "3f887434509231f48fbbbda31f34778f17ddb6871b39c44626d54f2e", "outfile": null, "outfile_hash": null, "stdout": "wat-doloop_02-1ee6409.stdout", "stdout_hash": "6a02db35e9677d082a117d78c0be5005628dbe232b47c35d41c6d258", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-implicit_check-4f0391f.stdout0000664000175000017500000000105315227365530024715 0ustar alastairalastair(TranslationUnit [(Program main () [] [(Implicit [(ImplicitSpec (AttrType TypeDoublePrecision [] () () None ) [(LetterSpec A H ) (LetterSpec O Z )] )] () )] [] [] [] )] ) lfortran-0.64.0/tests/reference/ast-types_10-8a81911.json0000664000175000017500000000074215227365530022765 0ustar alastairalastair{ "basename": "ast-types_10-8a81911", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_10.f90", "infile_hash": "2d1357260f2fc09e94884cf4955b12f3f35407dc0b74358b32019f36", "outfile": null, "outfile_hash": null, "stdout": "ast-types_10-8a81911.stdout", "stdout_hash": "c96bb9e0d18561beddb5d878554670fb27d7c30a97784bd252a11baa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/mod_to_asr-mod1-14-bb0bd17.stderr0000664000175000017500000000013315227365530024473 0ustar alastairalastairThe following argument was not expected: --no-indent Run with --help for more information. lfortran-0.64.0/tests/reference/ast-template_struct_01-f11e745.json0000664000175000017500000000100015227365530025104 0ustar alastairalastair{ "basename": "ast-template_struct_01-f11e745", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_struct_01.f90", "infile_hash": "f66f5d6abfb085636af3a1f278953ef2297f93f3a209002272e6d1f8", "outfile": null, "outfile_hash": null, "stdout": "ast-template_struct_01-f11e745.stdout", "stdout_hash": "b27f096b4baa3001c792235947dbe136b692cc46b31e2555540973e1", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-int_02-e7de6a7.json0000664000175000017500000000073415227365530022641 0ustar alastairalastair{ "basename": "asr-int_02-e7de6a7", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/int_02.f90", "infile_hash": "e0a72e598a44c468855decece6cfbb029978d0775ad4aae887346aed", "outfile": null, "outfile_hash": null, "stdout": "asr-int_02-e7de6a7.stdout", "stdout_hash": "cd8d2ec6b3153634edf61ab414ecb10b35dda3ccc4b0c03e88185e32", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-string_assignment_02-84c751f.stderr0000664000175000017500000000010615227365530026006 0ustar alastairalastairLFORTRAN ERROR: Run-time Error : Copying from unallocated RHS string. lfortran-0.64.0/tests/reference/asr-kokkos_program2-8391215.stdout0000664000175000017500000006536315227365530024734 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { kokkos_program2: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), nsize: (Variable 2 nsize [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), scalar: (Variable 2 scalar [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), triad: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Out () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), scalar: (Variable 3 scalar [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triad (FunctionType [(Array (Real 4) [(() ())] DescriptorArray ) (Array (Real 4) [(() ())] DescriptorArray ) (Real 4) (Array (Real 4) [(() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 scalar) (Var 3 c)] [(Assignment (Var 3 n) (ArraySize (Var 3 a) () (Integer 4) () ) () .false. .false. ) (DoConcurrentLoop [((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 3 n) ())] [] [] [] [(Assignment (ArrayItem (Var 3 c) [(() (Var 3 i) ())] (Real 4) ColMajor () ) (RealBinOp (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Real 4) ColMajor () ) Add (RealBinOp (Var 3 scalar) Mul (ArrayItem (Var 3 b) [(() (Var 3 i) ())] (Real 4) ColMajor () ) (Real 4) () ) (Real 4) () ) () .false. .false. )] )] () Public .true. .true. () ) }) kokkos_program2 [] [(Assignment (Var 2 scalar) (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 10.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 nsize) (ArraySize (Var 2 a) () (Integer 4) (IntegerConstant 10000 (Integer 4) Decimal) ) () .false. .false. ) (DoConcurrentLoop [((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 nsize) ())] [] [] [] [(Assignment (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. )] ) (SubroutineCall 2 triad () [((ArrayPhysicalCast (Var 2 a) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 2 b) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] DescriptorArray ) () )) ((Var 2 scalar)) ((ArrayPhysicalCast (Var 2 c) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10000 (Integer 4) Decimal))] DescriptorArray ) () ))] () .false. ) (Print (StringConstant "End Stream Triad" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-sole_intrinsic-3e826bd.stdout0000664000175000017500000001326515227365530025061 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { f: (Variable 2 f [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (ComplexConstructor (RealConstant 1.000000 (Real 4) ) (RealUnaryMinus (RealConstant 3.000000 (Real 4) ) (Real 4) (RealConstant -3.000000 (Real 4) ) ) (Complex 4) (ComplexConstant 1.000000 -3.000000 (Complex 4) ) ) (ComplexConstant 1.000000 -3.000000 (Complex 4) ) Save (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Assignment (Var 2 f) (IntrinsicElementalFunction Cmplx [(IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) (ComplexConstant 3.000000 1.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 y) (IntrinsicElementalFunction Aimag [(Var 2 x)] 0 (Real 4) () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_openmp-do_concurrent_01-2a6df8c.stdout0000664000175000017500000005502415227365530027017 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { _lcompilers_mlir_gpu_offloading: (Module (SymbolTable 3 { _lcompilers_doconcurrent_replacer_func: (Function (SymbolTable 4 { i: (Variable 4 i [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 4 n [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] InOut () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_doconcurrent_replacer_func (FunctionType [(Integer 4) (Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray )] () BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 i) (Var 4 n) (Var 4 x)] [(DoConcurrentLoop [((Var 4 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 4 n) ())] [] [] [] [(Print (StringFormat () [(ArrayItem (Var 4 x) [(() (Var 4 i) ())] (Real 4) ColMajor () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 4 x) [(() (Var 4 i) ())] (Real 4) ColMajor () ) Sub (RealConstant 0.490000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000001 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] )] () Public .false. .false. () ) }) _lcompilers_mlir_gpu_offloading () [] .false. .false. .false. ), do_concurrent_01: (Program (SymbolTable 2 { _lcompilers_doconcurrent_replacer_func: (Function (SymbolTable 5 { i: (Variable 5 i [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 5 n [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] InOut () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) _lcompilers_doconcurrent_replacer_func (FunctionType [(Integer 4) (Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 i) (Var 5 n) (Var 5 x)] [] () Public .false. .false. () ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) do_concurrent_01 [] [(Assignment (Var 2 n) (IntegerConstant 12 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 x) (ArrayBroadcast (RealConstant 0.490000 (Real 4) ) (ArrayConstant 4 [12] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 48 [4.90000010e-01, 4.90000010e-01, 4.90000010e-01, ...., 4.90000010e-01, 4.90000010e-01, 4.90000010e-01] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 12 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. ) (SubroutineCall 2 _lcompilers_doconcurrent_replacer_func 2 _lcompilers_doconcurrent_replacer_func [((Var 2 i)) ((Var 2 n)) ((Var 2 x))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-cmplx_02-48bb125.stdout0000664000175000017500000000054315227365530023366 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { cmplx_02: (Program (SymbolTable 2 { }) cmplx_02 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/ast-assign_to2-d8aade7.json0000664000175000017500000000075115227365530023672 0ustar alastairalastair{ "basename": "ast-assign_to2-d8aade7", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/assign_to2.f", "infile_hash": "ee4e7d00ab3171c8b0f275f477b422d3a59370501dacc72ce4e11fc6", "outfile": null, "outfile_hash": null, "stdout": "ast-assign_to2-d8aade7.stdout", "stdout_hash": "7dd702e6ed1c8d800f06f85ac6b3116b756660e75872e846aec84fd5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program4-c375e95.json0000664000175000017500000000071515227365530023144 0ustar alastairalastair{ "basename": "ast-program4-c375e95", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/program4.f90", "infile_hash": "16adb5a498028ea668b9d513bb2ef0fa0b12e15bef4e2b5e30aa2740", "outfile": null, "outfile_hash": null, "stdout": "ast-program4-c375e95.stdout", "stdout_hash": "6c5ae1776ad2be9c144a535ac45425320485db2f751a1001565917bd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array6-fe9aa62.stdout0000664000175000017500000000626515227365530023325 0ustar alastairalastair(TranslationUnit [(Program array6 () [] [(ImplicitNone [] () )] [] [] [(Subroutine t [(n) (a) (b) (c) (d) (e)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(n [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(a [(() () DimensionStar)] [] () () None ()) (b [(3 () DimensionStar)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 3 DimensionExpr) (1 n DimensionExpr) (() () DimensionStar)] )] [(c [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 3 DimensionExpr) (1 n DimensionExpr) (4 () DimensionStar)] )] [(d [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(e [(n () DimensionStar)] [] () () None ())] () )] [] [] [] )] )] ) lfortran-0.64.0/tests/reference/asr-multi_error1-ed395f9.json0000664000175000017500000000075115227365530024117 0ustar alastairalastair{ "basename": "asr-multi_error1-ed395f9", "cmd": "lfortran --semantics-only --continue-compilation --no-color {infile}", "infile": "tests/multi_error1.f90", "infile_hash": "aae363b17603b231b2a906564a03365ce9a53952c754ea31187f352c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-multi_error1-ed395f9.stderr", "stderr_hash": "8e354c62a28f565b652876a84c5e566842065a5429ce01c56fea19e1", "returncode": 1 }lfortran-0.64.0/tests/reference/wat-types_05-884adc8.stdout0000664000175000017500000000622115227365530023513 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 f32) f32.const 2.000000 local.set 1 f32.const 2.000000 local.set 1 f32.const 8.000000 local.set 1 f32.const 4.000000 local.set 1 f32.const 0.000000 local.set 1 f32.const 0.500000 local.set 1 f32.const 0.500000 local.set 1 i32.const 2 local.set 0 i32.const 2 local.set 0 i32.const 8 local.set 0 i32.const 4 local.set 0 i32.const 0 local.set 0 i32.const 0 local.set 0 i32.const 0 local.set 0 i32.const 0 call 0 return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") ) lfortran-0.64.0/tests/reference/asr-complex_09-aca4085.stdout0000664000175000017500000001553115227365530024002 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { complex_09: (Program (SymbolTable 2 { i: (Variable 2 i [] Local (IntegerConstant 42 (Integer 4) Decimal) (IntegerConstant 42 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (RealConstant 3.140000 (Real 4) ) (RealConstant 3.140000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z1: (Variable 2 z1 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z2: (Variable 2 z2 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) complex_09 [] [(Assignment (Var 2 z1) (IntrinsicElementalFunction Cmplx [(Var 2 i) (Var 2 x) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 z1) (IntrinsicElementalFunction Cmplx [(Var 2 x) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 z2) (Cast (IntrinsicElementalFunction Cmplx [(Var 2 z2) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () ) ComplexToComplex (Complex 4) () () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-types_04-92449d7.json0000664000175000017500000000074515227365530023170 0ustar alastairalastair{ "basename": "llvm-types_04-92449d7", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/types_04.f90", "infile_hash": "da21466af87608d5d323360a130e0a5542261d98fabaeebb5adc16d3", "outfile": null, "outfile_hash": null, "stdout": "llvm-types_04-92449d7.stdout", "stdout_hash": "55bb1dbba824699b8daad136d8a362046fa2f234d7a20bb41d3e30eb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-doloop_03-d4372bd.json0000664000175000017500000000075015227365530023436 0ustar alastairalastair{ "basename": "llvm-doloop_03-d4372bd", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_03.f90", "infile_hash": "eafcb3d9dca52d81012b124f360aa148c946ed2e7ed8de07041aba1d", "outfile": null, "outfile_hash": null, "stdout": "llvm-doloop_03-d4372bd.stdout", "stdout_hash": "035bc0136927213fe459bcb7d595aef9a4986c2f8893507d0ecbe4b4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-read_error_02-866ee33.stderr0000664000175000017500000000005115227365530024375 0ustar alastairalastairError: Failed to read double from stdin. lfortran-0.64.0/tests/reference/ast-expr3-1bb382e.json0000664000175000017500000000070415227365530022512 0ustar alastairalastair{ "basename": "ast-expr3-1bb382e", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr3.f90", "infile_hash": "a4aed9754913f48e6b1982a698f85476db8324f2d2efe0b1a2de88f5", "outfile": null, "outfile_hash": null, "stdout": "ast-expr3-1bb382e.stdout", "stdout_hash": "5e6f771ec509f32363e9d5c294dce2af51c4c3705bbca45163ff612e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-return1-517cbf1.json0000664000175000017500000000103015227365530023044 0ustar alastairalastair{ "basename": "ast-return1-517cbf1", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/return1.f90", "infile_hash": "f77416f3b212e5cf5dddc4d2dee526355570f140dfa2dbc033bc84e7", "outfile": null, "outfile_hash": null, "stdout": "ast-return1-517cbf1.stdout", "stdout_hash": "d9595f897e3a19952b001c974bd21259e0872fd0ecaaebcdf29d91c6", "stderr": "ast-return1-517cbf1.stderr", "stderr_hash": "97e4ee7f017f858be24662871fe3e1ab033a7cd4bae84c20209d0502", "returncode": 0 }lfortran-0.64.0/tests/reference/julia-doloop_08-f0d8fe6.json0000664000175000017500000000073615227365530023672 0ustar alastairalastair{ "basename": "julia-doloop_08-f0d8fe6", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/doloop_08.f90", "infile_hash": "aa25755d672851ca060c0f7c42329e8ecb0444f7a037df60d525af51", "outfile": null, "outfile_hash": null, "stdout": "julia-doloop_08-f0d8fe6.stdout", "stdout_hash": "b8a7f17b6f37fec4c058c96909857db7668881ee3b78bd2f9815feb9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-common_04-b603709.json0000664000175000017500000000074515227365530023113 0ustar alastairalastair{ "basename": "asr-common_04-b603709", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/common_04.f90", "infile_hash": "b2b4a515f1cb59552a75dd35ac20fe972653540c29780d8c92214cbb", "outfile": null, "outfile_hash": null, "stdout": "asr-common_04-b603709.stdout", "stdout_hash": "58ec4c736cc0845c4e14c2f028c380e8a98dc2029477828d687ceba5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-goto_04-ac607ff.json0000664000175000017500000000073015227365530023326 0ustar alastairalastair{ "basename": "julia-goto_04-ac607ff", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/goto_04.f90", "infile_hash": "302db59379e85ba1677034f61bec227f237c56085cea27ad7a1554b5", "outfile": null, "outfile_hash": null, "stdout": "julia-goto_04-ac607ff.stdout", "stdout_hash": "f80f754f041341dbbd44bde75ec93bc0ee429362cca23c59b9b1b285", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-integer_overflow-3cf26f8.stdout0000664000175000017500000000002315227365530025424 0ustar alastairalastairRead integer: 2719 lfortran-0.64.0/tests/reference/asr-nullify_03-e2c1d62.json0000664000175000017500000000075015227365530023434 0ustar alastairalastair{ "basename": "asr-nullify_03-e2c1d62", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_03.f90", "infile_hash": "0208ba787353b8a7cb23824af4baf3aafbb3d05dcc246d54e91df0c9", "outfile": null, "outfile_hash": null, "stdout": "asr-nullify_03-e2c1d62.stdout", "stdout_hash": "492a687a1d49739ed4ff2a5fdcb59617f401b895f09be949f75db9ad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_size_03-2036e61.stderr0000664000175000017500000000030015227365530024303 0ustar alastairalastairsemantic error: Unrecognized keyword argument kind1 passed to size intrinsic. --> tests/errors/array_size_03.f90:5:14 | 5 | size_a = size(a, kind1=4) | ^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-init_values-19dfa76.json0000664000175000017500000000075315227365530024010 0ustar alastairalastair{ "basename": "asr-init_values-19dfa76", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/init_values.f90", "infile_hash": "1cafced706fa2754f92f2d460867d6c84638fd10447df12f124fd419", "outfile": null, "outfile_hash": null, "stdout": "asr-init_values-19dfa76.stdout", "stdout_hash": "aa9a63fd697d4751fa58bf48d487eb8ca431d0ab4e626fd5233b3cad", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-array1-3c35261.stdout0000664000175000017500000000054415227365530023400 0ustar alastairalastairfunction main() local a::Bool local b::Array{Bool, 1} local b2::Array{Bool, 2} local b3::Array{Bool, 3} local d::Float32 local e::Array{Float32, 1} local e2::Array{Float32, 2} local e3::Array{Float32, 3} local f::Int32 local g::Array{Int32, 1} local g2::Array{Int32, 2} local g3::Array{Int32, 3} end main() lfortran-0.64.0/tests/reference/ast_f90-arrayelements1-55b6bd6.stdout0000664000175000017500000000175215227365530025447 0ustar alastairalastairmodule my_subs implicit none interface my_sum module procedure sum_real, sum_int end interface my_sum contains subroutine sum_real(array, tot) real, dimension(:), intent(in) :: array real, intent(out) :: tot integer :: i tot = 1.0 do i = 1, size(array) tot = tot*array(i) end do end subroutine sum_real subroutine sum_int(array, tot) integer, dimension(:), intent(in) :: array integer, intent(out) :: tot integer :: i tot = 0 do i = 1, size(array) tot = tot + array(i) end do end subroutine sum_int end module my_subs program test_dt use my_subs implicit none type :: my_type integer :: weight real :: length end type my_type type(my_type), dimension(:), allocatable :: people type(my_type) :: answer allocate(people(2)) people(1)%weight = 1 people(1)%length = 1.0 people(2)%weight = 2 people(2)%length = 2.0 call my_sum(people(:)%weight, answer%weight) write(*, *) answer%weight call my_sum(people(:)%length, answer%length) write(*, *) answer%length end program test_dt lfortran-0.64.0/tests/reference/ast-subroutine6-a3aec97.stdout0000664000175000017500000001074215227365530024400 0ustar alastairalastair(TranslationUnit [(Subroutine triad [(a) (b) (scalar) (c)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(a [(() () DimensionExpr)] [] () () None ()) (b [(() () DimensionExpr)] [] () () None ()) (scalar [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(c [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(N [] [] () () None ()) (N2 [] [] () () None ()) (i [] [] () () None ()) (j [] [] () () None ())] () )] [(Assignment 0 N (FuncCallOrArray size [] [(() a () 0)] [] [] [] ) () ) (Assignment 0 N2 (FuncCallOrArray size [] [(() b () 0)] [] [] [] ) () ) (DoConcurrentLoop 0 () [(ConcurrentControl () i 1 N () )] () [] [(Assignment 0 (FuncCallOrArray c [] [(() i () 0)] [] [] [] ) (+ (FuncCallOrArray a [] [(() i () 0)] [] [] [] ) (* scalar (FuncCallOrArray b [] [(() i () 0)] [] [] [] ))) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (DoConcurrentLoop 0 () [(ConcurrentControl () j 1 N2 () )] () [] [(Assignment 0 (FuncCallOrArray c [] [(() j () 0)] [] [] [] ) (+ (FuncCallOrArray b [] [(() j () 0)] [] [] [] ) scalar) () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-write7-6ba53a1.stdout0000664000175000017500000005713315227365530023245 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { write7_mod: (Module (SymbolTable 2 { person: (Struct (SymbolTable 3 { pwf: (StructMethodDeclaration 3 pwf () pwf 2 pwf Source .false. .false. ), pwunf: (StructMethodDeclaration 3 pwunf () pwunf 2 pwunf Source .false. .false. ), ~write_formatted: (GenericProcedure 3 ~write_formatted [3 pwf] Public ), ~write_unformatted: (GenericProcedure 3 ~write_unformatted [3 pwunf] Public ) }) person (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () () [] ), pwf: (Function (SymbolTable 4 { dtv: (Variable 4 dtv [] In () () Default (StructType [] [] .false. .false. ) 2 person Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iomsg: (Variable 4 iomsg [] InOut () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iostat: (Variable 4 iostat [] Out () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iotype: (Variable 4 iotype [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pfmt: (Variable 4 pfmt [] Local () () Default (String 1 (IntegerConstant 9 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 4 unit [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), vlist: (Variable 4 vlist [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) pwf (FunctionType [(StructType [] [] .false. .false. ) (Integer 4) (String 1 () AssumedLength DescriptorString) (Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 dtv) (Var 4 unit) (Var 4 iotype) (Var 4 vlist) (Var 4 iostat) (Var 4 iomsg)] [] () Public .true. .true. () ), pwunf: (Function (SymbolTable 5 { dtv: (Variable 5 dtv [] In () () Default (StructType [] [] .false. .false. ) 2 person Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iomsg: (Variable 5 iomsg [] InOut () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), iostat: (Variable 5 iostat [] Out () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unit: (Variable 5 unit [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) pwunf (FunctionType [(StructType [] [] .false. .false. ) (Integer 4) (Integer 4) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 dtv) (Var 5 unit) (Var 5 iostat) (Var 5 iomsg)] [] () Public .true. .true. () ) }) write7_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-preprocess_01-20f7efb.stderr0000664000175000017500000000166015227365530024555 0ustar alastairalastairwarning: #ifdef ignored --> tests/warnings/preprocess_01.f90:6:1 | 6 | #ifdef pqr | ^^^^^^^^^^^ help: use the '--cpp' command line option to preprocess it warning: #elif ignored --> tests/warnings/preprocess_01.f90:8:1 | 8 | #elif mno == 18 | ^^^^^^^^^^^^^^^^ help: use the '--cpp' command line option to preprocess it warning: #else ignored --> tests/warnings/preprocess_01.f90:10:1 | 10 | #else | ^^^^^^ help: use the '--cpp' command line option to preprocess it warning: #endif ignored --> tests/warnings/preprocess_01.f90:13:1 | 13 | #endif | ^^^^^^^ help: use the '--cpp' command line option to preprocess it warning: #define ignored --> tests/warnings/preprocess_01.f90:16:1 | 16 | #define abc(m, n) m + n | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use the '--cpp' command line option to preprocess it warning: Unsupported macro --> tests/warnings/preprocess_01.f90:18:1 | 18 | #abcd | ^^^^^^ Ignored lfortran-0.64.0/tests/reference/pass_global_stmts-global_scope4-2d4061d.stdout0000664000175000017500000000705615227365530027415 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 1 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 1 x) (IntegerBinOp (Var 1 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 f1) (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Mul (Var 1 x) (Integer 4) () ) () .false. .false. )] (Var 2 f1) Public .false. .false. () ), x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-cpp2-a8d63da.stderr0000664000175000017500000000022715227365530025176 0ustar alastairalastairsemantic error: Variable 'yy' is not declared --> tests/errors/cpp2.f90:7:19 | 7 | print *, x, X123, yy | ^^ 'yy' is undeclared lfortran-0.64.0/tests/reference/ast_f90-Subroutine_Call1-5aa005c.json0000664000175000017500000000076015227365530025274 0ustar alastairalastair{ "basename": "ast_f90-Subroutine_Call1-5aa005c", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/Subroutine_Call1.f90", "infile_hash": "bf7f51f810752b3f8e9381f1e100d0c9b3495c2f87cd120a6ee74148", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-Subroutine_Call1-5aa005c.stdout", "stdout_hash": "d7e18b9e02754303c8749a0cff1eeb8d6c0a9704c7e54509c003cec5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-modules_11-a28ab77.stdout0000664000175000017500000001216415227365530024166 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module_modules_11_module11_i = global i32 1 @__module_modules_11_module11_j = global i32 2 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1 @string_const_data = private constant [4 x i8] c"i = " @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data, i32 0, i32 0), i64 4 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [12 x i8] c"S-DESC-4,I4\00", align 1 @string_const_data.2 = private constant [4 x i8] c"j = " @string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.2, i32 0, i32 0), i64 4 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @__module_modules_11_module11_access_internally() { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* @__module_modules_11_module11_i) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_access_internally FINALIZE_SYMTABLE_access_internally: ; preds = %return ret void } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.1, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.3, i32* @__module_modules_11_module11_j) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry call void @__module_modules_11_module11_access_internally() br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_access_externally FINALIZE_SYMTABLE_access_externally: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-expr2-74c7f32.stdout0000664000175000017500000000043215227365530023007 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { }) [(IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) )] ) lfortran-0.64.0/tests/reference/run-string_allocation_01-8484aaf.json0000664000175000017500000000074015227365530025512 0ustar alastairalastair{ "basename": "run-string_allocation_01-8484aaf", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/string_allocation_01.f90", "infile_hash": "cd0f6232a42aa948f55971480a8894730237824e112755a510b37317", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-string_allocation_01-8484aaf.stderr", "stderr_hash": "798d42b98a53bf914ee8d9bb8714e1bc4fdf04128ec7028805b8eaed", "returncode": 1 }lfortran-0.64.0/tests/reference/ast-loop_test2-c76adc4.json0000664000175000017500000000073615227365530023635 0ustar alastairalastair{ "basename": "ast-loop_test2-c76adc4", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/loop_test2.f", "infile_hash": "b0c94f235f33da51d9037d0833df0c1ca4aaef4f3a3a29c9426ba51b", "outfile": null, "outfile_hash": null, "stdout": "ast-loop_test2-c76adc4.stdout", "stdout_hash": "a26ceb136824935a8b90d40abfb6638dfcff0b9d38983f1d847d1f48", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit13-56e851c.stdout0000664000175000017500000005775615227365530023753 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a: (Function (SymbolTable 2 { a: (Variable 2 a [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 2 h [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 2 l [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), m: (Variable 2 m [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), o: (Variable 2 o [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p: (Variable 2 p [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), q: (Variable 2 q [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [d e] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 d)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e)) ((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [e] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 e))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 d) (Var 2 e)] [(Assignment (ArrayItem (Var 2 y) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (ArrayItem (Var 2 x) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 3.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 b) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 d) (IntegerConstant 3 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 f) (Cast (IntegerConstant 4 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 4 (Integer 8) Decimal) () ) () .false. .false. ) (Assignment (Var 2 h) (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 i) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 6.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 2 l) (Cast (IntegerConstant 7 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 7.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 m) (Cast (IntegerConstant 8 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 8.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 o) (Cast (IntegerConstant 9 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 9.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (Assignment (Var 2 p) (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToComplex (Complex 8) (ComplexConstant 10.000000 0.000000 (Complex 8) ) () ) () .false. .false. ) (Assignment (Var 2 q) (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 11.000000 (Real 8) ) () ) () .false. .false. ) (Assignment (Var 2 r) (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 12.000000 (Real 8) ) () ) () .false. .false. )] (Var 2 a) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixedform_data-650e309.stdout0000664000175000017500000000231515227365530024643 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(one [] [] () () None ()) (two [] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [x] [1] )] () ) (DataStmt 0 [(DataStmtSet [one two] [(Real "1.0") (Real "2.0")] )] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor22-17078cd.stdout0000664000175000017500000000233015227365530027103 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor22: (Program (SymbolTable 2 { }) preprocessor22 [] [(Print (StringConstant "Both VAR1 and VAR2 are defined." (String 1 (IntegerConstant 31 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "At least one of VAR3 or VAR4 is defined." (String 1 (IntegerConstant 40 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "Exactly one of VAR5 or VAR6 is not defined." (String 1 (IntegerConstant 43 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-nested_04-39da8f9.json0000664000175000017500000000075015227365530023443 0ustar alastairalastair{ "basename": "llvm-nested_04-39da8f9", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_04.f90", "infile_hash": "e1cee5ef2176599a2dccac3f59fc86ddc957a5f559f5edb7ddd710ca", "outfile": null, "outfile_hash": null, "stdout": "llvm-nested_04-39da8f9.stdout", "stdout_hash": "0d472c8777be37de9b86abc5deef93dffbd3fd26864ba241474eafca", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-infer_first_assignment_01-ff9433c.stdout0000664000175000017500000001067515227365530027105 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { flag: (Variable 1 flag [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 1 s [] Local () () Default (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 1 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 1 z [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [(Assignment (Var 1 x) (IntegerConstant 42 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 1 y) (RealConstant 3.140000 (Real 4) ) () .false. .false. ) (Assignment (Var 1 z) (ComplexConstructor (RealConstant 1.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) (Complex 4) (ComplexConstant 1.000000 2.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 1 flag) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (Assignment (Var 1 s) (StringConstant "hello" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 1 x) (IntegerBinOp (Var 1 x) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] ) lfortran-0.64.0/tests/reference/wat-wasm_main_program-7a34895.json0000664000175000017500000000073315227365530025037 0ustar alastairalastair{ "basename": "wat-wasm_main_program-7a34895", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/wasm_main_program.f90", "infile_hash": "ab8926c68ae35c9f50cf6a99dd6afaf843e3439d51645de08baebead", "outfile": null, "outfile_hash": null, "stdout": "wat-wasm_main_program-7a34895.stdout", "stdout_hash": "a7508a90bd07a2ef1e5d18fa0c05221e91c752cdbaf22e3d55b317dc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dim_float_02-2681d16.json0000664000175000017500000000074015227365530023553 0ustar alastairalastair{ "basename": "asr-dim_float_02-2681d16", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dim_float_02.f90", "infile_hash": "b3cd2311350bf6e756c4dbf5aa99b24d1e2a004738acea5f0080194a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dim_float_02-2681d16.stderr", "stderr_hash": "35efe71f901511015f849241c9f551bf8c3f89337d62956c1606c855", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-logical4-72c2657.json0000664000175000017500000000074215227365530023020 0ustar alastairalastair{ "basename": "asr-logical4-72c2657", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/logical4.f90", "infile_hash": "ea18762e8bbd163cb8b30960c719f953e2dfae041020c2f1066b3a35", "outfile": null, "outfile_hash": null, "stdout": "asr-logical4-72c2657.stdout", "stdout_hash": "db13255cdbe27296e72d50286591d020432971934cf32d6ac0e77da9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics_39-f721e16.json0000664000175000017500000000076115227365530024077 0ustar alastairalastair{ "basename": "asr-intrinsics_39-f721e16", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_39.f90", "infile_hash": "f27f54c8f7027443ffce72d800b4fe7abc183483b295523d83b32adf", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_39-f721e16.stdout", "stdout_hash": "cccb3288a87dad5dcb9a69cbc46845dbc800f67ec145cf205d0d68dc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-do_concurrent_reduce2-81246e2.json0000664000175000017500000000077715227365530026263 0ustar alastairalastair{ "basename": "ast_f90-do_concurrent_reduce2-81246e2", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/do_concurrent_reduce2.f90", "infile_hash": "bfbb329c50d12cea347c298fcc5ba3ee9f192b8b43de74deccf70615", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-do_concurrent_reduce2-81246e2.stdout", "stdout_hash": "bbcc42fbbf554322cc2fd456d8893449132415622bd147312ca1f7e4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_error_07a-fa85c7e.json0000664000175000017500000000076215227365530025242 0ustar alastairalastair{ "basename": "asr-template_error_07a-fa85c7e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/template_error_07a.f90", "infile_hash": "2d93392c48b94ce432551da534053cf051a4d2ff3aa403b134d4a8e8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-template_error_07a-fa85c7e.stderr", "stderr_hash": "11da2965b8a8b8ea46fe1e8545830084b13b39cd574fa274f7361414", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-incorrect_type_where_04-f7dffdb.json0000664000175000017500000000100115227365530026420 0ustar alastairalastair{ "basename": "asr-incorrect_type_where_04-f7dffdb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_type_where_04.f90", "infile_hash": "42f8ace2a232052937d439ce0f429e27dd6d8ddf373aa4865c19e809", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_type_where_04-f7dffdb.stderr", "stderr_hash": "2f1dc154ac637fbd20a8df4e194b496ba7829d58b3555e4a08845759", "returncode": 2 }lfortran-0.64.0/tests/reference/run-string_assignment_02-84c751f.json0000664000175000017500000000074015227365530025460 0ustar alastairalastair{ "basename": "run-string_assignment_02-84c751f", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/string_assignment_02.f90", "infile_hash": "a08f7ec91c7fc4d516a9ec8775761fad679344425d3572773570b7aa", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-string_assignment_02-84c751f.stderr", "stderr_hash": "b2f51d8ac6543f4597d29821577e8450ba74eeabb233d240b63efed8", "returncode": 1 }lfortran-0.64.0/tests/reference/ast_f90-allocate_01-df1748d.json0000664000175000017500000000074115227365530024227 0ustar alastairalastair{ "basename": "ast_f90-allocate_01-df1748d", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/allocate_01.f90", "infile_hash": "7a28f6115b781d328be0829189ace20f4f862bf745740c6c78400225", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-allocate_01-df1748d.stdout", "stdout_hash": "e664086475b3e379ff22a16889c819f111434743957c3d4af54dd469", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-nested_03-57ffed2.json0000664000175000017500000000074515227365530023334 0ustar alastairalastair{ "basename": "asr-nested_03-57ffed2", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_03.f90", "infile_hash": "690c7461fd0cb288a4f72f5fd09663a777ae1ba9f4a39dfdc5727c36", "outfile": null, "outfile_hash": null, "stdout": "asr-nested_03-57ffed2.stdout", "stdout_hash": "d4eb7d29c1fd8b18ff856a55586eee50c2ee77f847c0367e4fb31729", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-data1-58e5b8d.stdout0000664000175000017500000004101015227365530023025 0ustar alastairalastair(TranslationUnit [(Program data1 () [] [] [(DerivedType person [] () [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(age [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(() 20 Value)] () () None ) [] [(fullname [] [] () () None ())] () )] [] ) (Declaration (AttrType TypeCharacter [(len 10 Value)] () () None ) [] [(myname [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrDimension [(0 9 DimensionExpr)] )] [(miles [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 100 DimensionExpr) (1 100 DimensionExpr)] )] [(skew [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () person None ) [] [(yourname [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrParameter )] [(sin3 [] [] () (FuncCallOrArray sin [] [(() (Real "3.d0") () 0)] [] [] [] ) Equal ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [(SimpleAttribute AttrParameter )] [(cos3 [] [] () (FuncCallOrArray cos [] [(() (Real "3.d0") () 0)] [] [] [] ) Equal ())] () ) (Declaration (AttrType TypeReal [(() 8 Value)] () () None ) [] [(s [(1 10 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(iarx [(1 3 DimensionExpr) (1 1 DimensionExpr)] [] () () None ()) (iary [(1 3 DimensionExpr) (1 1 DimensionExpr)] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(DataStmt 0 [(DataStmtSet [myname] [(String "xyz" ())] ) (DataStmtSet [miles] [0 0 0 0 0 0 0 0 0 0] )] () ) (DataStmt 0 [(DataStmtSet [age [(yourname [])] fullname [(yourname [])]] [35 (String "abc" ())] )] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(DataImpliedDo [(FuncCallOrArray skew [] [(() k () 0) (() j () 0)] [] [] [] )] () j 1 k () )] (AttrType TypeInteger [(() 4 Value)] () () None ) k 1 10 () )] [(Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0")] )] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(DataImpliedDo [(FuncCallOrArray skew [] [(() k () 0) (() j () 0)] [] [] [] )] () j 1 k k )] (AttrType TypeInteger [(() 4 Value)] () () None ) k 1 100 2 )] [(Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0")] )] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(DataImpliedDo [(FuncCallOrArray skew [] [(() k () 0) (() j () 0)] [] [] [] )] () j (+ k 1) 10 () )] () k 1 3 () )] [(Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0")] )] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(DataImpliedDo [(FuncCallOrArray skew [] [(() k () 0) (() j () 0)] [] [] [] )] () j (+ k 1) 10 k )] () k 1 3 1 )] [(Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0") (Real "1.0")] )] () ) (DataStmt 0 [(DataStmtSet [s] [(Real "1.d0") (u- (Real "1.d0")) (Real "0.d0") (Real "0.d0") (Real "0.d0") (u- (Real "1.d0")) sin3 cos3 (Real "0.d0") (u- (Real "1.d0"))] )] () ) (Print 0 () [(String "Your name is: " ()) fullname [(yourname [])]] () ) (Print 0 () [(String "Your age is: " ()) age [(yourname [])]] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray iarx [] [(() i () 0) (() 1 () 0)] [] [] [] ) (FuncCallOrArray iary [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 3 () )] [1 9 1950 1350 4350 4] )] () ) (Print 0 () [(String "My name is: " ()) myname] () ) (DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray iary [] [(() i () 0) (() 1 () 0)] [] [] [] )] () i 1 3 () )] [1 9 1950] )] () )] [] )] ) lfortran-0.64.0/tests/reference/run-read2-7b581ec.json0000664000175000017500000000065415227365530022477 0ustar alastairalastair{ "basename": "run-read2-7b581ec", "cmd": "lfortran --no-color {infile}", "infile": "tests/read2.f90", "infile_hash": "1d82aaea9497b527bc71286e7053079e21db7085521af2c81a4e6b6e", "outfile": null, "outfile_hash": null, "stdout": "run-read2-7b581ec.stdout", "stdout_hash": "6695bf11ba38f6db6b2fbe85b1969e451dc69f68ea2397fcba513e5f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-matmul_unallocated_01-39026d3.stderr0000664000175000017500000000030015227365530026026 0ustar alastairalastairruntime error: Argument 3 of subroutine _lcompilers_matmul_real_______2 is unallocated. --> tests/errors/matmul_unallocated_01.f90:10:1 | 10 | C = matmul(A, B) | ^ This is unallocated lfortran-0.64.0/tests/reference/ast-functions_41-1e43fd0.stdout0000664000175000017500000000371315227365530024341 0ustar alastairalastair(TranslationUnit [(Program functions_41 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(SubroutineCall 0 notrecursive_sub [] [] [] [] () ) (Print 0 () [(FuncCallOrArray notrecursive_fun [] [] [] [] [] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Subroutine notrecursive_sub [] [(SimpleAttribute AttrNonRecursive )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Print 0 () [(String "This is a non-recursive subroutine" ())] () )] [] [] ) (Function notrecursive_fun [] [(SimpleAttribute AttrNonRecursive ) (AttrType TypeInteger [] () () None )] () () () [] [] [] [] [(Print 0 () [(String "This is a non-recursive function" ())] () ) (Assignment 0 notrecursive_fun 1 () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/run-implied_do_loop2-a8638e0.json0000664000175000017500000000071515227365530024640 0ustar alastairalastair{ "basename": "run-implied_do_loop2-a8638e0", "cmd": "lfortran --no-color {infile}", "infile": "tests/implied_do_loop2.f90", "infile_hash": "9f1322fbfc43cf221a57e13012a98248cd6c507ae07b15388d5958d1", "outfile": null, "outfile_hash": null, "stdout": "run-implied_do_loop2-a8638e0.stdout", "stdout_hash": "a9f17503685a794018f6e4c58d9fe5e53f0228d2e8d0f7c23c7eaa42", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutine3-952da2b.json0000664000175000017500000000071715227365530024256 0ustar alastairalastair{ "basename": "julia-subroutine3-952da2b", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/subroutine3.f90", "infile_hash": "174874c0a5fad40d608acbafefcc0c06c96379cc136126d3f05b63e5", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutine3-952da2b.stdout", "stdout_hash": "ce1171ffded74d916e60a8a0d1543285b051d49f34ef15b64c0810f2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-subroutines_10-779ade9.json0000664000175000017500000000077715227365530025046 0ustar alastairalastair{ "basename": "ast_f90-subroutines_10-779ade9", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/subroutines_10.f90", "infile_hash": "97868109f521b42642b328d8b79be02e7668b5819dc820880ec85da0", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-subroutines_10-779ade9.stdout", "stdout_hash": "77cac845f90c95ab93e41002c00fcc1be757d153ea2941c75c6690ae", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-modules_13-6b5ac80.stdout0000664000175000017500000000645515227365530024173 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_module_13_f1() { .entry: %f1 = alloca i32, align 4 %0 = call i32 @__module_module_13_f2() store i32 %0, i32* %f1, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f1 FINALIZE_SYMTABLE_f1: ; preds = %return %1 = load i32, i32* %f1, align 4 ret i32 %1 } define i32 @__module_module_13_f2() { .entry: %f2 = alloca i32, align 4 store i32 5, i32* %f2, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f2 FINALIZE_SYMTABLE_f2: ; preds = %return %0 = load i32, i32* %f2, align 4 ret i32 %0 } define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %f = alloca i32, align 4 %3 = call i32 @__module_module_13_f1() store i32 %3, i32* %f, align 4 %4 = alloca i64, align 8 %5 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %4, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %f) %6 = load i64, i64* %4, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %5, i8** %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %6, i64* %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %10 = load i8*, i8** %9, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %12 = load i64, i64* %11, align 8 %13 = trunc i64 %12 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %14 = icmp eq i8* %5, null br i1 %14, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %5) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-arrays_20-4b5a0e4.stdout0000664000175000017500000001662315227365530023627 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_20: (Program (SymbolTable 2 { list_character: (Variable 2 list_character [] Local () () Default (Allocatable (Array (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), list_integer: (Variable 2 list_integer [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), list_logical: (Variable 2 list_logical [] Local () () Default (Allocatable (Array (Logical 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_20 [] [(Assignment (Var 2 list_integer) (ArrayConstructor [] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] FixedSizeArray ) () ColMajor () ) () .false. .false. ) (Assignment (Var 2 list_logical) (ArrayConstructor [] (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] FixedSizeArray ) () ColMajor () ) () .false. .false. ) (Assignment (Var 2 list_character) (ArrayConstructor [] (Array (String 1 (StringLen (ArrayItem (Var 2 list_character) [(() (ArrayBound (Var 2 list_character) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) ())] (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ColMajor () ) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 0 (Integer 4) Decimal))] PointerArray ) () ColMajor () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-format_01-fa31fe9.json0000664000175000017500000000076015227365530024011 0ustar alastairalastair{ "basename": "ast_f90-format_01-fa31fe9", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/format_01.f90", "infile_hash": "4cc04453f51b9adcf8108f25d26d048109fd69c30496888f6f560433", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-format_01-fa31fe9.stdout", "stdout_hash": "1fb1912ba73b8d475f18a53cb6b3c88da84f8c2a44bea12ed347e9bb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_25-0bdc4b7.stdout0000664000175000017500000000003015227365530023704 0ustar alastairalastair0.E+0 1.E+1 3.E+0 3.E+5 lfortran-0.64.0/tests/reference/asr-intrinsics_31-9b91cfb.json0000664000175000017500000000076115227365530024233 0ustar alastairalastair{ "basename": "asr-intrinsics_31-9b91cfb", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_31.f90", "infile_hash": "f9db5457e09683e2b0afde876cbd0ddf85412c67117277ba413679af", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_31-9b91cfb.stdout", "stdout_hash": "867cda0eb25811be1d6c9abb5eb9d80ea356b19ad93ec5bfed1323bb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-maskl_negative-c92502f.json0000664000175000017500000000074615227365530024372 0ustar alastairalastair{ "basename": "asr-maskl_negative-c92502f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/maskl_negative.f90", "infile_hash": "144605a5591f224661ccc2e7d6305d6654847c20157594f344d3bd7c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-maskl_negative-c92502f.stderr", "stderr_hash": "9a2147feaabf5d9848200d0e5b64655c2d4629c9fd23a58730edc2b8", "returncode": 2 }lfortran-0.64.0/tests/reference/run-write6-7442be9.json0000664000175000017500000000065715227365530022647 0ustar alastairalastair{ "basename": "run-write6-7442be9", "cmd": "lfortran --no-color {infile}", "infile": "tests/write6.f90", "infile_hash": "a4be2d1d5d03af3c83dd9f47c247c627e5f2f222cd527b3b0d781c14", "outfile": null, "outfile_hash": null, "stdout": "run-write6-7442be9.stdout", "stdout_hash": "59400cf5a52a85e7880d61e702843c2bba15a38ea7039cc42a52f7dc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_json-modules_10-93cd62d.json0000664000175000017500000000074515227365530024465 0ustar alastairalastair{ "basename": "asr_json-modules_10-93cd62d", "cmd": "lfortran --show-asr --no-indent --json {infile} -o {outfile}", "infile": "tests/modules_10.f90", "infile_hash": "82a7ff17209a0f99dc417848d6e080a46a74724bfdb4d50f5146ad7c", "outfile": null, "outfile_hash": null, "stdout": "asr_json-modules_10-93cd62d.stdout", "stdout_hash": "c399426d5df65500d46146e4ea2c077bc421cc974aa32c052c0bbdfa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-where1-5c3f533.stdout0000664000175000017500000000112015227365530023611 0ustar alastairalastairprogram test implicit none integer :: x(2,2) = reshape([1, 2, 3, 4], [2, 2]) where (x == 1) x = 2 elsewhere where (x == 2) x = 3 elsewhere x = x*2 end where end where if (all(x == reshape([2, 3, 6, 8], [2, 2]))) then print *, "pass" else print *, "fail" end if where (x == 2) x = 3 elsewhere where (x == 3) x = 4 elsewhere where (x == 6) x = x*2 end where end where end where if (all(x == reshape([3, 4, 12, 8], [2, 2]))) then print *, "pass" else print *, "fail" end if end program test lfortran-0.64.0/tests/reference/ast-nullify_02-1c6befe.stdout0000664000175000017500000000460115227365530024152 0ustar alastairalastair(TranslationUnit [(Program nullify_02 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrPointer )] [(p1 [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrTarget )] [(t1 [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrPointer )] [(p2 [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrTarget )] [(t2 [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Associate 0 p1 t1 () ) (Assignment 0 p1 1 () ) (Associate 0 p2 t2 () ) (Assignment 0 p2 (Real "2.") () ) (Nullify 0 [p1 p2] [] (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/llvm-complex_dp-7286fd2.stdout0000664000175000017500000000575415227365530024305 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> %complex_8 = type <{ double, double }> %complex_4 = type <{ float, float }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [24 x i8] c"{R8,R8},{R4,R4},{R4,R4}\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %v = alloca %complex_8, align 8 %x = alloca %complex_4, align 8 %zero = alloca %complex_4, align 8 store %complex_4 zeroinitializer, %complex_4* %zero, align 1 store %complex_8 <{ double 0x3FF0CCCCC0000000, double 0x3FF0CCCCC0000000 }>, %complex_8* %v, align 1 store %complex_4 <{ float 0x3FF0CCCCC0000000, float 0x3FF0CCCCC0000000 }>, %complex_4* %x, align 1 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_8* %v, %complex_4* %x, %complex_4* %zero) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_complex_dp FINALIZE_SYMTABLE_complex_dp: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-external_04-30bc1c7.stdout0000664000175000017500000000065715227365530024335 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define void @a() { .entry: call void @b(float ()* @f, float ()* @g) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_a FINALIZE_SYMTABLE_a: ; preds = %return ret void } declare void @b(float ()*, float ()*) declare float @f() declare float @g() lfortran-0.64.0/tests/reference/asr_preprocess-cpp4-0611905.stderr0000664000175000017500000000024515227365530024673 0ustar alastairalastairsemantic error: Variable 'z12345678' is not declared --> tests/errors/cpp4.f90:11:13 | 11 | print *, x, C123, y | ^^^^ 'z12345678' is undeclared lfortran-0.64.0/tests/reference/asr-incorrect_number_args_subroutine-126ac8b.stderr0000664000175000017500000000026415227365530030635 0ustar alastairalastairsemantic error: More actual than formal arguments in procedure call --> tests/errors/incorrect_number_args_subroutine.f90:3:18 | 3 | call my_func(1) | ^ lfortran-0.64.0/tests/reference/asr-dimension_attr2-8fda690.stdout0000664000175000017500000001120115227365530025126 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f: (Variable 2 f [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Unspecified () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 x)] [] (Var 2 f) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-data_14-f20fec7.stdout0000664000175000017500000000345315227365530023331 0ustar alastairalastair(TranslationUnit [(Program data_14 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrParameter )] [(n [] [] () 4 Equal ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 n DimensionExpr)] )] [(arr [] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [(DataImpliedDo [(FuncCallOrArray arr [] [(() i () 0)] [] [] [] )] (AttrType TypeInteger [] () () None ) i 1 n () )] [(Real "0.0") (Real "0.0") (Real "0.0") (Real "0.0")] )] () ) (Print 0 () [arr] () )] [] )] ) lfortran-0.64.0/tests/reference/pass_sign_from_value-sign_from_value-ba1c944.stdout0000664000175000017500000011547515227365530030634 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { flip_sign: (Program (SymbolTable 2 { a: (Variable 2 a [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), arr: (Variable 2 arr [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) (IntegerConstant -3 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsidp: (Variable 2 epsidp [] Local (Cast (IntegerConstant 16 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 16 (Integer 8) Decimal) () ) (IntegerConstant 16 (Integer 8) Decimal) Save (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsisp: (Variable 2 epsisp [] Local (IntegerConstant 16 (Integer 4) Decimal) (IntegerConstant 16 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsrdp: (Variable 2 epsrdp [] Local (Cast (RealConstant 0.000001 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000001 (Real 8) ) () ) (RealConstant 0.000001 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), epsrsp: (Variable 2 epsrsp [] Local (RealConstant 0.000001 (Real 4) ) (RealConstant 0.000001 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ixdp: (Variable 2 ixdp [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) () ) (IntegerConstant 5 (Integer 8) Decimal) Save (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ixsp: (Variable 2 ixsp [] Local (IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rxdp: (Variable 2 rxdp [] Local (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (RealConstant 5.500000 (Real 8) ) Save (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rxsp: (Variable 2 rxsp [] Local (RealConstant 5.500000 (Real 4) ) (RealConstant 5.500000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local (Cast (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) IntegerToReal (Real 4) (RealConstant -2.000000 (Real 4) ) () ) (RealConstant -2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (Cast (IntegerUnaryMinus (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant -3 (Integer 4) Decimal) ) IntegerToReal (Real 4) (RealConstant -3.000000 (Real 4) ) () ) (RealConstant -3.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) flip_sign [] [(Assignment (Var 2 rxsp) (RealBinOp (Var 2 rxsp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (Var 2 epsrsp)] 0 (Real 4) () ) (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxsp) Sub (RealConstant 5.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 epsrsp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxsp) (RealBinOp (Var 2 rxsp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (RealUnaryMinus (Var 2 epsrsp) (Real 4) () )] 0 (Real 4) () ) (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxsp) Add (RealConstant 5.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (Var 2 epsrsp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxdp) (RealBinOp (Var 2 rxdp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 8) ) (Var 2 epsrdp)] 0 (Real 8) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxdp) Sub (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Var 2 epsrdp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 ixsp) (IntegerBinOp (Var 2 ixsp) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 4) Decimal) (Var 2 epsisp)] 0 (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 ixsp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 ixsp) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 rxdp) (RealBinOp (Var 2 rxdp) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 8) ) (RealUnaryMinus (Var 2 epsrdp) (Real 8) () )] 0 (Real 8) () ) (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 rxdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 rxdp) Add (Cast (RealConstant 5.500000 (Real 4) ) RealToReal (Real 8) (RealConstant 5.500000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) Gt (Var 2 epsrdp) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 ixdp) (IntegerBinOp (Var 2 ixdp) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 8) Decimal) (Var 2 epsidp)] 0 (Integer 8) () ) (Integer 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 ixdp)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 ixdp) NotEq (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 5 (Integer 8) Decimal) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 c) (IntegerBinOp (Var 2 a) Mul (IntrinsicElementalFunction Sign [(IntegerConstant 1 (Integer 4) Decimal) (Var 2 b)] 0 (Integer 4) () ) (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 c)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 c) NotEq (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 arr) (ArrayConstant 20 [1.00000000e+00, 2.00000000e+00, 3.00000000e+00, 4.00000000e+00, 5.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 2 z) (ArrayItem (Var 2 arr) [(() (IntrinsicElementalFunction Int [(RealBinOp (Var 2 x) Mul (IntrinsicElementalFunction Sign [(RealConstant 1.000000 (Real 4) ) (Var 2 y)] 0 (Real 4) () ) (Real 4) () )] 0 (Integer 4) () ) ())] (Real 4) ColMajor () ) () .false. .false. ) (Print (StringFormat () [(Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (Var 2 z) NotEq (ArrayItem (Var 2 arr) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixedform_subroutine2-805f758.json0000664000175000017500000000077715227365530025667 0ustar alastairalastair{ "basename": "ast-fixedform_subroutine2-805f758", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_subroutine2.f", "infile_hash": "2b76a52df280016afbeef3e6ca5d5168c57d6672be8c784021104759", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_subroutine2-805f758.stdout", "stdout_hash": "e3b630950ab6b4df198f9d85b549a913d8555e29c0ee6f195ac6ccdd", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_01-713dbcf.stderr0000664000175000017500000000055615227365530026235 0ustar alastairalastairruntime error: Array shape mismatch in assignment to 'x'. Tried to match size 10 of dimension 1 of LHS with size 3 of dimension 1 of RHS. Use '--realloc-lhs-arrays' option to reallocate LHS automatically. --> tests/errors/array_bounds_check_01.f90:5:5 | 5 | x = [1, 2, 3] | ^ LHS size is 10 | 5 | x = [1, 2, 3] | ^^^^^^^^^ RHS size is 3 lfortran-0.64.0/tests/reference/cpp-kokkos_program2-43a2cc6.json0000664000175000017500000000072515227365530024560 0ustar alastairalastair{ "basename": "cpp-kokkos_program2-43a2cc6", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/kokkos_program2.f90", "infile_hash": "bba0b0329c504e01dd099058af96e20a7fe00294f66456fe3da634e0", "outfile": null, "outfile_hash": null, "stdout": "cpp-kokkos_program2-43a2cc6.stdout", "stdout_hash": "7610bc2855457732fca191fca696bc1823650600eac03109d40ce92c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-template_02-80b38d0.stdout0000664000175000017500000003225615227365530024067 0ustar alastairalastair(TranslationUnit [(Module template_02_m (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Requirement eq [t ne] [(DerivedType t [] () [(SimpleAttribute AttrDeferred )] [] [] )] [(Function ne [(lhs) (rhs)] [] () () () [] [] [] [(Declaration (AttrType TypeType [] () t None ) [(AttrIntent In )] [(lhs [] [] () () None ()) (rhs [] [] () () None ())] () ) (Declaration (AttrType TypeLogical [] () () None ) [] [(ne [] [] () () None ())] () )] [] [] [] )] ) (Template change_positions_tmpl [t ne] [(Require [(UnitRequire eq [(AttrName t ) (AttrName ne )] )] ) (Declaration () [(SimpleAttribute AttrPrivate )] [] () ) (Declaration () [(SimpleAttribute AttrPublic )] [(change_positions_t [] [] () () None ())] () )] [(Function change_positions_t [(vec)] [] mask () () [] [] [] [(Declaration (AttrType TypeType [] () t None ) [(AttrIntent In )] [(vec [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrAllocatable )] [(pos [(() () DimensionExpr)] [] () () None ()) (mask [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (j [] [] () () None ()) (n [] [] () () None ())] () )] [(Assignment 0 n (FuncCallOrArray size [] [(() vec () 0)] [] [] [] ) () ) (Allocate 0 [(() (FuncCallOrArray pos [] [(() n () 0)] [] [] [] ) () 0)] [] () ) (If 0 () (< n 1) [(Return 0 () () )] [] () () () ) (Assignment 0 pos 0 () ) (Assignment 0 (FuncCallOrArray pos [] [(() 1 () 0)] [] [] [] ) 1 () ) (Assignment 0 j 1 () ) (DoLoop 0 () 0 i 2 n () [(If 0 () (FuncCallOrArray ne [] [(() (FuncCallOrArray vec [] [(() i () 0)] [] [] [] ) () 0) (() (FuncCallOrArray vec [] [(() (- i 1) () 0)] [] [] [] ) () 0)] [] [] [] ) [(Assignment 0 j (+ j 1) () ) (Assignment 0 (FuncCallOrArray pos [] [(() j () 0)] [] [] [] ) i () )] [] () () () )] () () ) (Allocate 0 [(() (FuncCallOrArray mask [] [(() j () 0)] [] [] [] ) () 0)] [] () ) (DoLoop 0 () 0 i 1 j () [(Assignment 0 (FuncCallOrArray mask [] [(() i () 0)] [] [] [] ) (FuncCallOrArray pos [] [(() i () 0)] [] [] [] ) () )] () () )] [] [] )] )] [] [] ) (Program template_02 () [(Use [] template_02_m [] .false. () )] [(ImplicitNone [] () )] [(Instantiate change_positions_tmpl [(AttrType TypeInteger [] () () None ) (AttrIntrinsicOperator NOTEQ )] [(UseSymbol change_positions_t change_positions_int )] ) (Instantiate change_positions_tmpl [(AttrType TypeCharacter [] () () None ) (AttrIntrinsicOperator NOTEQ )] [(UseSymbol change_positions_t change_positions_chr )] )] [(Print 0 () [(FuncCallOrArray change_positions_int [] [(() (ArrayInitializer () () [3 3 6 2 2 2 1] ) () 0)] [] [] [] )] () ) (Print 0 () [(FuncCallOrArray change_positions_chr [] [(() (ArrayInitializer () () [(String "a" ()) (String "a" ()) (String "b" ()) (String "p" ()) (String "p" ()) (String "p" ()) (String "o" ())] ) () 0)] [] [] [] )] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-intrinsics_02-404e16e.stdout0000664000175000017500000002222415227365530024616 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @intrinsics_02.x = internal global float 0x3FEFEB7AA0000000 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [6 x i8] c"R4,R8\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @_lcompilers_sin_f32(float* %x) { .entry: %_lcompilers_sin_f32 = alloca float, align 4 %0 = load float, float* %x, align 4 %1 = call float @_lfortran_ssin(float %0) store float %1, float* %_lcompilers_sin_f32, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_sin_f32 FINALIZE_SYMTABLE__lcompilers_sin_f32: ; preds = %return %2 = load float, float* %_lcompilers_sin_f32, align 4 ret float %2 } declare float @_lfortran_ssin(float) define double @_lcompilers_sin_f64(double* %x) { .entry: %_lcompilers_sin_f64 = alloca double, align 8 %0 = load double, double* %x, align 8 %1 = call double @_lfortran_dsin(double %0) store double %1, double* %_lcompilers_sin_f64, align 8 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_sin_f64 FINALIZE_SYMTABLE__lcompilers_sin_f64: ; preds = %return %2 = load double, double* %_lcompilers_sin_f64, align 8 ret double %2 } declare double @_lfortran_dsin(double) define i32 @main(i32 %0, i8** %1) { .entry: %call_arg_value10 = alloca double, align 8 %call_arg_value = alloca float, align 4 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %y = alloca double, align 8 store double 0x3FEFEB7A9B2C6D8B, double* %y, align 8 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* @intrinsics_02.x, double* %y) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry %14 = load float, float* @intrinsics_02.x, align 4 %15 = fsub float %14, 0x3FEFEB7AA0000000 %16 = call float @llvm.fabs.f32(float %15) %17 = fcmp ogt float %16, 0x3EB0C6F7A0000000 br i1 %17, label %then, label %else then: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done br label %ifcont ifcont: ; preds = %else, %then %18 = call float @_lcompilers_sin_f32(float* @intrinsics_02.x) %19 = fsub float %18, 0x3FEAE238A0000000 %20 = call float @llvm.fabs.f32(float %19) %21 = fcmp ogt float %20, 0x3EB0C6F7A0000000 br i1 %21, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %22 = load double, double* %y, align 8 %23 = fsub double %22, 0x3FEFEB7AA0000000 %24 = call double @llvm.fabs.f64(double %23) %25 = fcmp ogt double %24, 0x3E7AD7F2A0000000 br i1 %25, label %then4, label %else5 then4: ; preds = %ifcont3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %ifcont3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 br i1 false, label %then7, label %else8 then7: ; preds = %ifcont6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont9 else8: ; preds = %ifcont6 br label %ifcont9 ifcont9: ; preds = %else8, %then7 %26 = call double @_lcompilers_sin_f64(double* %y) %27 = load float, float* @intrinsics_02.x, align 4 %28 = call float @_lcompilers_sin_f32(float* @intrinsics_02.x) %29 = fadd float %27, %28 store float %29, float* %call_arg_value, align 4 %30 = call float @_lcompilers_sin_f32(float* %call_arg_value) %31 = fpext float %30 to double %32 = fadd double %26, %31 store double %32, double* %call_arg_value10, align 8 %33 = call double @_lcompilers_sin_f64(double* %call_arg_value10) %34 = fsub double %33, 0x3FEF20DD80000000 %35 = call double @llvm.fabs.f64(double %34) %36 = fcmp ogt double %35, 0x3E7AD7F2A0000000 br i1 %36, label %then11, label %else12 then11: ; preds = %ifcont9 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont13 else12: ; preds = %ifcont9 br label %ifcont13 ifcont13: ; preds = %else12, %then11 br label %return return: ; preds = %ifcont13 br label %FINALIZE_SYMTABLE_intrinsics_02 FINALIZE_SYMTABLE_intrinsics_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) ; Function Attrs: nounwind readnone speculatable willreturn declare float @llvm.fabs.f32(float) #0 declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) ; Function Attrs: nounwind readnone speculatable willreturn declare double @llvm.fabs.f64(double) #0 attributes #0 = { nounwind readnone speculatable willreturn } lfortran-0.64.0/tests/reference/asr-implicit12-1826599.json0000664000175000017500000000106615227365530023227 0ustar alastairalastair{ "basename": "asr-implicit12-1826599", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit12.f90", "infile_hash": "b15934ce985f385fa987bbc85a37c711ad9f42818a7c50f8deeec4fc", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit12-1826599.stdout", "stdout_hash": "ce170c98608a2184572a395e9fd11ffc94dfea231581bbb2f8d460f2", "stderr": "asr-implicit12-1826599.stderr", "stderr_hash": "cbfd053a67ccb4e4f31052c144534fb75f43bcc33820945c7b23af09", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-merge_bits_comp-23a3e67.stderr0000664000175000017500000000032615227365530025063 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Mergebits must be the same --> tests/errors/merge_bits_comp.f90:2:14 | 2 | print *, merge_bits(8, 12_8, 2) | ^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/c-case_02-eff3752.stdout0000664000175000017500000000424015227365530022703 0ustar alastairalastair#include #include #include #include #include #include // Implementations int main(int argc, char* argv[]) { _lpython_set_argv(argc, argv); int32_t marks; int32_t out; marks = 81; if (91 <= marks <= 100) { out = 0; printf("%s\n","Excellent!"); } else if (81 <= marks <= 90) { out = 1; printf("%s\n","Very good!"); } else if (71 <= marks <= 80) { out = 2; printf("%s\n","Well done!"); } else if (61 <= marks <= 70) { out = 3; printf("%s\n","Not bad!"); } else if (41 <= marks <= 60) { out = 4; printf("%s\n","You passed!"); } else if (marks <= 40) { out = 5; printf("%s\n","Better try again!"); } else { out = 6; printf("%s\n","Invalid marks"); } printf("%s%s%d\n", "Your marks are ", " ", marks); if (out != 1) { fprintf(stderr, "ERROR STOP"); exit(1); } if (91 <= marks <= 100) { printf("%s\n","Excellent!"); } else if (81 <= marks <= 90) { printf("%s\n","Very good!"); } else if (71 <= marks <= 80) { printf("%s\n","Well done!"); } else if (61 <= marks <= 70) { printf("%s\n","Not bad!"); } else if (41 <= marks <= 60) { printf("%s\n","You passed!"); } else if (marks <= 40) { printf("%s\n","Better try again!"); } else { printf("%s\n","Invalid marks"); } printf("%s%s%d\n", "Your marks are ", " ", marks); if (91 <= marks <= 100) { printf("%s\n","Excellent!"); } else if (81 <= marks <= 90) { printf("%s\n","Very good!"); } else if (71 <= marks <= 80) { printf("%s\n","Well done!"); } else if (61 <= marks <= 70) { printf("%s\n","Not bad!"); } else if (41 <= marks <= 60) { printf("%s\n","You passed!"); } else if (marks <= 40) { printf("%s\n","Better try again!"); } else { printf("%s\n","Invalid marks"); } printf("%s%s%d\n", "Your marks are ", " ", marks); return 0; } lfortran-0.64.0/tests/reference/ast-while_02_fixed_form-524b922.stdout0000664000175000017500000001011515227365530025475 0ustar alastairalastair(TranslationUnit [(Program while_02 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (j [] [] () () None ())] () )] [(Assignment 0 i 0 () ) (Assignment 0 j 0 () ) (WhileLoop 0 () (< i 10) [(Assignment 0 i (+ i 1) () ) (Assignment 0 j (+ j i) () )] () () ) (If 0 () (/= j 55) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (/= i 10) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 i 0 () ) (Assignment 0 j 0 () ) (WhileLoop 0 () (< i 10) [(Assignment 0 i (+ i 1) () ) (If 0 () (== i 2) [(Exit 0 () () )] [] () () () ) (Assignment 0 j (+ j i) () )] () () ) (If 0 () (/= j 1) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (/= i 2) [(ErrorStop 0 () () () )] [] () () () ) (Assignment 0 i 0 () ) (Assignment 0 j 0 () ) (WhileLoop 0 () (< i 10) [(Assignment 0 i (+ i 1) () ) (If 0 () (== i 2) [(Cycle 0 () () )] [] () () () ) (Assignment 0 j (+ j i) () )] () () ) (If 0 () (/= j 53) [(ErrorStop 0 () () () )] [] () () () ) (If 0 () (/= i 10) [(ErrorStop 0 () () () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-flush2-9767ece.stderr0000664000175000017500000000103115227365530023221 0ustar alastairalastairwarning: The 'flush' intrinsic function is an LFortran extension --> tests/flush2.f90:3:5 | 3 | call flush() | ^^^^^^^^^^^^ help: use the 'flush' statement instead warning: The 'flush' intrinsic function is an LFortran extension --> tests/flush2.f90:5:5 | 5 | call flush(10) | ^^^^^^^^^^^^^^ help: use the 'flush' statement instead warning: The 'flush' intrinsic function is an LFortran extension --> tests/flush2.f90:6:5 | 6 | call flush() | ^^^^^^^^^^^^ help: use the 'flush' statement instead lfortran-0.64.0/tests/reference/pass_do_loops-doloop_04-749d5f0.stdout0000664000175000017500000007475015227365530025646 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { doloop_04: (Program (SymbolTable 2 { __do_loop_inc: (Variable 2 __do_loop_inc [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __do_loop_inc1: (Variable 2 __do_loop_inc1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __do_loop_inc2: (Variable 2 __do_loop_inc2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) doloop_04 [] [(Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 k) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __do_loop_inc) (Var 2 k) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (Var 2 __do_loop_inc) (Integer 4) () ) () .false. .false. ) (WhileLoop () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) Or (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc) LtE (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc) (Integer 4) () ) GtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 25 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 k) (IntegerUnaryMinus (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) (IntegerConstant -2 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 __do_loop_inc1) (Var 2 k) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 10 (Integer 4) Decimal) Sub (Var 2 __do_loop_inc1) (Integer 4) () ) () .false. .false. ) (WhileLoop () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc1) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc1) (Integer 4) () ) LtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) Or (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc1) LtE (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc1) (Integer 4) () ) GtE (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc1) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 30 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 j)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop a (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Exit a )] [] )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (WhileLoop b (IntegerCompare (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(Exit b )] [] )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 j) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (WhileLoop c (LogicalConstant .true. (Logical 4) ) [(Assignment (Var 2 j) (IntegerBinOp (Var 2 j) Add (Var 2 i) (Integer 4) () ) () .false. .false. ) (If () (IntegerCompare (Var 2 i) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(Exit c )] [] ) (Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] [] ) (If () (IntegerCompare (Var 2 j) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 2 k) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 __do_loop_inc2) (Var 2 k) () .false. .false. ) (Assignment (Var 2 i) (IntegerBinOp (IntegerConstant 1 (Integer 4) Decimal) Sub (Var 2 __do_loop_inc2) (Integer 4) () ) () .false. .false. ) (WhileLoop () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc2) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc2) (Integer 4) () ) LtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) Or (LogicalBinOp (IntegerCompare (Var 2 __do_loop_inc2) LtE (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) And (IntegerCompare (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc2) (Integer 4) () ) GtE (IntegerConstant 10 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) (Logical 4) () ) [(Assignment (Var 2 i) (IntegerBinOp (Var 2 i) Add (Var 2 __do_loop_inc2) (Integer 4) () ) () .false. .false. ) (GoToTarget 100 100 )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-cpp5-4cb2070.stderr0000664000175000017500000000023515227365530025027 0ustar alastairalastairsemantic error: Variable 'z12345678' is not declared --> tests/errors/cpp5.f90:5:13 | 5 | print *, x, C123 | ^^^^ 'z12345678' is undeclared lfortran-0.64.0/tests/reference/llvm-class_01-82031c0.stderr0000664000175000017500000000035015227365530023422 0ustar alastairalastairwarning: Change of value in conversion from 'real(8)' to 'real(4)' --> tests/../integration_tests/class_01.f90:4:16 | 4 | real :: pi = 3.1415926535897931d0 ! Class-wide private constant | ^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-array_constructor_with_different_kind-80c5bf4.stderr0000664000175000017500000000030715227365530031656 0ustar alastairalastairsemantic error: Element in `real(8)` array constructor is `real(4)` --> tests/errors/array_constructor_with_different_kind.f90:4:18 | 4 | print *, [x, [1., 2.]] | ^^^^^^^^ lfortran-0.64.0/tests/reference/asr-operator_overloading_01-9ec8e71.json0000664000175000017500000000115515227365530026213 0ustar alastairalastair{ "basename": "asr-operator_overloading_01-9ec8e71", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/operator_overloading_01.f90", "infile_hash": "f44f3172b4b5235b41deb5a4d4eaadc61a6b7c51e002a983889cf38f", "outfile": null, "outfile_hash": null, "stdout": "asr-operator_overloading_01-9ec8e71.stdout", "stdout_hash": "2ee689557bd5563f15847742eed6699f562d1d61ac7c63d770820b40", "stderr": "asr-operator_overloading_01-9ec8e71.stderr", "stderr_hash": "bc887b577bc8ccfc15f212c070a67ee8c67af8d343abdd0132e6b6fb", "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-associate_02-558b0e6.stdout0000664000175000017500000003774315227365530024426 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %complex_4 = type <{ float, float }> %string_descriptor = type <{ i8*, i64 }> @associate_02.t1 = internal global i32 2 @associate_02.t2 = internal global double 2.000000e+00 @associate_02.t3 = internal global %complex_4 zeroinitializer @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.5 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.6 = private unnamed_addr constant [8 x i8] c"{R4,R4}\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.7 = private unnamed_addr constant [8 x i8] c"{R4,R4}\00", align 1 @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc19 = alloca %string_descriptor, align 8 %stringFormat_desc16 = alloca %string_descriptor, align 8 %stringFormat_desc13 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %p1 = alloca i32*, align 8 store i32* null, i32** %p1, align 8 %p2 = alloca double*, align 8 store double* null, double** %p2, align 8 %p3 = alloca %complex_4*, align 8 store %complex_4* null, %complex_4** %p3, align 8 store %complex_4 <{ float 2.000000e+00, float 3.000000e+00 }>, %complex_4* @associate_02.t3, align 1 store i32* @associate_02.t1, i32** %p1, align 8 store double* @associate_02.t2, double** %p2, align 8 store %complex_4* @associate_02.t3, %complex_4** %p3, align 8 %3 = load i32*, i32** %p1, align 8 store i32 1, i32* %3, align 4 %4 = load double*, double** %p2, align 8 store double 4.000000e+00, double* %4, align 8 %5 = alloca i64, align 8 %6 = load i32*, i32** %p1, align 8 %7 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %5, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %6) %8 = load i64, i64* %5, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %7, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %8, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %14 = load i64, i64* %13, align 8 %15 = trunc i64 %14 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %12, i32 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %16 = icmp eq i8* %7, null br i1 %16, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %7) br label %free_done free_done: ; preds = %free_nonnull, %.entry %17 = alloca i64, align 8 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.1, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @associate_02.t1) %19 = load i64, i64* %17, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %18) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %28 = load double*, double** %p2, align 8 %29 = load double, double* %28, align 8 %30 = load i32*, i32** %p1, align 8 %31 = load i32, i32* %30, align 4 %32 = sitofp i32 %31 to double %33 = fadd double %29, %32 %34 = fptosi double %33 to i32 store i32 %34, i32* @associate_02.t1, align 4 %35 = alloca i64, align 8 %36 = load i32*, i32** %p1, align 8 %37 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.2, i32 0, i32 0), i64* %35, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %36) %38 = load i64, i64* %35, align 8 %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %37, i8** %39, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %38, i64* %40, align 8 %41 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %42 = load i8*, i8** %41, align 8 %43 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %44 = load i64, i64* %43, align 8 %45 = trunc i64 %44 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %42, i32 %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %46 = icmp eq i8* %37, null br i1 %46, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %37) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %47 = alloca i64, align 8 %48 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.3, i32 0, i32 0), i64* %47, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @associate_02.t1) %49 = load i64, i64* %47, align 8 %50 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %48, i8** %50, align 8 %51 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %49, i64* %51, align 8 %52 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %53 = load i8*, i8** %52, align 8 %54 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %55 = load i64, i64* %54, align 8 %56 = trunc i64 %55 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %53, i32 %56, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %57 = icmp eq i8* %48, null br i1 %57, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %free_done6 call void @_lfortran_free_alloc(i8* %2, i8* %48) br label %free_done9 free_done9: ; preds = %free_nonnull8, %free_done6 store i32 8, i32* @associate_02.t1, align 4 %58 = alloca i64, align 8 %59 = load i32*, i32** %p1, align 8 %60 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.4, i32 0, i32 0), i64* %58, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %59) %61 = load i64, i64* %58, align 8 %62 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %60, i8** %62, align 8 %63 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %61, i64* %63, align 8 %64 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %65 = load i8*, i8** %64, align 8 %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %67 = load i64, i64* %66, align 8 %68 = trunc i64 %67 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %65, i32 %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %69 = icmp eq i8* %60, null br i1 %69, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %free_done9 call void @_lfortran_free_alloc(i8* %2, i8* %60) br label %free_done12 free_done12: ; preds = %free_nonnull11, %free_done9 %70 = alloca i64, align 8 %71 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.5, i32 0, i32 0), i64* %70, i32 0, i32 0, i32 0, i32 0, i32 0, i32* @associate_02.t1) %72 = load i64, i64* %70, align 8 %73 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 store i8* %71, i8** %73, align 8 %74 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 store i64 %72, i64* %74, align 8 %75 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 %76 = load i8*, i8** %75, align 8 %77 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 %78 = load i64, i64* %77, align 8 %79 = trunc i64 %78 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %76, i32 %79, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %80 = icmp eq i8* %71, null br i1 %80, label %free_done15, label %free_nonnull14 free_nonnull14: ; preds = %free_done12 call void @_lfortran_free_alloc(i8* %2, i8* %71) br label %free_done15 free_done15: ; preds = %free_nonnull14, %free_done12 %81 = load %complex_4*, %complex_4** %p3, align 8 %82 = load %complex_4*, %complex_4** %p3, align 8 %83 = load %complex_4, %complex_4* %82, align 1 %84 = extractvalue %complex_4 %83, 0 %85 = extractvalue %complex_4 %83, 1 %86 = fmul float 2.000000e+00, %84 %87 = fmul float 0.000000e+00, %85 %88 = fmul float 2.000000e+00, %85 %89 = fmul float 0.000000e+00, %84 %90 = fsub float %86, %87 %91 = fadd float %88, %89 %92 = insertvalue %complex_4 undef, float %90, 0 %93 = insertvalue %complex_4 %92, float %91, 1 store %complex_4 %93, %complex_4* %81, align 1 %94 = alloca i64, align 8 %95 = load %complex_4*, %complex_4** %p3, align 8 %96 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @serialization_info.6, i32 0, i32 0), i64* %94, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* %95) %97 = load i64, i64* %94, align 8 %98 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 store i8* %96, i8** %98, align 8 %99 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 store i64 %97, i64* %99, align 8 %100 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 %101 = load i8*, i8** %100, align 8 %102 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 %103 = load i64, i64* %102, align 8 %104 = trunc i64 %103 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %101, i32 %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %105 = icmp eq i8* %96, null br i1 %105, label %free_done18, label %free_nonnull17 free_nonnull17: ; preds = %free_done15 call void @_lfortran_free_alloc(i8* %2, i8* %96) br label %free_done18 free_done18: ; preds = %free_nonnull17, %free_done15 %106 = alloca i64, align 8 %107 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @serialization_info.7, i32 0, i32 0), i64* %106, i32 0, i32 0, i32 0, i32 0, i32 0, %complex_4* @associate_02.t3) %108 = load i64, i64* %106, align 8 %109 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 store i8* %107, i8** %109, align 8 %110 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 store i64 %108, i64* %110, align 8 %111 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 %112 = load i8*, i8** %111, align 8 %113 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 %114 = load i64, i64* %113, align 8 %115 = trunc i64 %114 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* %112, i32 %115, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0), i32 1) %116 = icmp eq i8* %107, null br i1 %116, label %free_done21, label %free_nonnull20 free_nonnull20: ; preds = %free_done18 call void @_lfortran_free_alloc(i8* %2, i8* %107) br label %free_done21 free_done21: ; preds = %free_nonnull20, %free_done18 br label %return return: ; preds = %free_done21 br label %FINALIZE_SYMTABLE_associate_02 FINALIZE_SYMTABLE_associate_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-preprocessor17-f2d76bb.stdout0000664000175000017500000000700715227365530025007 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor1: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor1 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (IntegerConstant 12345678 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-implicit5-8745632.json0000664000175000017500000000074215227365530023144 0ustar alastairalastair{ "basename": "asr-implicit5-8745632", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit5.f90", "infile_hash": "57638dfdf42ed194d8b670c35ec4e43e74c3a6cf3a32f2cb553f5927", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit5-8745632.stdout", "stdout_hash": "9028ea895f05a0096d694b404a3ae80122454d0bb1c9bd6548752a93", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_json-special_chars_json-219ee5a.json0000664000175000017500000000077515227365530026350 0ustar alastairalastair{ "basename": "ast_json-special_chars_json-219ee5a", "cmd": "lfortran --show-ast --no-indent --json {infile} -o {outfile}", "infile": "tests/special_chars_json.f90", "infile_hash": "f1aaa183ee7d224a4f0e158546c6f3077e139ee963f833a4c37394d5", "outfile": null, "outfile_hash": null, "stdout": "ast_json-special_chars_json-219ee5a.stdout", "stdout_hash": "0dbe25709b76c1d48d417076eca4cdc65f0a05ca07acc2b1ec206b68", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_shape_06-53f4e72.stderr0000664000175000017500000000056115227365530024555 0ustar alastairalastairruntime error: Array shape mismatch in assignment to 'output'. Tried to match size 1 of dimension 1 of LHS with size 8 of dimension 1 of RHS. --> tests/errors/array_shape_06.f90:8:9 | 8 | output = upstream_grad * 2.0_real32 | ^^^^^^ LHS size is 1 | 8 | output = upstream_grad * 2.0_real32 | ^^^^^^^^^^^^^ RHS size is 8 lfortran-0.64.0/tests/reference/pass_transform_optional_argument_functions-optional_03-1316a5f.json0000664000175000017500000000112115227365530033663 0ustar alastairalastair{ "basename": "pass_transform_optional_argument_functions-optional_03-1316a5f", "cmd": "lfortran --pass=transform_optional_argument_functions --show-asr --no-color {infile} -o {outfile}", "infile": "tests/optional_03.f90", "infile_hash": "706b33a3f5e59ce5e07ca126a2b59cadd02456d4d1f759b068cb8ffe", "outfile": null, "outfile_hash": null, "stdout": "pass_transform_optional_argument_functions-optional_03-1316a5f.stdout", "stdout_hash": "bb4db50caeadbd2abf67db39a1599daa9e44e73bc6dcaceb5eb84bf2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dfloat1-6063adb.stderr0000664000175000017500000000021715227365530023331 0ustar alastairalastairsemantic error: Argument of intrinsic must be an integer --> tests/errors/dfloat1.f90:3:10 | 3 | print *, dfloat(y) | ^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-intrinsics3-a8fd035.json0000664000175000017500000000073515227365530023727 0ustar alastairalastair{ "basename": "asr-intrinsics3-a8fd035", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics3.f90", "infile_hash": "4a1a87d1964e4fcaec28b46493e377b19c106ddf516e7eece19bf505", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics3-a8fd035.stderr", "stderr_hash": "9662b63070f3016d3239c26dc851585640cfeda7c75518af0882dae7", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-unlimited_polymorphic_intrinsic_type_allocate-3e26601.stdout0000664000175000017500000003226515227365530033462 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> %"~unlimited_polymorphic_type" = type <{ i32 (...)**, i8* }> @_Type_Info_integer_8 = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* inttoptr (i32 8 to i8*), i8* inttoptr (i64 8 to i8*), i8* null }, align 8 @_VTable_integer_8 = linkonce_odr unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_integer_8 to i8*), i8* bitcast (void (i8*, i8*)* @_copy_integer_8 to i8*), i8* bitcast (void (i8**)* @_allocate_integer_8 to i8*), i8* bitcast (void (i8*)* @finalize_i64_for_UPoly to i8*)] }, align 8 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [10 x i8] c"integer(8)" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([10 x i8], [10 x i8]* @string_const_data, i32 0, i32 0), i64 10 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @_Type_Info_integer_4 = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* inttoptr (i32 4 to i8*), i8* inttoptr (i64 4 to i8*), i8* null }, align 8 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.1 = private constant [10 x i8] c"integer(4)" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([10 x i8], [10 x i8]* @string_const_data.1, i32 0, i32 0), i64 10 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @_Type_Info_real_4 = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* inttoptr (i32 6 to i8*), i8* inttoptr (i64 4 to i8*), i8* null }, align 8 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.3 = private constant [4 x i8] c"real" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([4 x i8], [4 x i8]* @string_const_data.3, i32 0, i32 0), i64 4 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.5 = private constant [7 x i8] c"default" @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data.5, i32 0, i32 0), i64 7 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %var = alloca %"~unlimited_polymorphic_type"*, align 8 store %"~unlimited_polymorphic_type"* null, %"~unlimited_polymorphic_type"** %var, align 8 %x = alloca i64, align 8 store i64 10, i64* %x, align 8 %2 = call i8* @_lfortran_get_default_allocator() %3 = call i8* @_lfortran_malloc_alloc(i8* %2, i64 8) call void @llvm.memset.p0i8.i32(i8* %3, i8 0, i32 8, i1 false) %4 = call i8* @_lfortran_get_default_allocator() %5 = call i8* @_lfortran_malloc_alloc(i8* %4, i64 16) call void @llvm.memset.p0i8.i32(i8* %5, i8 0, i32 16, i1 false) %6 = bitcast i8* %5 to %"~unlimited_polymorphic_type"* store %"~unlimited_polymorphic_type"* %6, %"~unlimited_polymorphic_type"** %var, align 8 %7 = load %"~unlimited_polymorphic_type"*, %"~unlimited_polymorphic_type"** %var, align 8 %8 = getelementptr %"~unlimited_polymorphic_type", %"~unlimited_polymorphic_type"* %7, i32 0, i32 1 store i8* %3, i8** %8, align 8 %9 = load i8*, i8** %8, align 8 %10 = bitcast i8* %9 to i64* %11 = bitcast %"~unlimited_polymorphic_type"* %6 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_VTable_integer_8, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %11, align 8 %12 = load i64, i64* %x, align 8 store i64 %12, i64* %10, align 8 %13 = alloca i1, align 1 %14 = load %"~unlimited_polymorphic_type"*, %"~unlimited_polymorphic_type"** %var, align 8 %15 = bitcast %"~unlimited_polymorphic_type"* %14 to i8* %16 = call i8* @__lfortran_dynamic_cast(i8* %15, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_integer_8 to i8*), i1 true) %17 = icmp ne i8* %16, null store i1 %17, i1* %13, align 1 %18 = load i1, i1* %13, align 1 br i1 %18, label %then, label %else then: ; preds = %.entry br label %"~select_type_block_.start" "~select_type_block_.start": ; preds = %then %19 = call i8* @llvm.stacksave() %20 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %20, i32 10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %"~select_type_block_.end" "~select_type_block_.end": ; preds = %"~select_type_block_.start" br label %"FINALIZE_SYMTABLE_~select_type_block_" "FINALIZE_SYMTABLE_~select_type_block_": ; preds = %"~select_type_block_.end" call void @llvm.stackrestore(i8* %19) br label %ifcont else: ; preds = %.entry %21 = alloca i1, align 1 %22 = load %"~unlimited_polymorphic_type"*, %"~unlimited_polymorphic_type"** %var, align 8 %23 = bitcast %"~unlimited_polymorphic_type"* %22 to i8* %24 = call i8* @__lfortran_dynamic_cast(i8* %23, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_integer_4 to i8*), i1 true) %25 = icmp ne i8* %24, null store i1 %25, i1* %21, align 1 %26 = load i1, i1* %21, align 1 br i1 %26, label %then1, label %else2 then1: ; preds = %else br label %"~select_type_block_1.start" "~select_type_block_1.start": ; preds = %then1 %27 = call i8* @llvm.stacksave() %28 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %28, i32 10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) br label %"~select_type_block_1.end" "~select_type_block_1.end": ; preds = %"~select_type_block_1.start" br label %"FINALIZE_SYMTABLE_~select_type_block_1" "FINALIZE_SYMTABLE_~select_type_block_1": ; preds = %"~select_type_block_1.end" call void @llvm.stackrestore(i8* %27) br label %ifcont else2: ; preds = %else %29 = alloca i1, align 1 %30 = load %"~unlimited_polymorphic_type"*, %"~unlimited_polymorphic_type"** %var, align 8 %31 = bitcast %"~unlimited_polymorphic_type"* %30 to i8* %32 = call i8* @__lfortran_dynamic_cast(i8* %31, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_real_4 to i8*), i1 true) %33 = icmp ne i8* %32, null store i1 %33, i1* %29, align 1 %34 = load i1, i1* %29, align 1 br i1 %34, label %then3, label %else4 then3: ; preds = %else2 br label %"~select_type_block_2.start" "~select_type_block_2.start": ; preds = %then3 %35 = call i8* @llvm.stacksave() %36 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %36, i32 4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) br label %"~select_type_block_2.end" "~select_type_block_2.end": ; preds = %"~select_type_block_2.start" br label %"FINALIZE_SYMTABLE_~select_type_block_2" "FINALIZE_SYMTABLE_~select_type_block_2": ; preds = %"~select_type_block_2.end" call void @llvm.stackrestore(i8* %35) br label %ifcont else4: ; preds = %else2 br label %"~select_type_block_3.start" "~select_type_block_3.start": ; preds = %else4 %37 = call i8* @llvm.stacksave() %38 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %38, i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) br label %"~select_type_block_3.end" "~select_type_block_3.end": ; preds = %"~select_type_block_3.start" br label %"FINALIZE_SYMTABLE_~select_type_block_3" "FINALIZE_SYMTABLE_~select_type_block_3": ; preds = %"~select_type_block_3.end" call void @llvm.stackrestore(i8* %37) br label %ifcont ifcont: ; preds = %"FINALIZE_SYMTABLE_~select_type_block_3", %"FINALIZE_SYMTABLE_~select_type_block_2", %"FINALIZE_SYMTABLE_~select_type_block_1", %"FINALIZE_SYMTABLE_~select_type_block_" br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_unlimited_polymorphic_intrinsic_type_allocate FINALIZE_SYMTABLE_unlimited_polymorphic_intrinsic_type_allocate: ; preds = %return br label %Finalize_Variable_var Finalize_Variable_var: ; preds = %FINALIZE_SYMTABLE_unlimited_polymorphic_intrinsic_type_allocate %39 = load %"~unlimited_polymorphic_type"*, %"~unlimited_polymorphic_type"** %var, align 8 call void @"finalize_allocatable__StructType_Class__~unlimited_polymorphic_type_3"(%"~unlimited_polymorphic_type"* %39) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0 define linkonce_odr void @_copy_integer_8(i8* %0, i8* %1) { entry: %2 = bitcast i8* %0 to i64* %3 = bitcast i8* %1 to i64* %4 = load i64, i64* %2, align 8 store i64 %4, i64* %3, align 8 ret void } define linkonce_odr void @_allocate_integer_8(i8** %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = call i8* @_lfortran_malloc_alloc(i8* %1, i64 16) call void @llvm.memset.p0i8.i32(i8* %2, i8 0, i32 16, i1 false) store i8* %2, i8** %0, align 8 %3 = bitcast i8* %2 to <{ i32 (...)**, i8* }>* %4 = bitcast <{ i32 (...)**, i8* }>* %3 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_VTable_integer_8, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %4, align 8 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 8) call void @llvm.memset.p0i8.i32(i8* %6, i8 0, i32 8, i1 false) %7 = getelementptr <{ i32 (...)**, i8* }>, <{ i32 (...)**, i8* }>* %3, i32 0, i32 1 store i8* %6, i8** %7, align 8 ret void } define internal void @finalize_i64_for_UPoly(i8* %0) { entry: %1 = bitcast i8* %0 to i64* ret void } declare i8* @__lfortran_dynamic_cast(i8*, i8*, i1) ; Function Attrs: nounwind declare i8* @llvm.stacksave() #1 declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) ; Function Attrs: nounwind declare void @llvm.stackrestore(i8*) #1 define internal void @"finalize_allocatable__StructType_Class__~unlimited_polymorphic_type_3"(%"~unlimited_polymorphic_type"* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = icmp ne %"~unlimited_polymorphic_type"* %0, null br i1 %2, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry call void @"finalize_StructType_Class__~unlimited_polymorphic_type_3"(%"~unlimited_polymorphic_type"* %0) %3 = bitcast %"~unlimited_polymorphic_type"* %0 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %3) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then ret void } define internal void @"finalize_StructType_Class__~unlimited_polymorphic_type_3"(%"~unlimited_polymorphic_type"* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = getelementptr %"~unlimited_polymorphic_type", %"~unlimited_polymorphic_type"* %0, i32 0, i32 0 %3 = load i32 (...)**, i32 (...)*** %2, align 8 %4 = icmp ne i32 (...)** %3, null br i1 %4, label %is_allocated.then, label %is_allocated.else is_allocated.then: ; preds = %entry %5 = getelementptr inbounds i32 (...)*, i32 (...)** %3, i32 2 %6 = load i8*, i32 (...)** %5, align 8 %7 = bitcast i8* %6 to void (i8*)* %8 = getelementptr %"~unlimited_polymorphic_type", %"~unlimited_polymorphic_type"* %0, i32 0, i32 1 %9 = load i8*, i8** %8, align 8 call void %7(i8* %9) br label %is_allocated.ifcont is_allocated.else: ; preds = %entry br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then %10 = getelementptr %"~unlimited_polymorphic_type", %"~unlimited_polymorphic_type"* %0, i32 0, i32 1 %11 = load i8*, i8** %10, align 8 call void @_lfortran_free_alloc(i8* %1, i8* %11) ret void } declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() attributes #0 = { argmemonly nounwind willreturn writeonly } attributes #1 = { nounwind } lfortran-0.64.0/tests/reference/run-format_32-b407b58.json0000664000175000017500000000071515227365530023211 0ustar alastairalastair{ "basename": "run-format_32-b407b58", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_32.f90", "infile_hash": "385d84e335ddd90480fc23634cd59d26ffab47077a530930c9b040c4", "outfile": null, "outfile_hash": null, "stdout": "run-format_32-b407b58.stdout", "stdout_hash": "cc677e65d96a9b300f723460d58d5958810ec354b9c40c4d015aab9a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor1-7e98a71.stdout0000664000175000017500000000700715227365530027036 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor1: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) preprocessor1 [] [(Assignment (Var 2 x) (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) ) Mul (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) (IntegerConstant 25 (Integer 4) Decimal) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x) (IntegerConstant 12345678 (Integer 4) Decimal)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-init_values-19dfa76.stdout0000664000175000017500000004415315227365530024363 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { init_values: (Program (SymbolTable 2 { a: (Variable 2 a [i j] Local (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [l] Local (LogicalBinOp (Var 2 l) Or (LogicalConstant .true. (Logical 4) ) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) (LogicalConstant .true. (Logical 4) ) Parameter (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local (ComplexConstructor (RealConstant 3.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.000000 4.000000 (Complex 4) ) ) (ComplexConstant 3.000000 4.000000 (Complex 4) ) Parameter (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local (Cast (RealConstant 1.000000 (Real 4) ) RealToInteger (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) () ) (IntegerConstant 1 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local (Cast (RealConstant 2.000000 (Real 4) ) RealToInteger (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) () ) (IntegerConstant 2 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 2 l [a] Local (IntegerCompare (Var 2 a) Eq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .true. (Logical 4) ) ) (LogicalConstant .true. (Logical 4) ) Parameter (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local (RealConstant 4.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r_minus: (Variable 2 r_minus [r] Local (RealUnaryMinus (Var 2 r) (Real 4) (RealConstant -4.000000 (Real 4) ) ) (RealConstant -4.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 2 s [s1 s2] Local (IntrinsicElementalFunction StringConcat [(Var 2 s1) (Var 2 s2)] 0 (String 1 (IntegerConstant 4 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "left" (String 1 (IntegerConstant 4 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "left" (String 1 (IntegerConstant 4 (Integer 8) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 2 s1 [] Local (StringConstant "l" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "l" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 2 s2 [] Local (StringConstant "eft" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "eft" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) init_values [] [(Print (StringFormat () [(Var 2 i) (Var 2 j) (Var 2 r) (Var 2 c) (Var 2 a) (Var 2 l) (Var 2 b) (Var 2 r_minus) (Var 2 s)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/fortran-integer_to_real_cast_in_comparison-a6f3411.f900000664000175000017500000000046715227365530031003 0ustar alastairalastairprogram expr2 implicit none integer(4), parameter :: dp = Kind(0.0000000000000000e+00_8) contains elemental real(8) function dabs(x) result(r) real(8), intent(in) :: x if (x > real(0, kind=8)) then r = x else r = real(0, kind=8) - x end if end function dabs end program expr2 lfortran-0.64.0/tests/reference/ast-types_12-025af39.stdout0000664000175000017500000000572515227365530023423 0ustar alastairalastair(TranslationUnit [(Program types_12 () [(Use [] iso_c_binding [(UseSymbol c_int () ) (UseSymbol c_double () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Interface (InterfaceHeader) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceProc (Function f [(a) (b)] [(AttrType TypeInteger [(() c_int Value)] () () None )] r () () [] [(Import [c_int c_double] ImportDefault () )] [] [(Declaration (AttrType TypeInteger [(() c_int Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() c_double Value)] () () None ) [(SimpleAttribute AttrValue ) (AttrIntent In )] [(b [] [] () () None ())] () )] [] [] [] ) )] )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-array10-1f60f5f.stdout0000664000175000017500000000613415227365530023311 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { const_arrays: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (ArrayConstant 20 [4, 9, 6, 12, 13] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (ArrayConstant 20 [4, 9, 6, 12, 13] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Parameter (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) const_arrays [] [(Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-private1-d8bb7ee.stdout0000664000175000017500000002050415227365530023725 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { foo1: (Module (SymbolTable 2 { }) foo1 () [] .false. .false. .false. ), foo2: (Module (SymbolTable 3 { f: (Function (SymbolTable 4 { }) f (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 y) (RealConstant 3.000000 (Real 4) ) () .false. .false. )] () Public .true. .true. () ), y: (Variable 3 y [] Local (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) (RealConstant 2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) foo2 () [] .false. .false. .false. ), test: (Program (SymbolTable 5 { f: (ExternalSymbol 5 f 3 f foo2 [] f Public ), y: (ExternalSymbol 5 y 3 y foo2 [] y Public ) }) test [foo2] [(Print (StringFormat () [(Var 5 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 5 y) Sub (RealConstant 2.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (SubroutineCall 5 f () [] () .false. ) (Print (StringFormat () [(Var 5 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 5 y) Sub (RealConstant 3.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-allocate_01-f3446f6.stdout0000664000175000017500000032145215227365530024046 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { allocate_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Allocatable (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local (ArrayConstant 20 [1, 2, 3, 4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (ArrayConstant 20 [1, 2, 3, 4, 5] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) Save (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 2 g [] Local () () Default (Allocatable (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ierr: (Variable 2 ierr [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 2 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reduce_sum: (Function (SymbolTable 4 { c: (Variable 4 c [] In () () Default (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 4 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 4 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 4 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 4 r [] ReturnVar () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) reduce_sum (FunctionType [(Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray )] (Complex 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 c)] [(Assignment (Var 4 r) (Cast (IntegerConstant 0 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 0.000000 0.000000 (Complex 4) ) () ) () .false. .false. ) (DoLoop () ((Var 4 i) (ArrayBound (Var 4 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 4 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 4 j) (ArrayBound (Var 4 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 4 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 4 k) (ArrayBound (Var 4 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 4 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (Var 4 r) (ComplexBinOp (Var 4 r) Add (ArrayItem (Var 4 c) [(() (Var 4 i) ()) (() (Var 4 j) ()) (() (Var 4 k) ())] (Complex 4) ColMajor () ) (Complex 4) () ) () .false. .false. )] [] )] [] )] [] )] (Var 4 r) Public .true. .true. () ), sum: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Out () () Default (Allocatable (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c_copy: (Variable 3 c_copy [] Local () () Default (Allocatable (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 3 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), k: (Variable 3 k [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sum (FunctionType [(Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) (Allocatable (Array (Complex 4) [(() ()) (() ()) (() ())] DescriptorArray ) )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a) (Var 3 b) (Var 3 c)] [(Allocate [((Var 3 c_copy) [((ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () () ) (Allocate [((Var 3 c) [((ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (IntegerBinOp (IntegerBinOp (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) Sub (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () () ) (DoLoop () ((Var 3 i) (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 3 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 3 j) (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 3 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 3 k) (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 3 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (ArrayItem (Var 3 c_copy) [(() (Var 3 i) ()) (() (Var 3 j) ()) (() (Var 3 k) ())] (Complex 4) ColMajor () ) (Cast (RealBinOp (Cast (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Integer 4) ColMajor () ) IntegerToReal (Real 4) () () ) Add (ArrayItem (Var 3 b) [(() (Var 3 j) ()) (() (Var 3 k) ())] (Real 4) ColMajor () ) (Real 4) () ) RealToComplex (Complex 4) () () ) () .false. .false. ) (Assignment (ArrayItem (Var 3 c) [(() (Var 3 i) ()) (() (Var 3 j) ()) (() (Var 3 k) ())] (Complex 4) ColMajor () ) (Cast (RealBinOp (Cast (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Integer 4) ColMajor () ) IntegerToReal (Real 4) () () ) Add (ArrayItem (Var 3 b) [(() (Var 3 j) ()) (() (Var 3 k) ())] (Real 4) ColMajor () ) (Real 4) () ) RealToComplex (Complex 4) () () ) () .false. .false. )] [] )] [] )] [] ) (ExplicitDeallocate [(Var 3 c_copy)] )] () Public .true. .true. () ) }) allocate_01 [] [(Assignment (Var 2 n) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (Allocate [((Var 2 e) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] () () ())] () () (Var 2 d) ) (If () (IntegerCompare (ArraySize (Var 2 e) () (Integer 4) () ) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Allocate [((Var 2 a) [((ArrayBound (Var 2 e) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 e) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () (Var 2 e) ) (If () (IntegerCompare (ArraySize (Var 2 a) () (Integer 4) () ) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (ExplicitDeallocate [(Var 2 a)] ) (Allocate [((Var 2 b) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] () () ())] () () () ) (Allocate [((Var 2 f) [((ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () (Var 2 b) ) (If () (LogicalBinOp (IntegerCompare (ArraySize (Var 2 f) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) Or (IntegerCompare (ArraySize (Var 2 f) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (ExplicitDeallocate [(Var 2 b)] ) (Allocate [((Var 2 c) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] () () ())] () () () ) (Allocate [((Var 2 g) [((ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () )) ((ArrayBound (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound () ) (ArraySize (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () (Var 2 c) ) (If () (LogicalBinOp (LogicalBinOp (IntegerCompare (ArraySize (Var 2 g) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) Or (IntegerCompare (ArraySize (Var 2 g) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) Or (IntegerCompare (ArraySize (Var 2 g) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) () ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (ExplicitDeallocate [(Var 2 c)] ) (Allocate [((Var 2 a) [((IntegerConstant 5 (Integer 4) Decimal) (IntegerBinOp (Var 2 n) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () () ())] () () () ) (Allocate [((Var 2 b) [((Var 2 n) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (Var 2 n) (Integer 4) () ) Sub (Var 2 n) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((Var 2 n) (IntegerBinOp (IntegerBinOp (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Mul (Var 2 n) (Integer 4) () ) Sub (Var 2 n) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ))] () () ())] (Var 2 ierr) () () ) (If () (IntegerCompare (ArraySize (Var 2 a) () (Integer 4) () ) NotEq (IntegerBinOp (Var 2 n) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (ArraySize (Var 2 b) () (Integer 4) () ) NotEq (IntegerBinOp (IntegerBinOp (Var 2 n) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Mul (IntegerBinOp (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (Var 2 n) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Integer 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. )] [] ) (DoLoop () ((Var 2 i) (ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 2 j) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Real 4) ColMajor () ) (Cast (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. )] [] )] [] ) (SubroutineCall 2 sum () [((Var 2 a)) ((Var 2 b)) ((Var 2 c))] () .false. ) (If () (LogicalBinOp (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) Or (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) NotEq (IntegerBinOp (Var 2 n) Add (IntegerConstant 5 (Integer 4) Decimal) (Integer 4) () ) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) NotEq (Var 2 n) (Logical 4) () ) Or (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) NotEq (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (Var 2 n) (Integer 4) () ) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound () ) NotEq (Var 2 n) (Logical 4) () ) Or (IntegerCompare (ArrayBound (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) UBound () ) NotEq (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Mul (Var 2 n) (Integer 4) () ) (Logical 4) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(If () (IntegerCompare (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) NotEq (Var 2 i) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (DoLoop () ((Var 2 i) (ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 2 j) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(If () (RealCompare (ArrayItem (Var 2 b) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Real 4) ColMajor () ) NotEq (Cast (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) IntegerToReal (Real 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] )] [] )] [] ) (DoLoop () ((Var 2 i) (ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 2 j) (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(DoLoop () ((Var 2 k) (ArrayBound (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 c) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(If () (ComplexCompare (ArrayItem (Var 2 c) [(() (Var 2 i) ()) (() (Var 2 j) ()) (() (Var 2 k) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Add (Var 2 k) (Integer 4) () ) IntegerToComplex (Complex 4) () () ) (Logical 4) () ) [(ErrorStop () )] [] )] [] )] [] )] [] ) (Assignment (Var 2 r) (FunctionCall 2 reduce_sum () [((Var 2 c))] (Complex 4) () () ) () .false. .false. ) (If () (ComplexCompare (Var 2 r) NotEq (ComplexConstructor (RealConstant 114345.000000 (Real 4) ) (RealConstant 0.000000 (Real 4) ) (Complex 4) (ComplexConstant 114345.000000 0.000000 (Complex 4) ) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-goto_02-fc47ad0.json0000664000175000017500000000105515227365530023004 0ustar alastairalastair{ "basename": "ast-goto_02-fc47ad0", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/goto_02.f90", "infile_hash": "2bd2e5ad2c2506c3da506b82aa7d12c7877206410c2d7637f556d10b", "outfile": null, "outfile_hash": null, "stdout": "ast-goto_02-fc47ad0.stdout", "stdout_hash": "0f83a7c1c8ae99021a94f1cfaaccde9a8bdf15ac5a5be3db3227342d", "stderr": "ast-goto_02-fc47ad0.stderr", "stderr_hash": "317795e3eb8121d18463c9531b060be0c248a0b34d70a2961d6d2047", "returncode": 0 }lfortran-0.64.0/tests/reference/ast-if2-65737e5.json0000664000175000017500000000067615227365530022020 0ustar alastairalastair{ "basename": "ast-if2-65737e5", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/if2.f90", "infile_hash": "7e5997e7b3a28044e5c2899900ea795edfd628c1ed4530afdf1aea0d", "outfile": null, "outfile_hash": null, "stdout": "ast-if2-65737e5.stdout", "stdout_hash": "5f295305024fda59a316f3bd169220cb153cf59821bb21982878f459", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-doloop_01-d646475.stdout0000664000175000017500000000334015227365530024007 0ustar alastairalastairfunction main() local i::Int32 local j::Int32 j = 0 for i ∈ 1:10 j = j + i end if j ≠ 55 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 10:-1:1 j = j + i end if j ≠ 55 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:2:9 j = j + i end if j ≠ 25 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 9:-2:1 j = j + i end if j ≠ 25 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:2:10 j = j + i end if j ≠ 25 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:3:10 j = j + i end if j ≠ 22 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 10:-3:1 j = j + i end if j ≠ 22 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:1 j = j + i end if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:-1:1 j = j + i end if j ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 1:0 j = j + i end if j ≠ 0 println(Base.stderr, "ERROR STOP") exit(1) end println(j) j = 0 for i ∈ 0:-1:1 j = j + i end if j ≠ 0 println(Base.stderr, "ERROR STOP") exit(1) end println(j) end main() lfortran-0.64.0/tests/reference/ast-fixedform_subroutine-2711676.stdout0000664000175000017500000000350115227365530026051 0ustar alastairalastair(TranslationUnit [(Subroutine f [(a) (b) (c)] [] () () [] [] [] [] [(Print 0 () [4] () )] [] [] ) (Program implicit_program_lfortran () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(k [] [] () () None ()) (l [] [] () () None ())] () )] [(Assignment 0 k 100 () ) (DoLoop 0 () 80 k 1 10 () [(Print 0 () [k] () )] () () ) (If 0 () (<= k 10000) [(Print 0 () [k] () )] [(Print 0 () [(+ k 1)] () ) (DoLoop 0 () 0 l 1 10 () [(Print 0 () [(String "do" ())] () )] () () )] () () () )] [] )] ) lfortran-0.64.0/tests/reference/asr-template_add_04-1710dbc.json0000664000175000017500000000076715227365530024401 0ustar alastairalastair{ "basename": "asr-template_add_04-1710dbc", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_add_04.f90", "infile_hash": "3a87e933776c164b3f127859bb8ca5b6daabc9c6df7232173c427158", "outfile": null, "outfile_hash": null, "stdout": "asr-template_add_04-1710dbc.stdout", "stdout_hash": "6c7e892368ed641aa70cc2b6b5dc8b4ba397f8fca37ef61267d48218", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_10-526e3f4.stdout0000664000175000017500000012137115227365530025122 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { my_module: (Module (SymbolTable 2 { finalize: (Function (SymbolTable 5 { self: (Variable 5 self [] InOut () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) finalize (FunctionType [(StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 self)] [] () Public .true. .true. () ), my_super_type: (Struct (SymbolTable 3 { x: (Variable 3 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) my_super_type (StructType [(Integer 4)] [] .true. .false. ) [] [x] [] Source Public .false. .false. .false. [] () () [] ), my_type: (Struct (SymbolTable 4 { g_proc: (GenericProcedure 4 g_proc [4 plus 4 unary] Public ), plus: (StructMethodDeclaration 4 plus () plus 2 plus Source .false. .false. ), proc: (StructMethodDeclaration 4 proc () print_something 2 print_something Source .false. .false. ), super: (Variable 4 super [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 my_super_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unary: (StructMethodDeclaration 4 unary () unary 2 unary Source .false. .false. ), x: (Variable 4 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 4 ~add [4 unary 4 plus] Public ) }) my_type (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) [my_super_type] [x super] [finalize] Source Public .false. .false. .false. [] () () [] ), plus: (Function (SymbolTable 9 { plus: (Variable 9 plus [] ReturnVar () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 9 self [] In () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus (FunctionType [(StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. )] (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 9 self)] [] (Var 9 plus) Public .true. .true. () ), print_something: (Function (SymbolTable 6 { self: (Variable 6 self [] InOut () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), str: (Variable 6 str [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) print_something (FunctionType [(StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 self) (Var 6 str)] [(Print (Var 6 str) )] () Public .false. .false. () ), say_something: (Function (SymbolTable 7 { msg: (Variable 7 msg [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 7 self [] InOut () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) say_something (FunctionType [(StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 7 self) (Var 7 msg)] [(Print (Var 7 msg) )] () Public .false. .false. () ), unary: (Function (SymbolTable 8 { self: (Variable 8 self [] In () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), unary: (Variable 8 unary [] ReturnVar () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 8 x [] In () () Default (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) 2 my_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) unary (FunctionType [(StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. ) (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .false. .false. )] (StructType [(Integer 4) (StructType [(Integer 4)] [] .true. .false. )] [] .true. .false. ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 8 self) (Var 8 x)] [] (Var 8 unary) Public .true. .true. () ) }) my_module () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_01_complex-2513a51.json0000664000175000017500000000077515227365530024642 0ustar alastairalastair{ "basename": "asr-arrays_01_complex-2513a51", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_01_complex.f90", "infile_hash": "2f81875039547fcf7eaa3375e4f99fbc8ef6d91ac2bb214c88cff999", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_01_complex-2513a51.stdout", "stdout_hash": "e25133ca340512d9e67b4dcee0be97513c1cb6e4850b595bf2eb5c47", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-empty-cb5d1b4.stdout0000664000175000017500000000011715227365530023417 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." lfortran-0.64.0/tests/reference/asr-derived_types_15-7fde02a.stdout0000664000175000017500000006455415227365530025272 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { derived_types_15_module_1: (Module (SymbolTable 2 { multiply: (Function (SymbolTable 4 { 1_t_1_i: (ExternalSymbol 4 1_t_1_i 3 i derived_types_15_module_1 [t_1] i Public ), j: (Variable 4 j [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 4 self [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 t_1 Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) multiply (FunctionType [(StructType [(Real 4)] [] .false. .false. ) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 self) (Var 4 j)] [(Assignment (Var 4 res) (RealBinOp (StructInstanceMember (Var 4 self) 4 1_t_1_i (Real 4) () ) Mul (Var 4 j) (Real 4) () ) () .false. .false. )] (Var 4 res) Private .true. .true. () ), sqrt_subtract: (Function (SymbolTable 5 { 1_t_1_i: (ExternalSymbol 5 1_t_1_i 3 i derived_types_15_module_1 [t_1] i Public ), j: (Variable 5 j [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 5 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), self: (Variable 5 self [] In () () Default (StructType [(Real 4)] [] .false. .false. ) 2 t_1 Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sqrt_subtract (FunctionType [(StructType [(Real 4)] [] .false. .false. ) (Integer 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 self) (Var 5 j)] [(Assignment (Var 5 res) (RealBinOp (StructInstanceMember (Var 5 self) 5 1_t_1_i (Real 4) () ) Sub (RealBinOp (Cast (Var 5 j) IntegerToReal (Real 4) () () ) Pow (RealConstant 0.500000 (Real 4) ) (Real 4) () ) (Real 4) () ) () .false. .false. )] (Var 5 res) Private .true. .true. () ), t_1: (Struct (SymbolTable 3 { compute: (GenericProcedure 3 compute [3 multiply 3 sqrt_subtract] Public ), i: (Variable 3 i [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), multiply: (StructMethodDeclaration 3 multiply () multiply 2 multiply Source .false. .false. ), sqrt_subtract: (StructMethodDeclaration 3 sqrt_subtract () sqrt_subtract 2 sqrt_subtract Source .false. .false. ) }) t_1 (StructType [(Real 4)] [] .true. .false. ) [] [i] [] Source Private .false. .false. .false. [] () () [] ) }) derived_types_15_module_1 () [] .false. .false. .false. ), name: (Program (SymbolTable 6 { 1_t_1_i: (ExternalSymbol 6 1_t_1_i 3 i derived_types_15_module_1 [t_1] i Public ), 1_t_1_multiply: (ExternalSymbol 6 1_t_1_multiply 3 multiply derived_types_15_module_1 [t_1] multiply Public ), 1_t_1_sqrt_subtract: (ExternalSymbol 6 1_t_1_sqrt_subtract 3 sqrt_subtract derived_types_15_module_1 [t_1] sqrt_subtract Public ), t_1: (ExternalSymbol 6 t_1 2 t_1 derived_types_15_module_1 [] t_1 Public ), type_1: (Variable 6 type_1 [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 6 t_1 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) name [derived_types_15_module_1] [(Assignment (StructInstanceMember (Var 6 type_1) 6 1_t_1_i (Real 4) () ) (RealConstant 100.000000 (Real 4) ) () .false. .false. ) (If () (RealCompare (FunctionCall 6 1_t_1_multiply () [((Var 6 type_1)) ((RealConstant 5.000000 (Real 4) ))] (Real 4) () (Var 6 type_1) ) NotEq (Cast (IntegerConstant 500 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 500.000000 (Real 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (FunctionCall 6 1_t_1_sqrt_subtract () [((Var 6 type_1)) ((IntegerConstant 2500 (Integer 4) Decimal))] (Real 4) () (Var 6 type_1) ) NotEq (Cast (IntegerConstant 50 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 50.000000 (Real 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/julia-doloop_08-f0d8fe6.stdout0000664000175000017500000000034615227365530024240 0ustar alastairalastairfunction main() local i::Int32 i = 1 while true i = i + 1 if i == 10 break end end if i ≠ 10 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/c-case_03-b50b4bf.stdout0000664000175000017500000000152115227365530022746 0ustar alastairalastair#include #include #include #include #include #include // Implementations int main(int argc, char* argv[]) { _lpython_set_argv(argc, argv); const int32_t a = 1; const int32_t b = 2; int32_t marks; marks = 94; if (marks >= 40 + b) { printf("%s\n","Pass!"); } else if (marks <= 39 - a) { printf("%s\n","Failed!"); } else { printf("%s\n","Invalid marks"); } printf("%s%s%d\n", "Your marks are ", " ", marks); marks = -1; if (marks >= 40 + b) { printf("%s\n","Pass!"); } else if (0 <= marks <= 39 - a) { printf("%s\n","Failed!"); } else { printf("%s\n","Invalid marks"); } printf("%s%s%d\n", "Your marks are ", " ", marks); return 0; } lfortran-0.64.0/tests/reference/ast-template_02-80b38d0.json0000664000175000017500000000075315227365530023513 0ustar alastairalastair{ "basename": "ast-template_02-80b38d0", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_02.f90", "infile_hash": "ced72b8e182313557b3b879bd14e860cc0d24eb74800baecbe858a70", "outfile": null, "outfile_hash": null, "stdout": "ast-template_02-80b38d0.stdout", "stdout_hash": "8ff66f31ccdd48f6e63082637e13ca5f88a3c00c84db499a5363209b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-bin_op_complex_dp-8ead434.json0000664000175000017500000000100015227365530025310 0ustar alastairalastair{ "basename": "llvm-bin_op_complex_dp-8ead434", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/bin_op_complex_dp.f90", "infile_hash": "9be1b396941b73e1466a46963ee3ade085440ce077b444ce7e2f6baf", "outfile": null, "outfile_hash": null, "stdout": "llvm-bin_op_complex_dp-8ead434.stdout", "stdout_hash": "9463fa88fb15879cfe8f677d825e6bd47eea351555b3b01a7e112904", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incorrect_array_type_where_01-b613ee3.stderr0000664000175000017500000000031315227365530027720 0ustar alastairalastairsemantic error: the first array argument to `where` must be of type logical --> tests/errors/incorrect_array_type_where_01.f90:5:10 | 5 | where([1, 2, 3, 4, 5]) b = 1 | ^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-intrinsics_33-816caef.json0000664000175000017500000000076115227365530024233 0ustar alastairalastair{ "basename": "asr-intrinsics_33-816caef", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_33.f90", "infile_hash": "e4ea9f413d213dd8fd6f6e412957737676b193db450eac1eda9f422f", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_33-816caef.stdout", "stdout_hash": "4bcdc728e4632573254f06d232275d1370b44ccdb92a3c6f11275b4e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutines_01-6bd865a.json0000664000175000017500000000075515227365530024667 0ustar alastairalastair{ "basename": "julia-subroutines_01-6bd865a", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/subroutines_01.f90", "infile_hash": "b2e2d562bcd951782b14a4d5cfe68f5ff7db528636d556aa7ea9230e", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutines_01-6bd865a.stdout", "stdout_hash": "1a10bfdbcc05571c7b053af46aa127b516726d5ebc056e1bddb222fc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-arrays_03_func-3a62608.stdout0000664000175000017500000000303115227365530024472 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } struct dimension_descriptor { int32_t lower_bound, length, stride; }; struct i32_10_1 { Kokkos::View* data; dimension_descriptor dims[1]; bool is_allocated; i32_10_1(Kokkos::View* data_): data{data_} {}; }; // Forward declarations namespace { template int32_t mysum(T0* a); } // Implementations namespace { template int32_t mysum(T0* a) { int32_t i; int32_t r; r = 0; for (i=1; i<=a->data->extent(0); i++) { r = r + a->data->operator[](i - a->dims[0].lower_bound); } return r; } void main2() { int32_t i; int32_t s; Kokkos::View x_data("x_data", 10); i32_10_1 x_value(&x_data); i32_10_1* x = &x_value; x->dims[0].lower_bound = 1; x->dims[0].length = 10; for (i=1; i<=x->data->extent(0); i++) { x->data->operator[](i - x->dims[0].lower_bound) = i; } s = mysum(x); std::cout << s << std::endl; if (s != 55) { std::cerr << "ERROR STOP" << std::endl; exit(1); } } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/asr-string_04-2ebc0e6.json0000664000175000017500000000074515227365530023345 0ustar alastairalastair{ "basename": "asr-string_04-2ebc0e6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_04.f90", "infile_hash": "5dec930fb518a93b9004858a969c334193bb0a84dcadc023b57d5c10", "outfile": null, "outfile_hash": null, "stdout": "asr-string_04-2ebc0e6.stdout", "stdout_hash": "95221fc57135ca834d2a5bb011d0726f77374554fb408339a06aae7b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/tokens-expr7-bf90751.json0000664000175000017500000000071515227365530023163 0ustar alastairalastair{ "basename": "tokens-expr7-bf90751", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/expr7.f90", "infile_hash": "9b01fedf331316b08b35441cb9f4cb6f7808edd93b29c70e1caeea03", "outfile": null, "outfile_hash": null, "stdout": "tokens-expr7-bf90751.stdout", "stdout_hash": "5e07b110d4feed247c9fb163c38f17f1ed469bcc3eb61a8302ac4826", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-case_04-42ea8ac.stdout0000664000175000017500000000027715227365530024004 0ustar alastairalastairprogram case_04 implicit none integer :: i i = 4 select case (i) case (1) print *, "1" case (2, 3:5, 6, 8:10) print *, "2,3:5,6,8:10" end select end program case_04 lfortran-0.64.0/tests/reference/ast-format_03-c54e532.stdout0000664000175000017500000000060115227365530023534 0ustar alastairalastair(TranslationUnit [(Program format_03 () [] [] [] [(Format 1000 "/' --- PROBLEM SIZE:'/' N = ',i5,' (NUMBER WITH NONZERO WEIGHT = ',i5,')'/' NQ = ',i5/' M = ',i5/' NP = ',i5,' (NUMBER UNFIXED = ',i5,')'" () )] [] )] ) lfortran-0.64.0/tests/reference/ast-expr2-52dd466.json0000664000175000017500000000070415227365530022441 0ustar alastairalastair{ "basename": "ast-expr2-52dd466", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/expr2.f90", "infile_hash": "d666975e3f2e2c0cc5c739b85bb21073accdf5692bcb64c9e0278d62", "outfile": null, "outfile_hash": null, "stdout": "ast-expr2-52dd466.stdout", "stdout_hash": "7fec7d309068cf92ea67d34387514bd37ec3365d54bb020dd1682f4f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-no_main_program_1-bb6c43a.stderr0000664000175000017500000000017315227365530025465 0ustar alastairalastairsemantic error: no main program found; cannot build an executable. To compile this file as a library, use the `-c` option. lfortran-0.64.0/tests/reference/asr-private2-d3a4771.json0000664000175000017500000000072415227365530023131 0ustar alastairalastair{ "basename": "asr-private2-d3a4771", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/private2.f90", "infile_hash": "34984962bf015cefb96abba7000799bbabd4618eb80e4484fb5ca4bd", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-private2-d3a4771.stderr", "stderr_hash": "98341ad40f302acd14f7188319321a9b5a620c529f9ce700ff28c1a3", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-functions_41-1e43fd0.json0000664000175000017500000000075615227365530023774 0ustar alastairalastair{ "basename": "ast-functions_41-1e43fd0", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_41.f90", "infile_hash": "85251751a2389037443a86b523b90e5db508759f889cdf5413aab330", "outfile": null, "outfile_hash": null, "stdout": "ast-functions_41-1e43fd0.stdout", "stdout_hash": "f35d6094905818061debe81c3afcc9d2fe65e2c68b6e559c180c31ce", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-subroutines_02-83f1d9f.stdout0000664000175000017500000002765415227365530025123 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @16 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @17 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc13 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %j = alloca i32, align 4 store i32 1, i32* %i, align 4 store i32 1, i32* %j, align 4 call void @f(i32* %i, i32* %j) %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i, i32* %j) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry %14 = load i32, i32* %i, align 4 %15 = icmp ne i32 %14, 1 br i1 %15, label %then, label %else then: ; preds = %free_done call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %free_done br label %ifcont ifcont: ; preds = %else, %then %16 = load i32, i32* %j, align 4 %17 = icmp ne i32 %16, 2 br i1 %17, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 call void @g(i32* %i, i32* %j) %18 = alloca i64, align 8 %19 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info.1, i32 0, i32 0), i64* %18, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i, i32* %j) %20 = load i64, i64* %18, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %19, i8** %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %20, i64* %22, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %24 = load i8*, i8** %23, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %26 = load i64, i64* %25, align 8 %27 = trunc i64 %26 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %24, i32 %27, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %28 = icmp eq i8* %19, null br i1 %28, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %ifcont3 call void @_lfortran_free_alloc(i8* %2, i8* %19) br label %free_done6 free_done6: ; preds = %free_nonnull5, %ifcont3 %29 = load i32, i32* %i, align 4 %30 = icmp ne i32 %29, 1 br i1 %30, label %then7, label %else8 then7: ; preds = %free_done6 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont9 else8: ; preds = %free_done6 br label %ifcont9 ifcont9: ; preds = %else8, %then7 %31 = load i32, i32* %j, align 4 %32 = icmp ne i32 %31, 0 br i1 %32, label %then10, label %else11 then10: ; preds = %ifcont9 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont12 else11: ; preds = %ifcont9 br label %ifcont12 ifcont12: ; preds = %else11, %then10 call void @h(i32* %i, i32* %j) %33 = alloca i64, align 8 %34 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info.2, i32 0, i32 0), i64* %33, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %i, i32* %j) %35 = load i64, i64* %33, align 8 %36 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 store i8* %34, i8** %36, align 8 %37 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 store i64 %35, i64* %37, align 8 %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 %39 = load i8*, i8** %38, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 %41 = load i64, i64* %40, align 8 %42 = trunc i64 %41 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %39, i32 %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %43 = icmp eq i8* %34, null br i1 %43, label %free_done15, label %free_nonnull14 free_nonnull14: ; preds = %ifcont12 call void @_lfortran_free_alloc(i8* %2, i8* %34) br label %free_done15 free_done15: ; preds = %free_nonnull14, %ifcont12 %44 = load i32, i32* %i, align 4 %45 = icmp ne i32 %44, 1 br i1 %45, label %then16, label %else17 then16: ; preds = %free_done15 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont18 else17: ; preds = %free_done15 br label %ifcont18 ifcont18: ; preds = %else17, %then16 %46 = load i32, i32* %j, align 4 %47 = icmp ne i32 %46, 0 br i1 %47, label %then19, label %else20 then19: ; preds = %ifcont18 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @16, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont21 else20: ; preds = %ifcont18 br label %ifcont21 ifcont21: ; preds = %else20, %then19 br label %return return: ; preds = %ifcont21 br label %FINALIZE_SYMTABLE_subroutines_02 FINALIZE_SYMTABLE_subroutines_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } define void @f(i32* %a, i32* %b) { .entry: %0 = load i32, i32* %a, align 4 %1 = add i32 %0, 1 store i32 %1, i32* %b, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_f FINALIZE_SYMTABLE_f: ; preds = %return ret void } define void @g(i32* %a, i32* %b) { .entry: %0 = load i32, i32* %a, align 4 %1 = sub i32 %0, 1 store i32 %1, i32* %b, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_g FINALIZE_SYMTABLE_g: ; preds = %return ret void } define void @h(i32* %a, i32* %b) { .entry: call void @g(i32* %a, i32* %b) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_h FINALIZE_SYMTABLE_h: ; preds = %return ret void } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/asr-array_bound_1-b0c2255.stdout0000664000175000017500000003746315227365530024475 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array_bound_1: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal)) ((IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Integer 4) [((IntegerConstant 6 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array_bound_1 [] [(Print (StringFormat () [(ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 2 (Integer 4) Decimal) ) (ArrayBound (Var 2 a) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 3 (Integer 4) Decimal) ) (ArrayBound (Var 2 a) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 5 (Integer 4) Decimal) ) (ArrayBound (Var 2 a) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 9 (Integer 4) Decimal) ) (ArrayBound (Var 2 a) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 7 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 2 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 3 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 2 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 4 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 6 (Integer 4) Decimal) ) (ArrayBound (Var 2 b) (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 7 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 6 (Integer 4) Decimal) ) (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 c) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 10 (Integer 4) Decimal) ) (ArrayBound (Var 2 c) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 7 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 d) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound (IntegerConstant 1 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(ArrayBound (Var 2 d) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound (IntegerConstant 4 (Integer 4) Decimal) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-document_symbols1-8238851.stdout0000664000175000017500000000404415227365530025264 0ustar alastairalastair[{"kind":2,"location":{"range":{"start":{"character":1,"line":1},"end":{"character":14,"line":2}},"uri":"uri"},"name":"add","filename":"tests/document_symbols1.f90"},{"kind":0,"location":{"range":{"start":{"character":1,"line":4},"end":{"character":11,"line":12}},"uri":"uri"},"name":"document_symbols1","filename":"tests/document_symbols1.f90"},{"kind":5,"location":{"range":{"start":{"character":1,"line":5},"end":{"character":14,"line":7}},"uri":"uri"},"name":"sub","filename":"tests/document_symbols1_module.f90"},{"kind":5,"location":{"range":{"start":{"character":1,"line":8},"end":{"character":14,"line":10}},"uri":"uri"},"name":"sub2","filename":"tests/document_symbols1_module.f90"},{"kind":9,"location":{"range":{"start":{"character":12,"line":7},"end":{"character":12,"line":7}},"uri":"uri"},"name":"x","filename":"tests/document_symbols1.f90"},{"kind":5,"location":{"range":{"start":{"character":16,"line":3},"end":{"character":17,"line":3}},"uri":"uri"},"name":"xy","filename":"tests/document_symbols1_module.f90"},{"kind":5,"location":{"range":{"start":{"character":20,"line":3},"end":{"character":21,"line":3}},"uri":"uri"},"name":"yz","filename":"tests/document_symbols1_module.f90"},{"kind":1,"location":{"range":{"start":{"character":1,"line":1},"end":{"character":35,"line":11}},"uri":"uri"},"name":"module_document_symbols1","filename":"tests/document_symbols1_module.f90"},{"kind":2,"location":{"range":{"start":{"character":1,"line":5},"end":{"character":14,"line":7}},"uri":"uri"},"name":"sub","filename":"tests/document_symbols1_module.f90"},{"kind":2,"location":{"range":{"start":{"character":1,"line":8},"end":{"character":14,"line":10}},"uri":"uri"},"name":"sub2","filename":"tests/document_symbols1_module.f90"},{"kind":9,"location":{"range":{"start":{"character":16,"line":3},"end":{"character":17,"line":3}},"uri":"uri"},"name":"xy","filename":"tests/document_symbols1_module.f90"},{"kind":9,"location":{"range":{"start":{"character":20,"line":3},"end":{"character":21,"line":3}},"uri":"uri"},"name":"yz","filename":"tests/document_symbols1_module.f90"}]lfortran-0.64.0/tests/reference/llvm-array2-4254183.json0000664000175000017500000000071215227365530022617 0ustar alastairalastair{ "basename": "llvm-array2-4254183", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/array2.f90", "infile_hash": "ec67f153c5f506f6a12ef94b06d43c7e9e86b9fc33c9c196029183f0", "outfile": null, "outfile_hash": null, "stdout": "llvm-array2-4254183.stdout", "stdout_hash": "f6bfd3d9f72c380281aea1dd07d1faf276bef83283d8a862f3142bc3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-complex_01-075c0b7.stderr0000664000175000017500000000034115227365530023666 0ustar alastairalastairsemantic error: The first argument of `cmplx` intrinsic is of complex type, the second argument in this case must be absent --> tests/errors/complex_01.f90:4:14 | 4 | print *, cmplx(z, 1) | ^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-incompatible_dimension_assignment_arr2-3867783.stderr0000664000175000017500000000026415227365530031476 0ustar alastairalastairsemantic error: Different shape for array assignment on dimension 3(1 and 2) --> tests/errors/incompatible_dimension_assignment_arr2.f90:10:5 | 10 | y = x | ^^^^^ lfortran-0.64.0/tests/reference/asr-modules_33-b589c22.json0000664000175000017500000000075015227365530023355 0ustar alastairalastair{ "basename": "asr-modules_33-b589c22", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_33.f90", "infile_hash": "223a997e090d900f7598fe1697a4edf3ea8e14342db03379fb7e7112", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_33-b589c22.stdout", "stdout_hash": "0d60eddac767c33e32d3c5ff7d0a10c1b68993c9b97ffe9fe7f3a3df", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit9-5318b32.json0000664000175000017500000000072015227365530023211 0ustar alastairalastair{ "basename": "asr-implicit9-5318b32", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/implicit9.f90", "infile_hash": "8821b0b62f5857553eb0efe35ab8190a8b1c4fe82e623f1dae4e81b3", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit9-5318b32.stderr", "stderr_hash": "2537e65ee73bce5d64169c321e19ee4f107be96cc008abc67335b07e", "returncode": 2 }lfortran-0.64.0/tests/reference/rename_symbol-collect_occurence2-a095a33.stdout0000664000175000017500000000135315227365530027544 0ustar alastairalastair[{"kind":2,"location":{"range":{"start":{"character":10,"line":7},"end":{"character":15,"line":7}},"uri":"uri"},"name":"xyz"},{"kind":2,"location":{"range":{"start":{"character":15,"line":1},"end":{"character":18,"line":1}},"uri":"uri"},"name":"xyz"},{"kind":2,"location":{"range":{"start":{"character":14,"line":4},"end":{"character":17,"line":4}},"uri":"uri"},"name":"xyz"},{"kind":9,"location":{"range":{"start":{"character":1,"line":1},"end":{"character":17,"line":4}},"uri":"uri"},"name":"xyz"},{"kind":9,"location":{"range":{"start":{"character":1,"line":3},"end":{"character":4,"line":3}},"uri":"uri"},"name":"xyz"},{"kind":9,"location":{"range":{"start":{"character":1,"line":1},"end":{"character":17,"line":4}},"uri":"uri"},"name":"xyz"}]lfortran-0.64.0/tests/reference/ast-subroutines_04-cc5f6a4.json0000664000175000017500000000076415227365530024431 0ustar alastairalastair{ "basename": "ast-subroutines_04-cc5f6a4", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_04.f90", "infile_hash": "c7f14f3cfe8c42ebbf006f4e20a30b517c9e2775e5af0f8853ae05e1", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutines_04-cc5f6a4.stdout", "stdout_hash": "8167f4e8be92666208a33f67fc50e8bf10a53e0da6c50a8a004d2540", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor23-be2fde1.json0000664000175000017500000000077315227365530026757 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor23-be2fde1", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor23.f90", "infile_hash": "7be1954fe331289e200dde2e15533fbe94d7b452659193624553acda", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor23-be2fde1.stdout", "stdout_hash": "58cadffe0dc6293b5ef494c44a9229437a51e87e09cdfa2995ce95c8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_03-6afb845.json0000664000175000017500000000075315227365530023601 0ustar alastairalastair{ "basename": "asr-template_03-6afb845", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_03.f90", "infile_hash": "58b6ec4d6cf448b1aabceb4447e834d0d2e8f5a98058e37b48e86976", "outfile": null, "outfile_hash": null, "stdout": "asr-template_03-6afb845.stdout", "stdout_hash": "3a79b9eef88b1dd60f18c37388bbdc8dc3a3074e96423e8ebfbae23a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-nullify_02-1c6befe.json0000664000175000017500000000075015227365530023602 0ustar alastairalastair{ "basename": "ast-nullify_02-1c6befe", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nullify_02.f90", "infile_hash": "8603bbfc07290d14f0828e12a8b04c3521c007c844a4c901b4bb7483", "outfile": null, "outfile_hash": null, "stdout": "ast-nullify_02-1c6befe.stdout", "stdout_hash": "c34ed265adbd8eec2c077ab39fec677bcdf6a74575ee04339cd7ad87", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_openmp-openmp1-3056a3e.stdout0000664000175000017500000002343615227365530024704 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { increment_ctr: (Function (SymbolTable 2 { ctr: (Variable 2 ctr [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), local_ctr: (Variable 2 local_ctr [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) increment_ctr (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 n) (Var 2 ctr)] [(OMPRegion Parallel [(OMPPrivate [(Var 2 i)] ) (OMPReduction ReduceAdd [(Var 2 local_ctr)] )] [(OMPRegion Do [] [(DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 2 n) ()) [(Assignment (Var 2 local_ctr) (IntegerBinOp (Var 2 local_ctr) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] [] )] )] ) (Assignment (Var 2 ctr) (IntegerBinOp (Var 2 ctr) Add (Var 2 local_ctr) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ), openmp1: (Program (SymbolTable 3 { ctr: (Variable 3 ctr [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] Local (IntegerConstant 1000000 (Integer 4) Decimal) (IntegerConstant 1000000 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) openmp1 [] [(Assignment (Var 3 ctr) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (SubroutineCall 1 increment_ctr () [((Var 3 n)) ((Var 3 ctr))] () .false. ) (Print (StringFormat () [(Var 3 ctr)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-array_size_01-cdffaed.json0000664000175000017500000000074315227365530024430 0ustar alastairalastair{ "basename": "asr-array_size_01-cdffaed", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_size_01.f90", "infile_hash": "30589552e7b01a1e8ea7af0d40250a71b6da5ada13521c8a222d7e14", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_size_01-cdffaed.stderr", "stderr_hash": "87b541207ac6c6cd8813ae288cb7710355a4248161837047820cd9fd", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-array4-3d07222.json0000664000175000017500000000070715227365530022513 0ustar alastairalastair{ "basename": "ast-array4-3d07222", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array4.f90", "infile_hash": "b2300c4e8589cce700b9cd43cbfb88576774e3262afa4c469c09b7d0", "outfile": null, "outfile_hash": null, "stdout": "ast-array4-3d07222.stdout", "stdout_hash": "b434ad8e2b33453b08d82ba52bc74d109ae1a42aa1a7b8ee06550ca0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-program_04-4e711d5.stdout0000664000175000017500000000011515227365530024372 0ustar alastairalastairprogram __xx_main implicit none print *, "hello world" end program __xx_main lfortran-0.64.0/tests/reference/asr-template_commutative-45a3ac0.stdout0000664000175000017500000041333015227365530026245 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_commutative_m: (Module (SymbolTable 2 { alt_commutative_prop: (Template (SymbolTable 10 { bin: (Function (SymbolTable 11 { bin: (Variable 11 bin [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 11 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 11 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bin (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 11 x) (Var 11 y)] [] (Var 11 bin) Public .true. .true. () ), commutative_p: (Function (SymbolTable 13 { prop: (Variable 13 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 13 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 13 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) commutative_p (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [bin equal] [(Var 13 x) (Var 13 y)] [(Assignment (Var 13 prop) (OverloadedCompare (FunctionCall 10 bin () [((Var 13 x)) ((Var 13 y))] (Integer 4) () () ) Eq (FunctionCall 10 bin () [((Var 13 y)) ((Var 13 x))] (Integer 4) () () ) (Logical 4) () (FunctionCall 10 equal 10 ~eq [((FunctionCall 10 bin () [((Var 13 x)) ((Var 13 y))] (Integer 4) () () )) ((FunctionCall 10 bin () [((Var 13 y)) ((Var 13 x))] (Integer 4) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 13 prop) Public .true. .true. () ), equal: (Function (SymbolTable 12 { equal: (Variable 12 equal [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 12 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 12 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) equal (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 12 x) (Var 12 y)] [] (Var 12 equal) Public .true. .true. () ), integer: (Variable 10 integer [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~eq: (CustomOperator 10 ~eq [10 equal] Public ) }) alt_commutative_prop [bin equal] [(Require magma_r [integer bin equal] )] ), commutative_prop: (Template (SymbolTable 6 { bin: (Function (SymbolTable 7 { bin: (Variable 7 bin [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 7 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bin (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 7 x) (Var 7 y)] [] (Var 7 bin) Public .true. .true. () ), commutative_p: (Function (SymbolTable 9 { prop: (Variable 9 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 9 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 9 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) commutative_p (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [bin equal] [(Var 9 x) (Var 9 y)] [(Assignment (Var 9 prop) (OverloadedCompare (FunctionCall 6 bin () [((Var 9 x)) ((Var 9 y))] (TypeParameter t ) () () ) Eq (FunctionCall 6 bin () [((Var 9 y)) ((Var 9 x))] (TypeParameter t ) () () ) (Logical 4) () (FunctionCall 6 equal 6 ~eq [((FunctionCall 6 bin () [((Var 9 x)) ((Var 9 y))] (TypeParameter t ) () () )) ((FunctionCall 6 bin () [((Var 9 y)) ((Var 9 x))] (TypeParameter t ) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 9 prop) Public .true. .true. () ), equal: (Function (SymbolTable 8 { equal: (Variable 8 equal [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 8 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) equal (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 8 x) (Var 8 y)] [] (Var 8 equal) Public .true. .true. () ), t: (Variable 6 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~eq: (CustomOperator 6 ~eq [6 equal] Public ) }) commutative_prop [t bin equal] [(Require magma_r [t bin equal] )] ), magma_r: (Requirement (SymbolTable 3 { bin: (Function (SymbolTable 4 { bin: (Variable 4 bin [] ReturnVar () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) bin (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 4 x) (Var 4 y)] [] (Var 4 bin) Public .true. .true. () ), equal: (Function (SymbolTable 5 { equal: (Variable 5 equal [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) equal (FunctionType [(TypeParameter t ) (TypeParameter t )] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 5 x) (Var 5 y)] [] (Var 5 equal) Public .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) magma_r [t bin equal] [] ) }) template_commutative_m () [template_commutative_m] .false. .false. .false. ), test_template_commutative_p: (Program (SymbolTable 14 { alt_commutative_prop: (ExternalSymbol 14 alt_commutative_prop 2 alt_commutative_prop template_commutative_m [] alt_commutative_prop Public ), commutative_prop: (ExternalSymbol 14 commutative_prop 2 commutative_prop template_commutative_m [] commutative_prop Public ), int_minus_comm: (Function (SymbolTable 21 { prop: (Variable 21 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 21 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 21 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_minus_comm (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~sub_intrinsic ~eq_intrinsic] [(Var 21 x) (Var 21 y)] [(Assignment (Var 21 prop) (OverloadedCompare (FunctionCall 14 ~sub_intrinsic () [((Var 21 x)) ((Var 21 y))] (Integer 4) () () ) Eq (FunctionCall 14 ~sub_intrinsic () [((Var 21 y)) ((Var 21 x))] (Integer 4) () () ) (Logical 4) () (FunctionCall 14 ~eq_intrinsic 6 ~eq [((FunctionCall 14 ~sub_intrinsic () [((Var 21 x)) ((Var 21 y))] (Integer 4) () () )) ((FunctionCall 14 ~sub_intrinsic () [((Var 21 y)) ((Var 21 x))] (Integer 4) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 21 prop) Public .true. .true. () ), int_plus_comm: (Function (SymbolTable 18 { prop: (Variable 18 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 18 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 18 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_plus_comm (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~add_intrinsic ~eq_intrinsic] [(Var 18 x) (Var 18 y)] [(Assignment (Var 18 prop) (OverloadedCompare (FunctionCall 14 ~add_intrinsic () [((Var 18 x)) ((Var 18 y))] (Integer 4) () () ) Eq (FunctionCall 14 ~add_intrinsic () [((Var 18 y)) ((Var 18 x))] (Integer 4) () () ) (Logical 4) () (FunctionCall 14 ~eq_intrinsic 6 ~eq [((FunctionCall 14 ~add_intrinsic () [((Var 18 x)) ((Var 18 y))] (Integer 4) () () )) ((FunctionCall 14 ~add_intrinsic () [((Var 18 y)) ((Var 18 x))] (Integer 4) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 18 prop) Public .true. .true. () ), magma_r: (ExternalSymbol 14 magma_r 2 magma_r template_commutative_m [] magma_r Public ), minus_comm: (Function (SymbolTable 20 { prop: (Variable 20 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 20 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 20 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus_comm (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~sub_intrinsic ~eq_intrinsic] [(Var 20 x) (Var 20 y)] [(Assignment (Var 20 prop) (OverloadedCompare (FunctionCall 14 ~sub_intrinsic () [((Var 20 x)) ((Var 20 y))] (Integer 4) () () ) Eq (FunctionCall 14 ~sub_intrinsic () [((Var 20 y)) ((Var 20 x))] (Integer 4) () () ) (Logical 4) () (FunctionCall 14 ~eq_intrinsic 10 ~eq [((FunctionCall 14 ~sub_intrinsic () [((Var 20 x)) ((Var 20 y))] (Integer 4) () () )) ((FunctionCall 14 ~sub_intrinsic () [((Var 20 y)) ((Var 20 x))] (Integer 4) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 20 prop) Public .true. .true. () ), plus_comm: (Function (SymbolTable 17 { prop: (Variable 17 prop [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 17 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 17 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_comm (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~add_intrinsic ~eq_intrinsic] [(Var 17 x) (Var 17 y)] [(Assignment (Var 17 prop) (OverloadedCompare (FunctionCall 14 ~add_intrinsic () [((Var 17 x)) ((Var 17 y))] (Integer 4) () () ) Eq (FunctionCall 14 ~add_intrinsic () [((Var 17 y)) ((Var 17 x))] (Integer 4) () () ) (Logical 4) () (FunctionCall 14 ~eq_intrinsic 10 ~eq [((FunctionCall 14 ~add_intrinsic () [((Var 17 x)) ((Var 17 y))] (Integer 4) () () )) ((FunctionCall 14 ~add_intrinsic () [((Var 17 y)) ((Var 17 x))] (Integer 4) () () ))] (Logical 4) () () ) ) () .false. .false. )] (Var 17 prop) Public .true. .true. () ), ~add: (CustomOperator 14 ~add [14 ~add_intrinsic] Public ), ~add_intrinsic: (Function (SymbolTable 15 { arg0: (Variable 15 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 15 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 15 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 15 arg0) (Var 15 arg1)] [(Assignment (Var 15 ret) (IntegerBinOp (Var 15 arg0) Add (Var 15 arg1) (Integer 4) () ) () .false. .false. )] (Var 15 ret) Public .true. .true. () ), ~eq: (CustomOperator 14 ~eq [14 ~eq_intrinsic] Public ), ~eq_intrinsic: (Function (SymbolTable 16 { arg0: (Variable 16 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 16 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 16 ret [] ReturnVar () () Default (Logical 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~eq_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Logical 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 16 arg0) (Var 16 arg1)] [(Assignment (Var 16 ret) (IntegerCompare (Var 16 arg0) Eq (Var 16 arg1) (Logical 4) () ) () .false. .false. )] (Var 16 ret) Public .true. .true. () ), ~sub: (CustomOperator 14 ~sub [14 ~sub_intrinsic] Public ), ~sub_intrinsic: (Function (SymbolTable 19 { arg0: (Variable 19 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 19 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 19 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~sub_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 19 arg0) (Var 19 arg1)] [(Assignment (Var 19 ret) (IntegerBinOp (Var 19 arg0) Sub (Var 19 arg1) (Integer 4) () ) () .false. .false. )] (Var 19 ret) Public .true. .true. () ) }) test_template_commutative_p [template_commutative_m] [(Print (StringConstant "test commutative" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(StringConstant "plus_comm: " (String 1 (IntegerConstant 11 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 14 plus_comm () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "int_plus_comm: " (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 14 int_plus_comm () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "minus_comm: " (String 1 (IntegerConstant 12 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 14 minus_comm () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "int_minus_comm: " (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 14 int_minus_comm () [((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form_1-3be6d43.stderr0000664000175000017500000000021015227365530024341 0ustar alastairalastairtokenizer error: Expecting terminating symbol for program --> tests/errors/fixed_form_1.f:2:7 | 2 | xinteger :: y | ^ lfortran-0.64.0/tests/reference/asr-derived_types_01-960dafe.stdout0000664000175000017500000012640115227365530025261 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { 1_y: (ExternalSymbol 1 1_y 2 y derived_types_01_m_01 [] y Public ), derived_types_01: (Program (SymbolTable 8 { 1_x_i: (ExternalSymbol 8 1_x_i 3 i derived_types_01_m_01 [x] i Public ), 1_x_r: (ExternalSymbol 8 1_x_r 3 r derived_types_01_m_01 [x] r Public ), 1_y_d: (ExternalSymbol 8 1_y_d 4 d derived_types_01_m_01 [y] d Public ), 1_z_k: (ExternalSymbol 8 1_z_k 7 k derived_types_01_m_02 [z] k Public ), 1_z_l: (ExternalSymbol 8 1_z_l 7 l derived_types_01_m_02 [z] l Public ), b: (Variable 8 b [] Local () () Default (StructType [(Real 4) (Integer 4)] [] .true. .false. ) 8 x Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 8 c [] Local () () Default (StructType [(Complex 4) (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. )] [] .true. .false. ) 8 z Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), set: (ExternalSymbol 8 set 2 set derived_types_01_m_01 [] set Public ), x: (ExternalSymbol 8 x 2 x derived_types_01_m_01 [] x Public ), z: (ExternalSymbol 8 z 6 z derived_types_01_m_02 [] z Public ) }) derived_types_01 [derived_types_01_m_02 derived_types_01_m_01] [(Assignment (StructInstanceMember (Var 8 b) 8 1_x_i (Integer 4) () ) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 8 b) 8 1_x_r (Real 4) () ) (RealConstant 3.500000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StructInstanceMember (Var 8 b) 8 1_x_i (Integer 4) () ) (StructInstanceMember (Var 8 b) 8 1_x_r (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (SubroutineCall 8 set () [((Var 8 b))] () .false. ) (Print (StringFormat () [(StructInstanceMember (Var 8 b) 8 1_x_i (Integer 4) () ) (StructInstanceMember (Var 8 b) 8 1_x_r (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_r (Real 4) () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_i (Integer 4) () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 8 c) 8 1_z_k (Complex 4) () ) (ComplexConstructor (RealConstant 2.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) (Complex 4) (ComplexConstant 2.000000 2.000000 (Complex 4) ) ) () .false. .false. ) (Print (StringFormat () [(StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_r (Real 4) () ) (StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_i (Integer 4) () ) (StructInstanceMember (Var 8 c) 8 1_z_k (Complex 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (SubroutineCall 8 set () [((StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ))] () .false. ) (Print (StringFormat () [(StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_r (Real 4) () ) (StructInstanceMember (StructInstanceMember (StructInstanceMember (Var 8 c) 8 1_z_l (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) () ) 8 1_y_d (StructType [(Real 4) (Integer 4)] [] .true. .false. ) () ) 8 1_x_i (Integer 4) () ) (StructInstanceMember (Var 8 c) 8 1_z_k (Complex 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), derived_types_01_m_01: (Module (SymbolTable 2 { set: (Function (SymbolTable 5 { 1_x_i: (ExternalSymbol 5 1_x_i 3 i derived_types_01_m_01 [x] i Public ), 1_x_r: (ExternalSymbol 5 1_x_r 3 r derived_types_01_m_01 [x] r Public ), a: (Variable 5 a [] Out () () Default (StructType [(Real 4) (Integer 4)] [] .true. .false. ) 2 x Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) set (FunctionType [(StructType [(Real 4) (Integer 4)] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 a)] [(Assignment (StructInstanceMember (Var 5 a) 5 1_x_i (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (StructInstanceMember (Var 5 a) 5 1_x_r (Real 4) () ) (RealConstant 1.500000 (Real 4) ) () .false. .false. )] () Public .true. .true. () ), x: (Struct (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 3 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) x (StructType [(Real 4) (Integer 4)] [] .true. .false. ) [] [r i] [] Source Public .false. .false. .false. [] () () [] ), y: (Struct (SymbolTable 4 { c: (Variable 4 c [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 4 d [] Local () () Default (StructType [(Real 4) (Integer 4)] [] .true. .false. ) 2 x Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) y (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) [x] [c d] [] Source Public .false. .false. .false. [] () () [] ) }) derived_types_01_m_01 () [] .false. .false. .false. ), derived_types_01_m_02: (Module (SymbolTable 6 { y: (ExternalSymbol 6 y 2 y derived_types_01_m_01 [] y Public ), z: (Struct (SymbolTable 7 { k: (Variable 7 k [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), l: (Variable 7 l [] Local () () Default (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. ) 6 y Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) z (StructType [(Complex 4) (StructType [(Complex 4) (StructType [(Real 4) (Integer 4)] [] .true. .false. )] [] .true. .false. )] [] .true. .false. ) [y] [k l] [] Source Public .false. .false. .false. [] () () [] ) }) derived_types_01_m_02 () [derived_types_01_m_01] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-class_02-b56b852.stderr0000664000175000017500000000035015227365530023333 0ustar alastairalastairwarning: Change of value in conversion from 'real(8)' to 'real(4)' --> tests/../integration_tests/class_02.f90:5:16 | 5 | real :: pi = 3.1415926535897931d0 ! Class-wide private constant | ^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-nullify_03-e2c1d62.stdout0000664000175000017500000006122715227365530024013 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { module_nullify_03: (Module (SymbolTable 2 { mxdim: (Variable 2 mxdim [] Local (IntegerConstant 3 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rp1d: (Struct (SymbolTable 3 { f: (Variable 3 f [] Local () () Default (Pointer (Array (Real 8) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) rp1d (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) [] [f] [] Source Public .false. .false. .false. [] () () [] ), sds: (Struct (SymbolTable 4 { dims: (Variable 4 dims [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 4 f [] Local () () Default (Pointer (Array (Real 8) [(() ()) (() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), hdf32: (Variable 4 hdf32 [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ndim: (Variable 4 ndim [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), scales: (Variable 4 scales [] Local () () Default (Array (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) 2 rp1d Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sds (StructType [(Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (Logical 4) (Array (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (Pointer (Array (Real 8) [(() ()) (() ()) (() ())] DescriptorArray ) )] [] .true. .false. ) [] [ndim dims hdf32 scales f] [] Source Public .false. .false. .false. [] () () [] ) }) module_nullify_03 () [] .false. .false. .false. ), nullify_03: (Program (SymbolTable 5 { 1_rp1d_f: (ExternalSymbol 5 1_rp1d_f 3 f module_nullify_03 [rp1d] f Public ), 1_sds_scales: (ExternalSymbol 5 1_sds_scales 4 scales module_nullify_03 [sds] scales Public ), rp1d: (ExternalSymbol 5 rp1d 2 rp1d module_nullify_03 [] rp1d Public ), s: (Variable 5 s [] Local () () Default (StructType [(Integer 4) (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (Logical 4) (Array (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) (Pointer (Array (Real 8) [(() ()) (() ()) (() ())] DescriptorArray ) )] [] .true. .false. ) 5 sds Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sds: (ExternalSymbol 5 sds 2 sds module_nullify_03 [] sds Public ) }) nullify_03 [module_nullify_03] [(Nullify [(StructInstanceMember (ArrayItem (StructInstanceMember (Var 5 s) 5 1_sds_scales (Array (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () ) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (StructType [(Pointer (Array (Real 8) [(() ())] DescriptorArray ) )] [] .true. .false. ) ColMajor () ) 5 1_rp1d_f (Pointer (Array (Real 8) [(() ())] DescriptorArray ) ) () )] )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-arrays_01_size-aaed99f.stdout0000664000175000017500000026662515227365530025234 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @5 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @6 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @7 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @9 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @10 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @11 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @15 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @16 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @17 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @18 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @19 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @21 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @22 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @23 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @24 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @25 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @26 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @27 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @28 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @29 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @30 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @31 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @32 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @33 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @34 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @35 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @36 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @37 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @38 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @39 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @40 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @41 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @42 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @43 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @44 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @45 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @46 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @47 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @48 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @49 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @50 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @51 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @52 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @53 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @54 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @55 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @56 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @57 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @58 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @59 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @60 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @61 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @62 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @63 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @64 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @65 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @66 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @67 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @68 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @69 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @70 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @71 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @72 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @73 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @74 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @75 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @76 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @77 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @78 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @79 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @80 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @81 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @82 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @83 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @84 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @85 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @86 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @87 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @88 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @89 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @90 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @91 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @92 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @93 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @94 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @95 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @96 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @97 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @98 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @99 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @100 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @101 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @102 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @103 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @104 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @105 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @106 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @107 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @108 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @109 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @110 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @111 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @112 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @113 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @114 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @115 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/arrays_01_size.f90\00", align 1 @116 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @117 = private unnamed_addr constant [118 x i8] c"Runtime error: Array '%s' index out of bounds. Tried to access index %d of dimension %d, but valid range is %d to %d.\00", align 1 @118 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @119 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %__do_loop_end = alloca i32, align 4 %__do_loop_end1 = alloca i32, align 4 %__do_loop_end2 = alloca i32, align 4 %a = alloca [3 x i32], align 4 %b = alloca [4 x i32], align 4 %i = alloca i32, align 4 %size_a = alloca i32, align 4 %size_b = alloca i32, align 4 store i32 3, i32* %size_a, align 4 store i32 4, i32* %size_b, align 4 %3 = load i32, i32* %size_a, align 4 %4 = icmp ne i32 %3, 3 br i1 %4, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %5 = load i32, i32* %size_b, align 4 %6 = icmp ne i32 %5, 4 br i1 %6, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %7 = load i32, i32* %size_a, align 4 store i32 %7, i32* %__do_loop_end, align 4 store i32 0, i32* %i, align 4 br label %loop.head loop.head: ; preds = %ifcont5, %ifcont3 %8 = load i32, i32* %i, align 4 %9 = add i32 %8, 1 %10 = load i32, i32* %__do_loop_end, align 4 %11 = icmp sle i32 %9, %10 br i1 %11, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %12 = load i32, i32* %i, align 4 %13 = add i32 %12, 1 store i32 %13, i32* %i, align 4 %14 = load i32, i32* %i, align 4 %15 = sext i32 %14 to i64 %16 = sub i64 %15, 1 %17 = mul i64 1, %16 %18 = add i64 0, %17 %19 = icmp slt i64 %15, 1 %20 = icmp sgt i64 %15, 3 %21 = or i1 %19, %20 br i1 %21, label %then4, label %ifcont5 then4: ; preds = %loop.body %22 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %23 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %24 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %23, i32 0, i32 0 %25 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %24, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @5, i32 0, i32 0), i8** %25, align 8 %26 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %24, i32 0, i32 1 store i32 13, i32* %26, align 4 %27 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %24, i32 0, i32 2 store i32 5, i32* %27, align 4 %28 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %24, i32 0, i32 3 store i32 13, i32* %28, align 4 %29 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %24, i32 0, i32 4 store i32 8, i32* %29, align 4 %30 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @6, i32 0, i32 0)) %31 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %22, i32 0, i32 0 %32 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %23, i32 0, i32 0 %33 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %31, i32 0, i32 2 %34 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %31, i32 0, i32 0 store i1 true, i1* %34, align 1 %35 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %31, i32 0, i32 1 store i8* %30, i8** %35, align 8 store { i8*, i32, i32, i32, i32 }* %32, { i8*, i32, i32, i32, i32 }** %33, align 8 %36 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %31, i32 0, i32 3 store i32 1, i32* %36, align 4 %37 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %22, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %37, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i64 %15, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont5: ; preds = %loop.body %38 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 %18 %39 = load i32, i32* %i, align 4 %40 = add i32 %39, 10 store i32 %40, i32* %38, align 4 br label %loop.head loop.end: ; preds = %loop.head br i1 false, label %then6, label %ifcont7 then6: ; preds = %loop.end %41 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %42 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %43 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %42, i32 0, i32 0 %44 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %43, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @9, i32 0, i32 0), i8** %44, align 8 %45 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %43, i32 0, i32 1 store i32 15, i32* %45, align 4 %46 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %43, i32 0, i32 2 store i32 5, i32* %46, align 4 %47 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %43, i32 0, i32 3 store i32 15, i32* %47, align 4 %48 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %43, i32 0, i32 4 store i32 8, i32* %48, align 4 %49 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @10, i32 0, i32 0)) %50 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %41, i32 0, i32 0 %51 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %42, i32 0, i32 0 %52 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %50, i32 0, i32 2 %53 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %50, i32 0, i32 0 store i1 true, i1* %53, align 1 %54 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %50, i32 0, i32 1 store i8* %49, i8** %54, align 8 store { i8*, i32, i32, i32, i32 }* %51, { i8*, i32, i32, i32, i32 }** %52, align 8 %55 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %50, i32 0, i32 3 store i32 1, i32* %55, align 4 %56 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %41, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %56, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i64 1, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont7: ; preds = %loop.end %57 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 0 %58 = load i32, i32* %57, align 4 %59 = icmp ne i32 %58, 11 br i1 %59, label %then8, label %else9 then8: ; preds = %ifcont7 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont10 else9: ; preds = %ifcont7 br label %ifcont10 ifcont10: ; preds = %else9, %then8 br i1 false, label %then11, label %ifcont12 then11: ; preds = %ifcont10 %60 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %61 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %62 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %61, i32 0, i32 0 %63 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %62, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @15, i32 0, i32 0), i8** %63, align 8 %64 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %62, i32 0, i32 1 store i32 16, i32* %64, align 4 %65 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %62, i32 0, i32 2 store i32 5, i32* %65, align 4 %66 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %62, i32 0, i32 3 store i32 16, i32* %66, align 4 %67 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %62, i32 0, i32 4 store i32 8, i32* %67, align 4 %68 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @16, i32 0, i32 0)) %69 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %60, i32 0, i32 0 %70 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %61, i32 0, i32 0 %71 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %69, i32 0, i32 2 %72 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %69, i32 0, i32 0 store i1 true, i1* %72, align 1 %73 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %69, i32 0, i32 1 store i8* %68, i8** %73, align 8 store { i8*, i32, i32, i32, i32 }* %70, { i8*, i32, i32, i32, i32 }** %71, align 8 %74 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %69, i32 0, i32 3 store i32 1, i32* %74, align 4 %75 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %60, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %75, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0), i64 2, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont12: ; preds = %ifcont10 %76 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 1 %77 = load i32, i32* %76, align 4 %78 = icmp ne i32 %77, 12 br i1 %78, label %then13, label %else14 then13: ; preds = %ifcont12 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @18, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %ifcont12 br label %ifcont15 ifcont15: ; preds = %else14, %then13 br i1 false, label %then16, label %ifcont17 then16: ; preds = %ifcont15 %79 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %80 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %81 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %80, i32 0, i32 0 %82 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %81, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @21, i32 0, i32 0), i8** %82, align 8 %83 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %81, i32 0, i32 1 store i32 17, i32* %83, align 4 %84 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %81, i32 0, i32 2 store i32 5, i32* %84, align 4 %85 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %81, i32 0, i32 3 store i32 17, i32* %85, align 4 %86 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %81, i32 0, i32 4 store i32 8, i32* %86, align 4 %87 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @22, i32 0, i32 0)) %88 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %79, i32 0, i32 0 %89 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %80, i32 0, i32 0 %90 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %88, i32 0, i32 2 %91 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %88, i32 0, i32 0 store i1 true, i1* %91, align 1 %92 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %88, i32 0, i32 1 store i8* %87, i8** %92, align 8 store { i8*, i32, i32, i32, i32 }* %89, { i8*, i32, i32, i32, i32 }** %90, align 8 %93 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %88, i32 0, i32 3 store i32 1, i32* %93, align 4 %94 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %79, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %94, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0), i64 3, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont17: ; preds = %ifcont15 %95 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 2 %96 = load i32, i32* %95, align 4 %97 = icmp ne i32 %96, 13 br i1 %97, label %then18, label %else19 then18: ; preds = %ifcont17 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @24, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont20 else19: ; preds = %ifcont17 br label %ifcont20 ifcont20: ; preds = %else19, %then18 %98 = load i32, i32* %size_b, align 4 %99 = add i32 10, %98 store i32 %99, i32* %__do_loop_end1, align 4 store i32 10, i32* %i, align 4 br label %loop.head21 loop.head21: ; preds = %ifcont24, %ifcont20 %100 = load i32, i32* %i, align 4 %101 = add i32 %100, 1 %102 = load i32, i32* %__do_loop_end1, align 4 %103 = icmp sle i32 %101, %102 br i1 %103, label %loop.body22, label %loop.end25 loop.body22: ; preds = %loop.head21 %104 = load i32, i32* %i, align 4 %105 = add i32 %104, 1 store i32 %105, i32* %i, align 4 %106 = load i32, i32* %i, align 4 %107 = sub i32 %106, 10 %108 = sext i32 %107 to i64 %109 = sub i64 %108, 1 %110 = mul i64 1, %109 %111 = add i64 0, %110 %112 = icmp slt i64 %108, 1 %113 = icmp sgt i64 %108, 4 %114 = or i1 %112, %113 br i1 %114, label %then23, label %ifcont24 then23: ; preds = %loop.body22 %115 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %116 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %117 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %116, i32 0, i32 0 %118 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %117, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @27, i32 0, i32 0), i8** %118, align 8 %119 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %117, i32 0, i32 1 store i32 20, i32* %119, align 4 %120 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %117, i32 0, i32 2 store i32 5, i32* %120, align 4 %121 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %117, i32 0, i32 3 store i32 20, i32* %121, align 4 %122 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %117, i32 0, i32 4 store i32 11, i32* %122, align 4 %123 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @28, i32 0, i32 0)) %124 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %115, i32 0, i32 0 %125 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %116, i32 0, i32 0 %126 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %124, i32 0, i32 2 %127 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %124, i32 0, i32 0 store i1 true, i1* %127, align 1 %128 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %124, i32 0, i32 1 store i8* %123, i8** %128, align 8 store { i8*, i32, i32, i32, i32 }* %125, { i8*, i32, i32, i32, i32 }** %126, align 8 %129 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %124, i32 0, i32 3 store i32 1, i32* %129, align 4 %130 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %115, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %130, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @26, i32 0, i32 0), i64 %108, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont24: ; preds = %loop.body22 %131 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 %111 %132 = load i32, i32* %i, align 4 store i32 %132, i32* %131, align 4 br label %loop.head21 loop.end25: ; preds = %loop.head21 br i1 false, label %then26, label %ifcont27 then26: ; preds = %loop.end25 %133 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %134 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %135 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %134, i32 0, i32 0 %136 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %135, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @31, i32 0, i32 0), i8** %136, align 8 %137 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %135, i32 0, i32 1 store i32 22, i32* %137, align 4 %138 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %135, i32 0, i32 2 store i32 5, i32* %138, align 4 %139 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %135, i32 0, i32 3 store i32 22, i32* %139, align 4 %140 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %135, i32 0, i32 4 store i32 8, i32* %140, align 4 %141 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @32, i32 0, i32 0)) %142 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %133, i32 0, i32 0 %143 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %134, i32 0, i32 0 %144 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %142, i32 0, i32 2 %145 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %142, i32 0, i32 0 store i1 true, i1* %145, align 1 %146 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %142, i32 0, i32 1 store i8* %141, i8** %146, align 8 store { i8*, i32, i32, i32, i32 }* %143, { i8*, i32, i32, i32, i32 }** %144, align 8 %147 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %142, i32 0, i32 3 store i32 1, i32* %147, align 4 %148 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %133, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %148, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @30, i32 0, i32 0), i64 1, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont27: ; preds = %loop.end25 %149 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 0 %150 = load i32, i32* %149, align 4 %151 = icmp ne i32 %150, 11 br i1 %151, label %then28, label %else29 then28: ; preds = %ifcont27 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @35, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @34, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont30 else29: ; preds = %ifcont27 br label %ifcont30 ifcont30: ; preds = %else29, %then28 br i1 false, label %then31, label %ifcont32 then31: ; preds = %ifcont30 %152 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %153 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %154 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %153, i32 0, i32 0 %155 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %154, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @37, i32 0, i32 0), i8** %155, align 8 %156 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %154, i32 0, i32 1 store i32 23, i32* %156, align 4 %157 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %154, i32 0, i32 2 store i32 5, i32* %157, align 4 %158 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %154, i32 0, i32 3 store i32 23, i32* %158, align 4 %159 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %154, i32 0, i32 4 store i32 8, i32* %159, align 4 %160 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @38, i32 0, i32 0)) %161 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %152, i32 0, i32 0 %162 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %153, i32 0, i32 0 %163 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %161, i32 0, i32 2 %164 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %161, i32 0, i32 0 store i1 true, i1* %164, align 1 %165 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %161, i32 0, i32 1 store i8* %160, i8** %165, align 8 store { i8*, i32, i32, i32, i32 }* %162, { i8*, i32, i32, i32, i32 }** %163, align 8 %166 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %161, i32 0, i32 3 store i32 1, i32* %166, align 4 %167 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %152, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %167, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @39, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @36, i32 0, i32 0), i64 2, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont32: ; preds = %ifcont30 %168 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 1 %169 = load i32, i32* %168, align 4 %170 = icmp ne i32 %169, 12 br i1 %170, label %then33, label %else34 then33: ; preds = %ifcont32 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @41, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @40, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont35 else34: ; preds = %ifcont32 br label %ifcont35 ifcont35: ; preds = %else34, %then33 br i1 false, label %then36, label %ifcont37 then36: ; preds = %ifcont35 %171 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %172 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %173 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %172, i32 0, i32 0 %174 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %173, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @43, i32 0, i32 0), i8** %174, align 8 %175 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %173, i32 0, i32 1 store i32 24, i32* %175, align 4 %176 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %173, i32 0, i32 2 store i32 5, i32* %176, align 4 %177 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %173, i32 0, i32 3 store i32 24, i32* %177, align 4 %178 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %173, i32 0, i32 4 store i32 8, i32* %178, align 4 %179 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @44, i32 0, i32 0)) %180 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %171, i32 0, i32 0 %181 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %172, i32 0, i32 0 %182 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %180, i32 0, i32 2 %183 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %180, i32 0, i32 0 store i1 true, i1* %183, align 1 %184 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %180, i32 0, i32 1 store i8* %179, i8** %184, align 8 store { i8*, i32, i32, i32, i32 }* %181, { i8*, i32, i32, i32, i32 }** %182, align 8 %185 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %180, i32 0, i32 3 store i32 1, i32* %185, align 4 %186 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %171, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %186, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @45, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @42, i32 0, i32 0), i64 3, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont37: ; preds = %ifcont35 %187 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 2 %188 = load i32, i32* %187, align 4 %189 = icmp ne i32 %188, 13 br i1 %189, label %then38, label %else39 then38: ; preds = %ifcont37 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @47, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @46, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont40 else39: ; preds = %ifcont37 br label %ifcont40 ifcont40: ; preds = %else39, %then38 br i1 false, label %then41, label %ifcont42 then41: ; preds = %ifcont40 %190 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %191 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %192 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %191, i32 0, i32 0 %193 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %192, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @49, i32 0, i32 0), i8** %193, align 8 %194 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %192, i32 0, i32 1 store i32 25, i32* %194, align 4 %195 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %192, i32 0, i32 2 store i32 5, i32* %195, align 4 %196 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %192, i32 0, i32 3 store i32 25, i32* %196, align 4 %197 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %192, i32 0, i32 4 store i32 8, i32* %197, align 4 %198 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @50, i32 0, i32 0)) %199 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %190, i32 0, i32 0 %200 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %191, i32 0, i32 0 %201 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %199, i32 0, i32 2 %202 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %199, i32 0, i32 0 store i1 true, i1* %202, align 1 %203 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %199, i32 0, i32 1 store i8* %198, i8** %203, align 8 store { i8*, i32, i32, i32, i32 }* %200, { i8*, i32, i32, i32, i32 }** %201, align 8 %204 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %199, i32 0, i32 3 store i32 1, i32* %204, align 4 %205 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %190, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %205, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @51, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @48, i32 0, i32 0), i64 4, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont42: ; preds = %ifcont40 %206 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 3 %207 = load i32, i32* %206, align 4 %208 = icmp ne i32 %207, 14 br i1 %208, label %then43, label %else44 then43: ; preds = %ifcont42 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @53, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @52, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont45 else44: ; preds = %ifcont42 br label %ifcont45 ifcont45: ; preds = %else44, %then43 %209 = load i32, i32* %size_a, align 4 store i32 %209, i32* %__do_loop_end2, align 4 store i32 0, i32* %i, align 4 br label %loop.head46 loop.head46: ; preds = %ifcont51, %ifcont45 %210 = load i32, i32* %i, align 4 %211 = add i32 %210, 1 %212 = load i32, i32* %__do_loop_end2, align 4 %213 = icmp sle i32 %211, %212 br i1 %213, label %loop.body47, label %loop.end52 loop.body47: ; preds = %loop.head46 %214 = load i32, i32* %i, align 4 %215 = add i32 %214, 1 store i32 %215, i32* %i, align 4 %216 = load i32, i32* %i, align 4 %217 = sext i32 %216 to i64 %218 = sub i64 %217, 1 %219 = mul i64 1, %218 %220 = add i64 0, %219 %221 = icmp slt i64 %217, 1 %222 = icmp sgt i64 %217, 4 %223 = or i1 %221, %222 br i1 %223, label %then48, label %ifcont49 then48: ; preds = %loop.body47 %224 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %225 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %226 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %225, i32 0, i32 0 %227 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %226, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @55, i32 0, i32 0), i8** %227, align 8 %228 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %226, i32 0, i32 1 store i32 28, i32* %228, align 4 %229 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %226, i32 0, i32 2 store i32 5, i32* %229, align 4 %230 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %226, i32 0, i32 3 store i32 28, i32* %230, align 4 %231 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %226, i32 0, i32 4 store i32 8, i32* %231, align 4 %232 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @56, i32 0, i32 0)) %233 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %224, i32 0, i32 0 %234 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %225, i32 0, i32 0 %235 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %233, i32 0, i32 2 %236 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %233, i32 0, i32 0 store i1 true, i1* %236, align 1 %237 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %233, i32 0, i32 1 store i8* %232, i8** %237, align 8 store { i8*, i32, i32, i32, i32 }* %234, { i8*, i32, i32, i32, i32 }** %235, align 8 %238 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %233, i32 0, i32 3 store i32 1, i32* %238, align 4 %239 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %224, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %239, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @57, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @54, i32 0, i32 0), i64 %217, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont49: ; preds = %loop.body47 %240 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 %220 %241 = load i32, i32* %i, align 4 %242 = sext i32 %241 to i64 %243 = sub i64 %242, 1 %244 = mul i64 1, %243 %245 = add i64 0, %244 %246 = icmp slt i64 %242, 1 %247 = icmp sgt i64 %242, 3 %248 = or i1 %246, %247 br i1 %248, label %then50, label %ifcont51 then50: ; preds = %ifcont49 %249 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %250 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %251 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %250, i32 0, i32 0 %252 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %251, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @59, i32 0, i32 0), i8** %252, align 8 %253 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %251, i32 0, i32 1 store i32 28, i32* %253, align 4 %254 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %251, i32 0, i32 2 store i32 12, i32* %254, align 4 %255 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %251, i32 0, i32 3 store i32 28, i32* %255, align 4 %256 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %251, i32 0, i32 4 store i32 15, i32* %256, align 4 %257 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @60, i32 0, i32 0)) %258 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %249, i32 0, i32 0 %259 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %250, i32 0, i32 0 %260 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %258, i32 0, i32 2 %261 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %258, i32 0, i32 0 store i1 true, i1* %261, align 1 %262 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %258, i32 0, i32 1 store i8* %257, i8** %262, align 8 store { i8*, i32, i32, i32, i32 }* %259, { i8*, i32, i32, i32, i32 }** %260, align 8 %263 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %258, i32 0, i32 3 store i32 1, i32* %263, align 4 %264 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %249, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %264, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @61, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @58, i32 0, i32 0), i64 %242, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont51: ; preds = %ifcont49 %265 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 %245 %266 = load i32, i32* %265, align 4 %267 = sub i32 %266, 10 store i32 %267, i32* %240, align 4 br label %loop.head46 loop.end52: ; preds = %loop.head46 br i1 false, label %then53, label %ifcont54 then53: ; preds = %loop.end52 %268 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %269 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %270 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %269, i32 0, i32 0 %271 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %270, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @63, i32 0, i32 0), i8** %271, align 8 %272 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %270, i32 0, i32 1 store i32 30, i32* %272, align 4 %273 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %270, i32 0, i32 2 store i32 5, i32* %273, align 4 %274 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %270, i32 0, i32 3 store i32 30, i32* %274, align 4 %275 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %270, i32 0, i32 4 store i32 8, i32* %275, align 4 %276 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @64, i32 0, i32 0)) %277 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %268, i32 0, i32 0 %278 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %269, i32 0, i32 0 %279 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %277, i32 0, i32 2 %280 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %277, i32 0, i32 0 store i1 true, i1* %280, align 1 %281 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %277, i32 0, i32 1 store i8* %276, i8** %281, align 8 store { i8*, i32, i32, i32, i32 }* %278, { i8*, i32, i32, i32, i32 }** %279, align 8 %282 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %277, i32 0, i32 3 store i32 1, i32* %282, align 4 %283 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %268, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %283, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @65, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @62, i32 0, i32 0), i64 1, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont54: ; preds = %loop.end52 %284 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 0 %285 = load i32, i32* %284, align 4 %286 = icmp ne i32 %285, 1 br i1 %286, label %then55, label %else56 then55: ; preds = %ifcont54 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @67, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @66, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont57 else56: ; preds = %ifcont54 br label %ifcont57 ifcont57: ; preds = %else56, %then55 br i1 false, label %then58, label %ifcont59 then58: ; preds = %ifcont57 %287 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %288 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %289 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %288, i32 0, i32 0 %290 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %289, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @69, i32 0, i32 0), i8** %290, align 8 %291 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %289, i32 0, i32 1 store i32 31, i32* %291, align 4 %292 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %289, i32 0, i32 2 store i32 5, i32* %292, align 4 %293 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %289, i32 0, i32 3 store i32 31, i32* %293, align 4 %294 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %289, i32 0, i32 4 store i32 8, i32* %294, align 4 %295 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @70, i32 0, i32 0)) %296 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %287, i32 0, i32 0 %297 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %288, i32 0, i32 0 %298 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %296, i32 0, i32 2 %299 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %296, i32 0, i32 0 store i1 true, i1* %299, align 1 %300 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %296, i32 0, i32 1 store i8* %295, i8** %300, align 8 store { i8*, i32, i32, i32, i32 }* %297, { i8*, i32, i32, i32, i32 }** %298, align 8 %301 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %296, i32 0, i32 3 store i32 1, i32* %301, align 4 %302 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %287, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %302, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @71, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @68, i32 0, i32 0), i64 2, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont59: ; preds = %ifcont57 %303 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 1 %304 = load i32, i32* %303, align 4 %305 = icmp ne i32 %304, 2 br i1 %305, label %then60, label %else61 then60: ; preds = %ifcont59 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @73, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @72, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont62 else61: ; preds = %ifcont59 br label %ifcont62 ifcont62: ; preds = %else61, %then60 br i1 false, label %then63, label %ifcont64 then63: ; preds = %ifcont62 %306 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %307 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %308 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %307, i32 0, i32 0 %309 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %308, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @75, i32 0, i32 0), i8** %309, align 8 %310 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %308, i32 0, i32 1 store i32 32, i32* %310, align 4 %311 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %308, i32 0, i32 2 store i32 5, i32* %311, align 4 %312 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %308, i32 0, i32 3 store i32 32, i32* %312, align 4 %313 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %308, i32 0, i32 4 store i32 8, i32* %313, align 4 %314 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @76, i32 0, i32 0)) %315 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %306, i32 0, i32 0 %316 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %307, i32 0, i32 0 %317 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %315, i32 0, i32 2 %318 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %315, i32 0, i32 0 store i1 true, i1* %318, align 1 %319 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %315, i32 0, i32 1 store i8* %314, i8** %319, align 8 store { i8*, i32, i32, i32, i32 }* %316, { i8*, i32, i32, i32, i32 }** %317, align 8 %320 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %315, i32 0, i32 3 store i32 1, i32* %320, align 4 %321 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %306, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %321, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @77, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @74, i32 0, i32 0), i64 3, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont64: ; preds = %ifcont62 %322 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 2 %323 = load i32, i32* %322, align 4 %324 = icmp ne i32 %323, 3 br i1 %324, label %then65, label %else66 then65: ; preds = %ifcont64 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @79, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @78, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont67 else66: ; preds = %ifcont64 br label %ifcont67 ifcont67: ; preds = %else66, %then65 br i1 false, label %then68, label %ifcont69 then68: ; preds = %ifcont67 %325 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %326 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %327 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %326, i32 0, i32 0 %328 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %327, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @81, i32 0, i32 0), i8** %328, align 8 %329 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %327, i32 0, i32 1 store i32 34, i32* %329, align 4 %330 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %327, i32 0, i32 2 store i32 1, i32* %330, align 4 %331 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %327, i32 0, i32 3 store i32 34, i32* %331, align 4 %332 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %327, i32 0, i32 4 store i32 4, i32* %332, align 4 %333 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @82, i32 0, i32 0)) %334 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %325, i32 0, i32 0 %335 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %326, i32 0, i32 0 %336 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %334, i32 0, i32 2 %337 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %334, i32 0, i32 0 store i1 true, i1* %337, align 1 %338 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %334, i32 0, i32 1 store i8* %333, i8** %338, align 8 store { i8*, i32, i32, i32, i32 }* %335, { i8*, i32, i32, i32, i32 }** %336, align 8 %339 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %334, i32 0, i32 3 store i32 1, i32* %339, align 4 %340 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %325, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %340, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @83, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @80, i32 0, i32 0), i64 4, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont69: ; preds = %ifcont67 %341 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 3 br i1 false, label %then70, label %ifcont71 then70: ; preds = %ifcont69 %342 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %343 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %344 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %343, i32 0, i32 0 %345 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %344, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @85, i32 0, i32 0), i8** %345, align 8 %346 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %344, i32 0, i32 1 store i32 34, i32* %346, align 4 %347 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %344, i32 0, i32 2 store i32 8, i32* %347, align 4 %348 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %344, i32 0, i32 3 store i32 34, i32* %348, align 4 %349 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %344, i32 0, i32 4 store i32 11, i32* %349, align 4 %350 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @86, i32 0, i32 0)) %351 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %342, i32 0, i32 0 %352 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %343, i32 0, i32 0 %353 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %351, i32 0, i32 2 %354 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %351, i32 0, i32 0 store i1 true, i1* %354, align 1 %355 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %351, i32 0, i32 1 store i8* %350, i8** %355, align 8 store { i8*, i32, i32, i32, i32 }* %352, { i8*, i32, i32, i32, i32 }** %353, align 8 %356 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %351, i32 0, i32 3 store i32 1, i32* %356, align 4 %357 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %342, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %357, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @87, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @84, i32 0, i32 0), i64 1, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont71: ; preds = %ifcont69 %358 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 0 %359 = load i32, i32* %358, align 4 br i1 false, label %then72, label %ifcont73 then72: ; preds = %ifcont71 %360 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %361 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %362 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %361, i32 0, i32 0 %363 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %362, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @89, i32 0, i32 0), i8** %363, align 8 %364 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %362, i32 0, i32 1 store i32 34, i32* %364, align 4 %365 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %362, i32 0, i32 2 store i32 13, i32* %365, align 4 %366 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %362, i32 0, i32 3 store i32 34, i32* %366, align 4 %367 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %362, i32 0, i32 4 store i32 16, i32* %367, align 4 %368 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @90, i32 0, i32 0)) %369 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %360, i32 0, i32 0 %370 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %361, i32 0, i32 0 %371 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %369, i32 0, i32 2 %372 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %369, i32 0, i32 0 store i1 true, i1* %372, align 1 %373 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %369, i32 0, i32 1 store i8* %368, i8** %373, align 8 store { i8*, i32, i32, i32, i32 }* %370, { i8*, i32, i32, i32, i32 }** %371, align 8 %374 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %369, i32 0, i32 3 store i32 1, i32* %374, align 4 %375 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %360, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %375, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @91, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @88, i32 0, i32 0), i64 2, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont73: ; preds = %ifcont71 %376 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 1 %377 = load i32, i32* %376, align 4 %378 = add i32 %359, %377 br i1 false, label %then74, label %ifcont75 then74: ; preds = %ifcont73 %379 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %380 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %381 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %380, i32 0, i32 0 %382 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %381, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @93, i32 0, i32 0), i8** %382, align 8 %383 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %381, i32 0, i32 1 store i32 34, i32* %383, align 4 %384 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %381, i32 0, i32 2 store i32 18, i32* %384, align 4 %385 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %381, i32 0, i32 3 store i32 34, i32* %385, align 4 %386 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %381, i32 0, i32 4 store i32 21, i32* %386, align 4 %387 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @94, i32 0, i32 0)) %388 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %379, i32 0, i32 0 %389 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %380, i32 0, i32 0 %390 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %388, i32 0, i32 2 %391 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %388, i32 0, i32 0 store i1 true, i1* %391, align 1 %392 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %388, i32 0, i32 1 store i8* %387, i8** %392, align 8 store { i8*, i32, i32, i32, i32 }* %389, { i8*, i32, i32, i32, i32 }** %390, align 8 %393 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %388, i32 0, i32 3 store i32 1, i32* %393, align 4 %394 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %379, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %394, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @95, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @92, i32 0, i32 0), i64 3, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont75: ; preds = %ifcont73 %395 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 2 %396 = load i32, i32* %395, align 4 %397 = add i32 %378, %396 br i1 false, label %then76, label %ifcont77 then76: ; preds = %ifcont75 %398 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %399 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %400 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %399, i32 0, i32 0 %401 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %400, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @97, i32 0, i32 0), i8** %401, align 8 %402 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %400, i32 0, i32 1 store i32 34, i32* %402, align 4 %403 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %400, i32 0, i32 2 store i32 23, i32* %403, align 4 %404 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %400, i32 0, i32 3 store i32 34, i32* %404, align 4 %405 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %400, i32 0, i32 4 store i32 26, i32* %405, align 4 %406 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @98, i32 0, i32 0)) %407 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %398, i32 0, i32 0 %408 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %399, i32 0, i32 0 %409 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %407, i32 0, i32 2 %410 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %407, i32 0, i32 0 store i1 true, i1* %410, align 1 %411 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %407, i32 0, i32 1 store i8* %406, i8** %411, align 8 store { i8*, i32, i32, i32, i32 }* %408, { i8*, i32, i32, i32, i32 }** %409, align 8 %412 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %407, i32 0, i32 3 store i32 1, i32* %412, align 4 %413 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %398, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %413, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @99, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @96, i32 0, i32 0), i64 1, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont77: ; preds = %ifcont75 %414 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 0 %415 = load i32, i32* %414, align 4 %416 = add i32 %397, %415 store i32 %416, i32* %341, align 4 br i1 false, label %then78, label %ifcont79 then78: ; preds = %ifcont77 %417 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %418 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %419 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %418, i32 0, i32 0 %420 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %419, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @101, i32 0, i32 0), i8** %420, align 8 %421 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %419, i32 0, i32 1 store i32 35, i32* %421, align 4 %422 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %419, i32 0, i32 2 store i32 5, i32* %422, align 4 %423 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %419, i32 0, i32 3 store i32 35, i32* %423, align 4 %424 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %419, i32 0, i32 4 store i32 8, i32* %424, align 4 %425 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @102, i32 0, i32 0)) %426 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %417, i32 0, i32 0 %427 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %418, i32 0, i32 0 %428 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %426, i32 0, i32 2 %429 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %426, i32 0, i32 0 store i1 true, i1* %429, align 1 %430 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %426, i32 0, i32 1 store i8* %425, i8** %430, align 8 store { i8*, i32, i32, i32, i32 }* %427, { i8*, i32, i32, i32, i32 }** %428, align 8 %431 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %426, i32 0, i32 3 store i32 1, i32* %431, align 4 %432 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %417, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %432, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @103, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @100, i32 0, i32 0), i64 4, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont79: ; preds = %ifcont77 %433 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 3 %434 = load i32, i32* %433, align 4 %435 = icmp ne i32 %434, 17 br i1 %435, label %then80, label %else81 then80: ; preds = %ifcont79 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @105, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @104, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont82 else81: ; preds = %ifcont79 br label %ifcont82 ifcont82: ; preds = %else81, %then80 br i1 false, label %then83, label %ifcont84 then83: ; preds = %ifcont82 %436 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %437 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %438 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %437, i32 0, i32 0 %439 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %438, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @107, i32 0, i32 0), i8** %439, align 8 %440 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %438, i32 0, i32 1 store i32 37, i32* %440, align 4 %441 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %438, i32 0, i32 2 store i32 1, i32* %441, align 4 %442 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %438, i32 0, i32 3 store i32 37, i32* %442, align 4 %443 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %438, i32 0, i32 4 store i32 4, i32* %443, align 4 %444 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @108, i32 0, i32 0)) %445 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %436, i32 0, i32 0 %446 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %437, i32 0, i32 0 %447 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %445, i32 0, i32 2 %448 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %445, i32 0, i32 0 store i1 true, i1* %448, align 1 %449 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %445, i32 0, i32 1 store i8* %444, i8** %449, align 8 store { i8*, i32, i32, i32, i32 }* %446, { i8*, i32, i32, i32, i32 }** %447, align 8 %450 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %445, i32 0, i32 3 store i32 1, i32* %450, align 4 %451 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %436, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %451, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @109, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @106, i32 0, i32 0), i64 4, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont84: ; preds = %ifcont82 %452 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 3 br i1 false, label %then85, label %ifcont86 then85: ; preds = %ifcont84 %453 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %454 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %455 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %454, i32 0, i32 0 %456 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %455, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @111, i32 0, i32 0), i8** %456, align 8 %457 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %455, i32 0, i32 1 store i32 37, i32* %457, align 4 %458 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %455, i32 0, i32 2 store i32 8, i32* %458, align 4 %459 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %455, i32 0, i32 3 store i32 37, i32* %459, align 4 %460 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %455, i32 0, i32 4 store i32 11, i32* %460, align 4 %461 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @112, i32 0, i32 0)) %462 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %453, i32 0, i32 0 %463 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %454, i32 0, i32 0 %464 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %462, i32 0, i32 2 %465 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %462, i32 0, i32 0 store i1 true, i1* %465, align 1 %466 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %462, i32 0, i32 1 store i8* %461, i8** %466, align 8 store { i8*, i32, i32, i32, i32 }* %463, { i8*, i32, i32, i32, i32 }** %464, align 8 %467 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %462, i32 0, i32 3 store i32 1, i32* %467, align 4 %468 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %453, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %468, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @113, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @110, i32 0, i32 0), i64 1, i32 1, i64 1, i64 3) call void @exit(i32 1) unreachable ifcont86: ; preds = %ifcont84 %469 = getelementptr [3 x i32], [3 x i32]* %a, i32 0, i64 0 %470 = load i32, i32* %469, align 4 store i32 %470, i32* %452, align 4 br i1 false, label %then87, label %ifcont88 then87: ; preds = %ifcont86 %471 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %472 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %473 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %472, i32 0, i32 0 %474 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %473, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @115, i32 0, i32 0), i8** %474, align 8 %475 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %473, i32 0, i32 1 store i32 38, i32* %475, align 4 %476 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %473, i32 0, i32 2 store i32 5, i32* %476, align 4 %477 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %473, i32 0, i32 3 store i32 38, i32* %477, align 4 %478 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %473, i32 0, i32 4 store i32 8, i32* %478, align 4 %479 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @116, i32 0, i32 0)) %480 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %471, i32 0, i32 0 %481 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %472, i32 0, i32 0 %482 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %480, i32 0, i32 2 %483 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %480, i32 0, i32 0 store i1 true, i1* %483, align 1 %484 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %480, i32 0, i32 1 store i8* %479, i8** %484, align 8 store { i8*, i32, i32, i32, i32 }* %481, { i8*, i32, i32, i32, i32 }** %482, align 8 %485 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %480, i32 0, i32 3 store i32 1, i32* %485, align 4 %486 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %471, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %486, i32 1, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @117, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @114, i32 0, i32 0), i64 4, i32 1, i64 1, i64 4) call void @exit(i32 1) unreachable ifcont88: ; preds = %ifcont86 %487 = getelementptr [4 x i32], [4 x i32]* %b, i32 0, i64 3 %488 = load i32, i32* %487, align 4 %489 = icmp ne i32 %488, 11 br i1 %489, label %then89, label %else90 then89: ; preds = %ifcont88 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @119, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @118, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont91 else90: ; preds = %ifcont88 br label %ifcont91 ifcont91: ; preds = %else90, %then89 br label %return return: ; preds = %ifcont91 br label %FINALIZE_SYMTABLE_arrays_01 FINALIZE_SYMTABLE_arrays_01: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) lfortran-0.64.0/tests/reference/ast_f90-allocate_01-df1748d.stdout0000664000175000017500000000044715227365530024603 0ustar alastairalastairprogram hello implicit none character(len=:), allocatable :: cmd integer :: cmdlen integer :: ierr call get_command(length=cmdlen) if (cmdlen > 0) then allocate(character(cmdlen)::cmd) call get_command(cmd) print *, "hello ", cmd end if deallocate(cmd, stat=ierr) end program hello lfortran-0.64.0/tests/reference/asr-intrinsics_27-11ba39d.json0000664000175000017500000000076115227365530024145 0ustar alastairalastair{ "basename": "asr-intrinsics_27-11ba39d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/intrinsics_27.f90", "infile_hash": "c3d3a84259a133302429fa6d24bcd75b1e78346287dc4fff2cf1a51c", "outfile": null, "outfile_hash": null, "stdout": "asr-intrinsics_27-11ba39d.stdout", "stdout_hash": "0fa7d8698e57907807e0902c47be48d046c31e92d802b7ca84f31258", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-array1-3c35261.json0000664000175000017500000000070015227365530023021 0ustar alastairalastair{ "basename": "julia-array1-3c35261", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/array1.f90", "infile_hash": "74ef23b0c6d49a710e5035ce53fa6899eb51ef5e5b693d15108744ca", "outfile": null, "outfile_hash": null, "stdout": "julia-array1-3c35261.stdout", "stdout_hash": "a460fa50c8b0162a5bac418df385fdef90aa1887c86f143005893424", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-end_label-a678e8c.stdout0000664000175000017500000000243115227365530023745 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [] [(GoTo 0 () 1 [] () ) (Continue 1 () )] [] [] ) (Function h [] [(AttrType TypeInteger [] () () None )] () () () [] [] [] [] [(Assignment 0 h 0 () ) (GoTo 0 () 1 [] () ) (Continue 1 () )] [] [] ) (Subroutine g [] [] () () [] [] [] [] [(If 0 () (Logical .true. ()) [(GoTo 0 () 1 [] () ) (Continue 1 () )] [] () () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-floor_02-5b70ee6.stdout0000664000175000017500000005554315227365530023464 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { floor_02: (Program (SymbolTable 2 { a1: (Variable 2 a1 [] Local (RealConstant 3.300000 (Real 4) ) (RealConstant 3.300000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a2: (Variable 2 a2 [] Local (RealConstant 3.500000 (Real 4) ) (RealConstant 3.500000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a3: (Variable 2 a3 [] Local (RealConstant 3.700000 (Real 4) ) (RealConstant 3.700000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b1: (Variable 2 b1 [] Local (RealUnaryMinus (RealConstant 3.300000 (Real 4) ) (Real 4) (RealConstant -3.300000 (Real 4) ) ) (RealConstant -3.300000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b2: (Variable 2 b2 [] Local (RealUnaryMinus (RealConstant 3.500000 (Real 4) ) (Real 4) (RealConstant -3.500000 (Real 4) ) ) (RealConstant -3.500000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b3: (Variable 2 b3 [] Local (RealUnaryMinus (RealConstant 3.700000 (Real 4) ) (Real 4) (RealConstant -3.700000 (Real 4) ) ) (RealConstant -3.700000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x1: (Variable 2 x1 [a1] Local (IntrinsicElementalFunction Floor [(Var 2 a1)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x2: (Variable 2 x2 [a2] Local (IntrinsicElementalFunction Floor [(Var 2 a2)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x3: (Variable 2 x3 [a3] Local (IntrinsicElementalFunction Floor [(Var 2 a3)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) (IntegerConstant 3 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y1: (Variable 2 y1 [b1] Local (IntrinsicElementalFunction Floor [(Var 2 b1)] 0 (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (IntegerConstant -4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y2: (Variable 2 y2 [b2] Local (IntrinsicElementalFunction Floor [(Var 2 b2)] 0 (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (IntegerConstant -4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y3: (Variable 2 y3 [b3] Local (IntrinsicElementalFunction Floor [(Var 2 b3)] 0 (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (IntegerConstant -4 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) floor_02 [] [(If () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 x1) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) Or (IntegerCompare (Var 2 x2) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) Or (IntegerCompare (Var 2 x3) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (LogicalBinOp (LogicalBinOp (IntegerCompare (Var 2 y1) NotEq (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) Or (IntegerCompare (Var 2 y2) NotEq (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) Or (IntegerCompare (Var 2 y3) NotEq (IntegerUnaryMinus (IntegerConstant 4 (Integer 4) Decimal) (Integer 4) (IntegerConstant -4 (Integer 4) Decimal) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 x1) (Var 2 x2) (Var 2 x3)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 2 y1) (Var 2 y2) (Var 2 y3)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-kind_invalid_int_of_int-32727cf.stderr0000664000175000017500000000022615227365530026572 0ustar alastairalastairsemantic error: Kind 3 is not supported for Integer --> tests/errors/kind_invalid_int_of_int.f90:3:13 | 3 | integer(3) :: x | ^ lfortran-0.64.0/tests/reference/run-infer_realloc_disabled_01-25a8068.stderr0000664000175000017500000000036215227365530026622 0ustar alastairalastairruntime error: Array 'x' is not allocated. Allocate it manually or use the '--realloc-lhs-arrays' option to allocate it automatically. --> tests/errors/infer_realloc_disabled_01.f90:3:5 | 3 | x = [1, 2, 3] | ^ not allocated here lfortran-0.64.0/tests/reference/asr-arrays_01_logical-13e0bd7.stdout0000664000175000017500000007571715227365530025332 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_01_logical: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_01_logical [] [(Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (LogicalConstant .true. (Logical 4) ) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Logical 4) ColMajor () ) (LogicalNot (ArrayItem (Var 2 a) [(() (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Logical 4) ColMajor () ) (Logical 4) () ) () .false. .false. )] [] ) (If () (LogicalNot (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (LogicalNot (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (LogicalConstant .false. (Logical 4) ) () .false. .false. ) (DoLoop () ((Var 2 i) (IntegerConstant 12 (Integer 4) Decimal) (IntegerConstant 14 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (IntegerBinOp (Var 2 i) Sub (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) ())] (Logical 4) ColMajor () ) (LogicalNot (ArrayItem (Var 2 b) [(() (IntegerBinOp (IntegerBinOp (Var 2 i) Sub (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Logical 4) ColMajor () ) (Logical 4) () ) () .false. .false. )] [] ) (If () (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (LogicalNot (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (LogicalNot (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Logical 4) ColMajor () ) (LogicalBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Logical 4) ColMajor () ) And (LogicalConstant .false. (Logical 4) ) (Logical 4) () ) () .false. .false. )] [] ) (If () (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (LogicalBinOp (LogicalBinOp (LogicalBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) Or (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) Or (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) Or (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) () .false. .false. ) (If () (LogicalNot (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) () .false. .false. ) (If () (LogicalNot (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(DoLoop () ((Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(If () (IntegerCompare (IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Sub (IntegerBinOp (IntegerConstant 2 (Integer 4) Decimal) Mul (IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Div (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) (Integer 4) () ) (Integer 4) () ) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (ArrayItem (Var 2 c) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Logical 4) ColMajor () ) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] [(Assignment (ArrayItem (Var 2 c) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Logical 4) ColMajor () ) (LogicalConstant .false. (Logical 4) ) () .false. .false. )] )] [] )] [] ) (If () (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] ) (If () (LogicalNot (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (LogicalNot (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Logical 4) ColMajor () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-kind_invalid_int_of_complex-16f8004.stderr0000664000175000017500000000023215227365530027357 0ustar alastairalastairsemantic error: Kind 6 is not supported for Complex --> tests/errors/kind_invalid_int_of_complex.f90:3:13 | 3 | complex(6) :: x | ^ lfortran-0.64.0/tests/reference/ast_f90-subroutine4-97a10ca.json0000664000175000017500000000074115227365530024412 0ustar alastairalastair{ "basename": "ast_f90-subroutine4-97a10ca", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/subroutine4.f90", "infile_hash": "06ca8a1c322b25fe9280c43f558f6fa92e1a4843b6f6b77e206fdf4e", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-subroutine4-97a10ca.stdout", "stdout_hash": "7365a34e3119440421689d70b57349810f249c0b112f567e6eb81d38", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-character_parameter_padding_trimming-ea91653.stdout0000664000175000017500000004714115227365530031345 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { character_parameter_padding_trimming: (Program (SymbolTable 2 { p_pad: (Variable 2 p_pad [] Local (ArrayConstant 12 ["2 ", "2 ", "2 "] (Array (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) ColMajor ) (ArrayConstant 12 ["2 ", "2 ", "2 "] (Array (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) ColMajor ) Parameter (Array (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), p_trim: (Variable 2 p_trim [] Local (ArrayConstant 3 ["2", "2", "2"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) ColMajor ) (ArrayConstant 3 ["2", "2", "2"] (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) ColMajor ) Parameter (Array (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x_pad: (Variable 2 x_pad [] Local (StringConstant "apple" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "apple " (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x_trim: (Variable 2 x_trim [] Local (StringConstant "apple" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "ap" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y_pad: (Variable 2 y_pad [] Local (StringConstant "Ball" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "Ball " (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y_trim: (Variable 2 y_trim [] Local (StringConstant "Ball" (String 1 (IntegerConstant 4 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "Bal" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z_pad: (Variable 2 z_pad [x_pad y_pad] Local (IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(Var 2 x_pad) (Var 2 y_pad)] 0 (String 1 (IntegerConstant 18 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "apple Ball " (String 1 (IntegerConstant 18 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (Var 2 x_pad)] 0 (String 1 (IntegerConstant 26 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "apple Ball apple " (String 1 (IntegerConstant 26 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "apple Ball apple " (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 30 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z_trim: (Variable 2 z_trim [x_trim y_trim] Local (IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(Var 2 x_trim) (Var 2 y_trim)] 0 (String 1 (IntegerConstant 5 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "apBal" (String 1 (IntegerConstant 5 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (Var 2 x_trim)] 0 (String 1 (IntegerConstant 7 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "apBalap" (String 1 (IntegerConstant 7 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "apBal" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) character_parameter_padding_trimming [] [(Print (IntrinsicElementalFunction StringConcat [(IntrinsicElementalFunction StringConcat [(StringConstant "|" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 x_pad)] 0 (String 1 (IntegerConstant 9 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "|apple " (String 1 (IntegerConstant 9 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) (StringConstant "|" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] 0 (String 1 (IntegerConstant 10 (Integer 8) Decimal) ExpressionLength DescriptorString) (StringConstant "|apple |" (String 1 (IntegerConstant 10 (Integer 8) Decimal) ExpressionLength DescriptorString) ) ) ) (Print (Var 2 y_pad) ) (Print (StringFormat () [(Var 2 p_pad)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (Var 2 x_trim) ) (Print (Var 2 y_trim) ) (Print (Var 2 z_trim) ) (Print (StringFormat () [(Var 2 p_trim)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-program_01-4418962.stdout0000664000175000017500000000150515227365530024242 0ustar alastairalastairprogram program_01 implicit none integer, parameter :: dp = kind(0.d0) real(dp) :: a integer :: i print *, "Normal random numbers:" do i = 1, 10 call rand(a) print *, a end do contains subroutine rand(x) ! Returns a psuedorandom scalar drawn from the standard normal distribution. ! ! [1] Marsaglia, G., & Bray, T. A. (1964). A Convenient Method for ! Generating Normal Variables. SIAM Review, 6(3), 260–264. real(dp), intent(out) :: x logical, save :: first = .true. real(dp), save :: u(2) real(dp) :: r2 if (first) then do call random_number(u) u = 2*u - 1 r2 = sum(u**2) if (r2 < 1 .and. r2 > 0) then exit end if end do u = u*sqrt((-2)*log(r2)/r2) x = u(1) else x = u(2) end if first = .not. first end subroutine rand end program program_01 lfortran-0.64.0/tests/reference/asr_preprocess-cpp8-edc2b52.stderr0000664000175000017500000000022615227365530025177 0ustar alastairalastairsemantic error: Variable 'abcx' is not declared --> tests/errors/cpp8.f90:12:12 | 12 | print *, abcx | ^^^^ 'abcx' is undeclared lfortran-0.64.0/tests/reference/llvm-expr5-00f7fd9.stdout0000664000175000017500000000305415227365530023262 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %x = alloca i32, align 4 store i32 25, i32* %x, align 4 %2 = load i32, i32* %x, align 4 %3 = icmp eq i32 %2, 25 br i1 %3, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_expr_05 FINALIZE_SYMTABLE_expr_05: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/asr-c_f_pointer_02-97865d6.stderr0000664000175000017500000000033615227365530024460 0ustar alastairalastairsemantic error: shape array passed to c_f_pointer must be of rank 1 but given rank is 2 --> tests/errors/c_f_pointer_02.f90:6:34 | 6 | call c_f_pointer(queries, x, shape) | ^^^^^ lfortran-0.64.0/tests/reference/llvm-bin_op_real_dp-224f1cf.stdout0000664000175000017500000000556615227365530025155 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [12 x i8] c"R4,R8,R4,R8\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %u = alloca double, align 8 %v = alloca double, align 8 %x = alloca float, align 4 %zero = alloca float, align 4 store float 0x3FC24924A0000000, float* %zero, align 4 store double 0x3FC2492492492492, double* %u, align 8 store double 0x3FC2492492492492, double* %v, align 8 store float 0x3FC24924A0000000, float* %x, align 4 %3 = alloca i64, align 8 %4 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, float* %zero, double* %v, float* %x, double* %u) %5 = load i64, i64* %3, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %4, i8** %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %5, i64* %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %9 = load i8*, i8** %8, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %11 = load i64, i64* %10, align 8 %12 = trunc i64 %11 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %9, i32 %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %13 = icmp eq i8* %4, null br i1 %13, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %4) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_bin_op_real_dp FINALIZE_SYMTABLE_bin_op_real_dp: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/ast_f90-format_02-3deee60.stdout0000664000175000017500000000016215227365530024354 0ustar alastairalastairprogram format_02 implicit none integer :: i6, format(3) i6 = 2 format(i6) = 3 1 format(i6) end program format_02 lfortran-0.64.0/tests/reference/asr-implicit13-56e851c.json0000664000175000017500000000106615227365530023361 0ustar alastairalastair{ "basename": "asr-implicit13-56e851c", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit13.f90", "infile_hash": "846836e213592204557603a57b6f7420ebd88db79c59d7a369174c36", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit13-56e851c.stdout", "stdout_hash": "3311726a4632b2e398b5a0e3aa1077ffe36e004079a288951d084909", "stderr": "asr-implicit13-56e851c.stderr", "stderr_hash": "1c317cb7ffa7ec9485863562f58b639bdf60dca66cc82b65e6a7c57b", "returncode": 0 }lfortran-0.64.0/tests/reference/c-case_06-ecc9f3c.json0000664000175000017500000000071415227365530022476 0ustar alastairalastair{ "basename": "c-case_06-ecc9f3c", "cmd": "lfortran --no-color --show-c {infile}", "infile": "tests/../integration_tests/case_06.f90", "infile_hash": "3987983e4c8d162530bceffbbce0bd7d038b1f794655c222c47ad714", "outfile": null, "outfile_hash": null, "stdout": "c-case_06-ecc9f3c.stdout", "stdout_hash": "8e19967ceedef2f6dbbf7f2e51a9ea288093f820c09e381d8822f3e7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-types_04-92449d7.stdout0000664000175000017500000000636315227365530023543 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %r = alloca float, align 4 %x = alloca float, align 4 store float 1.500000e+00, float* %r, align 4 store i32 2, i32* %i, align 4 %2 = load i32, i32* %i, align 4 %3 = load i32, i32* %i, align 4 %4 = mul i32 %2, %3 %5 = sitofp i32 %4 to float store float %5, float* %x, align 4 %6 = load float, float* %r, align 4 %7 = load float, float* %r, align 4 %8 = fmul float %6, %7 store float %8, float* %x, align 4 %9 = load i32, i32* %i, align 4 %10 = sitofp i32 %9 to float %11 = load float, float* %r, align 4 %12 = fmul float %10, %11 store float %12, float* %x, align 4 %13 = load float, float* %r, align 4 %14 = load i32, i32* %i, align 4 %15 = sitofp i32 %14 to float %16 = fmul float %13, %15 store float %16, float* %x, align 4 %17 = load i32, i32* %i, align 4 %18 = load i32, i32* %i, align 4 %19 = add i32 %17, %18 %20 = sitofp i32 %19 to float store float %20, float* %x, align 4 %21 = load float, float* %r, align 4 %22 = load float, float* %r, align 4 %23 = fadd float %21, %22 store float %23, float* %x, align 4 %24 = load float, float* %r, align 4 %25 = load i32, i32* %i, align 4 %26 = sitofp i32 %25 to float %27 = fadd float %24, %26 store float %27, float* %x, align 4 %28 = load i32, i32* %i, align 4 %29 = sitofp i32 %28 to float %30 = load float, float* %r, align 4 %31 = fadd float %29, %30 store float %31, float* %x, align 4 %32 = load i32, i32* %i, align 4 %33 = load i32, i32* %i, align 4 %34 = sub i32 %32, %33 %35 = sitofp i32 %34 to float store float %35, float* %x, align 4 %36 = load float, float* %r, align 4 %37 = load float, float* %r, align 4 %38 = fsub float %36, %37 store float %38, float* %x, align 4 %39 = load float, float* %r, align 4 %40 = load i32, i32* %i, align 4 %41 = sitofp i32 %40 to float %42 = fsub float %39, %41 store float %42, float* %x, align 4 %43 = load i32, i32* %i, align 4 %44 = sitofp i32 %43 to float %45 = load float, float* %r, align 4 %46 = fsub float %44, %45 store float %46, float* %x, align 4 %47 = load i32, i32* %i, align 4 %48 = load i32, i32* %i, align 4 %49 = sdiv i32 %47, %48 %50 = sitofp i32 %49 to float store float %50, float* %x, align 4 %51 = load float, float* %r, align 4 %52 = load float, float* %r, align 4 %53 = fdiv float %51, %52 store float %53, float* %x, align 4 %54 = load i32, i32* %i, align 4 %55 = sitofp i32 %54 to float %56 = load float, float* %r, align 4 %57 = fdiv float %55, %56 store float %57, float* %x, align 4 %58 = load float, float* %r, align 4 %59 = load i32, i32* %i, align 4 %60 = sitofp i32 %59 to float %61 = fdiv float %58, %60 store float %61, float* %x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_types_04 FINALIZE_SYMTABLE_types_04: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-implicit_typing4-c338b90.json0000664000175000017500000000111615227365530024662 0ustar alastairalastair{ "basename": "asr-implicit_typing4-c338b90", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit_typing4.f90", "infile_hash": "d21435f596cf1ccd2166742ff835bedb255e7b9cd1df878a3b041834", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_typing4-c338b90.stdout", "stdout_hash": "fb83154a812570d0c69a3428e600b4f36bfc1b45cf8d2de53e51b152", "stderr": "asr-implicit_typing4-c338b90.stderr", "stderr_hash": "8ff5644fd7cfa11e1ae5b3467201231583bf45ab58a69e68bd1fd1e8", "returncode": 0 }././@LongLink0000644000000000000000000000016600000000000011606 Lustar rootrootlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-modules_39-906d6cb.jsonlfortran-0.64.0/tests/reference/pass_pass_array_by_data_transform_optional_argument_functions-module0000664000175000017500000000123415227365530035001 0ustar alastairalastair{ "basename": "pass_pass_array_by_data_transform_optional_argument_functions-modules_39-906d6cb", "cmd": "lfortran --pass=pass_array_by_data,transform_optional_argument_functions --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_39.f90", "infile_hash": "f7ccaf8b5a3d38f726e5e5ea8fbd529c12fe8f7ce34e85944c882db7", "outfile": null, "outfile_hash": null, "stdout": "pass_pass_array_by_data_transform_optional_argument_functions-modules_39-906d6cb.stdout", "stdout_hash": "8847903a2dc32cce6d5468fac1cbf4c776bccc5c8c152b142ab23b40", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-interface_01-587eedf.stdout0000664000175000017500000001271415227365530024367 0ustar alastairalastair(TranslationUnit [(Module interface_01_mod (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Interface (InterfaceHeaderName a ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [a1] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [a2] [(SimpleAttribute AttrModule )] () )] )] [] [(Subroutine a1 [(a)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent InOut )] [(a [] [] () () None ())] () )] [(Assignment 0 a (+ a 1) () )] [] [] ) (Subroutine a2 [(a)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent InOut )] [(a [] [] () () None ())] () )] [(Assignment 0 a (+ a 1) () )] [] [] )] ) (Program interface_01 () [(Use [] interface_01_mod [(UseSymbol a () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(r [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 i 5 () ) (SubroutineCall 0 a [] [(() i () 0)] [] [] () ) (If 0 () (/= i 6) [(ErrorStop 0 () () () )] [] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 r 6 () ) (SubroutineCall 0 a [] [(() r () 0)] [] [] () ) (If 0 () (/= r 7) [(ErrorStop 0 () () () )] [] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 i 7 () ) (SubroutineCall 0 a [] [(() i () 0)] [] [] () ) (If 0 () (/= i 8) [(ErrorStop 0 () () () )] [] () () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-forall_01-11937e6.json0000664000175000017500000000074515227365530023104 0ustar alastairalastair{ "basename": "asr-forall_01-11937e6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/forall_01.f90", "infile_hash": "a482aaee28abbbe45149c269745483f2ede65c21ea57212e6a647019", "outfile": null, "outfile_hash": null, "stdout": "asr-forall_01-11937e6.stdout", "stdout_hash": "78ae526805a057960ccd18fbb6fdf222ea2ebc66a6261178f245b098", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-entry_06-b57385d.json0000664000175000017500000000074215227365530023052 0ustar alastairalastair{ "basename": "asr-entry_06-b57385d", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/entry_06.f90", "infile_hash": "5135312696cc44e7912fe519e31778e0e4b2cb992cdd2c3c63bca0c9", "outfile": null, "outfile_hash": null, "stdout": "asr-entry_06-b57385d.stdout", "stdout_hash": "9444f147448d136cbf9ca3505fc14b4e6f9e7483d9c3299b9b8632e0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_without_newline-d50219b.stdout0000664000175000017500000000121315227365530027364 0ustar alastairalastair(TranslationUnit [(Program example () [] [] [(Declaration (AttrType TypeCharacter [(len 2 Value)] () () None ) [] [(x [] [] () () None ())] () )] [(Assignment 0 x (String "Hi" ()) () ) (Print 0 () [x] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-cmplx_01-89b858d.stderr0000664000175000017500000000023115227365530023364 0ustar alastairalastairsemantic error: Missing actual argument 'x' in call to 'cmplx' --> tests/errors/cmplx_01.f90:3:9 | 3 | a = cmplx(y = 2) | ^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-use1-56851d0.stdout0000664000175000017500000000230015227365530022537 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [(Use [] iso_c_binding [(UseSymbol c_loc () ) (UseSymbol c_f_pointer () )] .true. () )] [] [] [] [(Print 0 () [(String "OK" ())] () )] [] [] ) (Function g [] [(AttrType TypeInteger [] () () None )] () () () [(Use [] iso_c_binding [(UseSymbol c_loc () ) (UseSymbol c_f_pointer () )] .true. () )] [] [] [] [(Print 0 () [(String "OK" ())] () ) (Assignment 0 g 5 () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast-contains1-58ed60a.json0000664000175000017500000000074615227365530023364 0ustar alastairalastair{ "basename": "ast-contains1-58ed60a", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/contains1.f", "infile_hash": "92f1f8d63ec16274e9b2680055f36a28bebc56ec8a04644d16c150ec", "outfile": null, "outfile_hash": null, "stdout": "ast-contains1-58ed60a.stdout", "stdout_hash": "021a035e85f816203564704e049a624ee2e494f3d750f54989570f07", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_simple_02-35381bd.stdout0000664000175000017500000043260115227365530025435 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_simple_02: (Program (SymbolTable 14 { cast_r: (ExternalSymbol 14 cast_r 2 cast_r template_simple_02_m [] cast_r Public ), generic_sum: (ExternalSymbol 14 generic_sum 2 generic_sum template_simple_02_m [] generic_sum Public ), operator_r: (ExternalSymbol 14 operator_r 2 operator_r template_simple_02_m [] operator_r Public ), test_template: (ExternalSymbol 14 test_template 2 test_template template_simple_02_m [] test_template Public ) }) template_simple_02 [template_simple_02_m] [(SubroutineCall 14 test_template () [] () .false. )] ), template_simple_02_m: (Module (SymbolTable 2 { cast_integer: (Function (SymbolTable 7 { arg: (Variable 7 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 7 res [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_integer (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 7 arg)] [(Assignment (Var 7 res) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 7 res) Private .true. .true. () ), cast_r: (Requirement (SymbolTable 5 { cast: (Function (SymbolTable 6 { arg: (Variable 6 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 6 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast (FunctionType [(Integer 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 6 arg)] [] (Var 6 res) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_r [t cast] [] ), cast_real: (Function (SymbolTable 8 { arg: (Variable 8 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 8 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_real (FunctionType [(Integer 4)] (Real 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 8 arg)] [(Assignment (Var 8 res) (RealConstant 0.000000 (Real 4) ) () .false. .false. )] (Var 8 res) Private .true. .true. () ), generic_sum: (Template (SymbolTable 9 { add: (Function (SymbolTable 10 { lhs: (Variable 10 lhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 10 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 10 rhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 10 lhs) (Var 10 rhs)] [] (Var 10 res) Private .true. .true. () ), cast: (Function (SymbolTable 11 { arg: (Variable 11 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 11 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast (FunctionType [(Integer 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 11 arg)] [] (Var 11 res) Private .true. .true. () ), generic_sum: (Function (SymbolTable 12 { arr: (Variable 12 arr [] In () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 12 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 12 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 12 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast add] [(Var 12 arr)] [(Assignment (Var 12 n) (ArraySize (Var 12 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 12 res) (FunctionCall 9 cast () [((IntegerConstant 0 (Integer 4) Decimal))] (TypeParameter t ) () () ) () .false. .false. ) (If () (IntegerCompare (Var 12 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 12 res) (ArrayItem (Var 12 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 12 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 12 n) ()) [(Assignment (Var 12 res) (FunctionCall 9 add () [((Var 12 res)) ((ArrayItem (Var 12 arr) [(() (Var 12 i) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. )] [] )] [] )] (Var 12 res) Public .true. .true. () ), t: (Variable 9 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum [t add cast] [(Require operator_r [t add] ) (Require cast_r [t cast] )] ), operator_r: (Requirement (SymbolTable 3 { binary_func: (Function (SymbolTable 4 { lhs: (Variable 4 lhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (TypeParameter v ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) binary_func (FunctionType [(TypeParameter t ) (TypeParameter u )] (TypeParameter v ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 4 lhs) (Var 4 rhs)] [] (Var 4 res) Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 3 u [] In () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 3 v [] In () () Default (TypeParameter v ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) operator_r [t u v binary_func] [] ), test_template: (Function (SymbolTable 13 { __instantiated_generic_sum: (Function (SymbolTable 16 { arr: (Variable 16 arr [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 16 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 16 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 16 res [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_generic_sum (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast_integer ~add_intrinsic] [(Var 16 arr)] [(Assignment (Var 16 n) (ArraySize (Var 16 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 16 res) (FunctionCall 2 cast_integer () [((IntegerConstant 0 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 16 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 16 res) (ArrayItem (Var 16 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 16 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 16 n) ()) [(Assignment (Var 16 res) (FunctionCall 13 ~add_intrinsic () [((Var 16 res)) ((ArrayItem (Var 16 arr) [(() (Var 16 i) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. )] [] )] [] )] (Var 16 res) Public .true. .true. () ), __instantiated_generic_sum1: (Function (SymbolTable 18 { arr: (Variable 18 arr [] In () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 18 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 18 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 18 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_generic_sum1 (FunctionType [(Array (Real 4) [(() ())] DescriptorArray )] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast_real ~add_intrinsic1] [(Var 18 arr)] [(Assignment (Var 18 n) (ArraySize (Var 18 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 18 res) (FunctionCall 2 cast_real () [((IntegerConstant 0 (Integer 4) Decimal))] (Real 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 18 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 18 res) (ArrayItem (Var 18 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 18 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 18 n) ()) [(Assignment (Var 18 res) (FunctionCall 13 ~add_intrinsic1 () [((Var 18 res)) ((ArrayItem (Var 18 arr) [(() (Var 18 i) ())] (Real 4) ColMajor () ))] (Real 4) () () ) () .false. .false. )] [] )] [] )] (Var 18 res) Public .true. .true. () ), __instantiated_generic_sum2: (Function (SymbolTable 19 { arr: (Variable 19 arr [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 19 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 19 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 19 res [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_generic_sum2 (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast_integer ~add_intrinsic] [(Var 19 arr)] [(Assignment (Var 19 n) (ArraySize (Var 19 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 19 res) (FunctionCall 2 cast_integer () [((IntegerConstant 0 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 19 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 19 res) (ArrayItem (Var 19 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 19 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 19 n) ()) [(Assignment (Var 19 res) (FunctionCall 13 ~add_intrinsic () [((Var 19 res)) ((ArrayItem (Var 19 arr) [(() (Var 19 i) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. )] [] )] [] )] (Var 19 res) Public .true. .true. () ), a_i: (Variable 13 a_i [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), a_r: (Variable 13 a_r [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 13 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s_i: (Variable 13 s_i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s_r: (Variable 13 s_r [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 13 ~add [13 ~add_intrinsic 13 ~add_intrinsic1] Public ), ~add_intrinsic: (Function (SymbolTable 15 { arg0: (Variable 15 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 15 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 15 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 15 arg0) (Var 15 arg1)] [(Assignment (Var 15 ret) (IntegerBinOp (Var 15 arg0) Add (Var 15 arg1) (Integer 4) () ) () .false. .false. )] (Var 15 ret) Public .false. .true. () ), ~add_intrinsic1: (Function (SymbolTable 17 { arg0: (Variable 17 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 17 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 17 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic1 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 17 arg0) (Var 17 arg1)] [(Assignment (Var 17 ret) (RealBinOp (Var 17 arg0) Add (Var 17 arg1) (Real 4) () ) () .false. .false. )] (Var 17 ret) Public .false. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(DoLoop () ((Var 13 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 13 a_i) () (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) ()) [(Assignment (ArrayItem (Var 13 a_i) [(() (Var 13 i) ())] (Integer 4) ColMajor () ) (Var 13 i) () .false. .false. ) (Assignment (ArrayItem (Var 13 a_r) [(() (Var 13 i) ())] (Real 4) ColMajor () ) (Cast (Var 13 i) IntegerToReal (Real 4) () () ) () .false. .false. )] [] ) (Assignment (Var 13 s_i) (FunctionCall 13 __instantiated_generic_sum () [((ArrayPhysicalCast (Var 13 a_i) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 13 s_r) (FunctionCall 13 __instantiated_generic_sum1 () [((ArrayPhysicalCast (Var 13 a_r) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 13 s_i) (FunctionCall 13 __instantiated_generic_sum2 () [((ArrayPhysicalCast (Var 13 a_i) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 13 s_i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 13 s_r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_simple_02_m () [template_simple_02_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor6-c43df4d.stdout0000664000175000017500000001025115227365530027164 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { preprocessor6: (Program (SymbolTable 2 { }) preprocessor6 [] [(Print (StringConstant "1a" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1b" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "2a" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "2b" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1b" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "10" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1a0" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1ab" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1ac" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1c" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "10" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1a0" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1aa" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1ac" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "1c" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-do_concurrent1-74bde45.json0000664000175000017500000000074615227365530024412 0ustar alastairalastair{ "basename": "asr-do_concurrent1-74bde45", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/do_concurrent1.f90", "infile_hash": "11d2f455926ea0469a0cefd4547a8df57c57d57a3c836c87f04ef3dc", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-do_concurrent1-74bde45.stderr", "stderr_hash": "9fd50196024a6f988e64b93331be1f4e244183f9b31b4ae5f3908653", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-program_without_line_cc-b84ba02.stderr0000664000175000017500000000052315227365530026702 0ustar alastairalastairsyntax error: Expected program end --> tests/errors/program_without_line_cc.f90:1:1 - 2:8 | 1 | print *, "OK" | ^^^^^^^^^^^^^... ... | 2 | contains | ...^^^^^^^^ semantic error: Variable 'contains' is not declared --> tests/errors/program_without_line_cc.f90:2:1 | 2 | contains | ^^^^^^^^ 'contains' is undeclared lfortran-0.64.0/tests/reference/asr-implicit_interface_allocatable_array-38d4afe.json0000664000175000017500000000106615227365530031114 0ustar alastairalastair{ "basename": "asr-implicit_interface_allocatable_array-38d4afe", "cmd": "lfortran --show-asr --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/implicit_interface_allocatable_array.f90", "infile_hash": "a9a653a2021fb69c16b0b6a01c642010adcbb420c5a2936c34ebd6a1", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_interface_allocatable_array-38d4afe.stdout", "stdout_hash": "aa1eb1d8914314151fd0671dc6f7dfe82112794abbec9b9702443c6b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutine5-0e48a69.stdout0000664000175000017500000000012515227365530024552 0ustar alastairalastairfunction add(a::Float32, b::Float32, c::Base.RefValue{Float32}) c[] = a + b end lfortran-0.64.0/tests/reference/cpp-kokkos_program1-1d79f7a.json0000664000175000017500000000072515227365530024574 0ustar alastairalastair{ "basename": "cpp-kokkos_program1-1d79f7a", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/kokkos_program1.f90", "infile_hash": "81575b3ab7fd1a2dc16c67f0a5ff241d9057fed389befd1c3084d6ea", "outfile": null, "outfile_hash": null, "stdout": "cpp-kokkos_program1-1d79f7a.stdout", "stdout_hash": "7ac638e8146f048bd5444436ee2b2ac4f85ffa7a1d791cf526adacb4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-print_12-a2450d8.json0000664000175000017500000000071215227365530023044 0ustar alastairalastair{ "basename": "run-print_12-a2450d8", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/print_12.f90", "infile_hash": "287e0dfc85f6da9fa31789b0458119a40f3b84c3d43c0a9365aeb3df", "outfile": null, "outfile_hash": null, "stdout": "run-print_12-a2450d8.stdout", "stdout_hash": "480bf8473b4a1ddaa2f81a261074b09a3b57b1948c8d423bbe1d7a4c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_call_01-e42aa0d.stderr0000664000175000017500000000034015227365530025154 0ustar alastairalastairsemantic error: Cannot call 'xub' as a procedure; it is a variable. Use --implicit-interface to enable implicit procedure interfaces. --> tests/errors/implicit_call_01.f90:4:5 | 4 | call xub (i) | ^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-infer_first_assignment_conflict_01-a1c38bb.stderr0000664000175000017500000000022415227365530030776 0ustar alastairalastairsemantic error: Only String Pointer can be assigned to String --> tests/errors/infer_first_assignment_conflict_01.f90:2:1 | 2 | x = 1 | ^^^^^ lfortran-0.64.0/tests/reference/run-read_40-72baf22.stdout0000664000175000017500000000002015227365530023243 0ustar alastairalastairProgram ending. lfortran-0.64.0/tests/reference/julia-block_02-1362742.stderr0000664000175000017500000000026315227365530023475 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/block_02.f90:7:14 | 7 | IF (A.EQ.15) GO TO 1 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/ast-array7-b9de38f.json0000664000175000017500000000070715227365530022757 0ustar alastairalastair{ "basename": "ast-array7-b9de38f", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array7.f90", "infile_hash": "e8a4f12c21d75c3eee1ba6cc82227a262f41e146ccfd34c1ffb12612", "outfile": null, "outfile_hash": null, "stdout": "ast-array7-b9de38f.stdout", "stdout_hash": "deea556a927bab2a181ab718f525d699a049741fc3c5ef4ac5989a8b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/lookup_name-lookup_name3-a06a374.json0000664000175000017500000000075415227365530025513 0ustar alastairalastair{ "basename": "lookup_name-lookup_name3-a06a374", "cmd": "lfortran --lookup-name --no-color {infile} -o {outfile}", "infile": "tests/lookup_name3.f90", "infile_hash": "7181224f94a1ed635176c4414c3a6f8a8b82712a2f3834d4f9fb74b3", "outfile": null, "outfile_hash": null, "stdout": "lookup_name-lookup_name3-a06a374.stdout", "stdout_hash": "5ec01df86d0ab3ac57f61290c0bdd5a71dbcbcd60b159b1d7e39664f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-return1-517cbf1.stdout0000664000175000017500000000320315227365530023421 0ustar alastairalastair(TranslationUnit [(Subroutine example [(s)] [] () (TriviaNode [] [(EndOfLine) (Comment "! Syntax check only" )] ) [] [] [] [(Declaration (AttrType TypeCharacter [] () () None ) [] [(s [] [] 32 () Asterisk ())] () )] [(Write 0 [(()) (())] [] [s] () ) (Return 0 () () )] [] [] ) (Subroutine example1 [(i) (a) (b) (c)] [] () () [] [] [] [] [(If 0 () (== i a) [(Return 0 1 () )] [] () () () ) (If 0 () (== i b) [(Return 0 2 () )] [] () () () ) (If 0 () (== i c) [(Return 0 3 () )] [] () () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-character1-8679f4b.stdout0000664000175000017500000001731115227365530024002 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { xerror: (Function (SymbolTable 2 { mess: (Variable 2 mess [] Unspecified () () Default (FunctionType [(Integer 4)] (String 1 () AssumedLength DescriptorString) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) 2 ~implicit_interface_mess_3 Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~implicit_interface_mess_3: (Function (SymbolTable 3 { ~implicit_interface_mess_3_arg_0: (Variable 3 ~implicit_interface_mess_3_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~implicit_interface_mess_3_return_var: (Variable 3 ~implicit_interface_mess_3_return_var [] ReturnVar () () Default (String 1 () AssumedLength DescriptorString) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~implicit_interface_mess_3 (FunctionType [(Integer 4)] (String 1 () AssumedLength DescriptorString) BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 ~implicit_interface_mess_3_arg_0)] [] (Var 3 ~implicit_interface_mess_3_return_var) Public .false. .false. () ) }) xerror (FunctionType [(FunctionType [(Integer 4)] (String 1 () AssumedLength DescriptorString) BindC Interface () .false. .false. .false. .false. .false. [] .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 mess)] [(Print (FunctionCall 2 mess () [((IntegerConstant 1 (Integer 4) Decimal))] (String 1 () AssumedLength DescriptorString) () () ) ) (Return)] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/julia-expr_07-d5a6b4c.stdout0000664000175000017500000000017015227365530023702 0ustar alastairalastairfunction main() local x::Float32 = 3.29999995231628418e+00 + 6.00000000000000000e+00 println(x) end main() lfortran-0.64.0/tests/reference/ast-global_scope3-45d8bdc.stdout0000664000175000017500000000061215227365530024623 0ustar alastairalastair(TranslationUnit [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () ) (Assignment 0 x 6 () ) (Assignment 0 x (+ x 1) () )] ) lfortran-0.64.0/tests/reference/asr_openmp-openmp_45-1c0e790.json0000664000175000017500000000077415227365530024564 0ustar alastairalastair{ "basename": "asr_openmp-openmp_45-1c0e790", "cmd": "lfortran --show-asr --no-color --openmp {infile} -o {outfile}", "infile": "tests/../integration_tests/openmp_45.f90", "infile_hash": "839bc36c5653bbe5c190abafd9760c2cfc94d2a5da73b93c480c61cd", "outfile": null, "outfile_hash": null, "stdout": "asr_openmp-openmp_45-1c0e790.stdout", "stdout_hash": "7d4881f3cfd5d985ceb113c0d63e12c846c36b11ed70b3ef902db643", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-formatTesting-889403a.json0000664000175000017500000000071315227365530024166 0ustar alastairalastair{ "basename": "run-formatTesting-889403a", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/formatTesting.f90", "infile_hash": "fcb5d75f1257b518b8fb71e979444738eba9931484ba15fd671cb0db", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-formatTesting-889403a.stderr", "stderr_hash": "24057424695e00241a9c4cf96807eb8691d7e2e221931b4a7fef4d52", "returncode": 1 }lfortran-0.64.0/tests/reference/cpp-subroutine4-e2840c9.json0000664000175000017500000000071115227365530023655 0ustar alastairalastair{ "basename": "cpp-subroutine4-e2840c9", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/subroutine4.f90", "infile_hash": "06ca8a1c322b25fe9280c43f558f6fa92e1a4843b6f6b77e206fdf4e", "outfile": null, "outfile_hash": null, "stdout": "cpp-subroutine4-e2840c9.stdout", "stdout_hash": "6d5772b55884ee2a29331dc0be5f811a0a104070ba91471ca1670aa2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-string_negative_start_index-643e9c0.stderr0000664000175000017500000000026115227365530027522 0ustar alastairalastairsemantic error: The first index in string section is less than 1 --> tests/errors/string_negative_start_index.f90:5:15 | 5 | print*, "s:", s(-1:4) | ^^^^^^^ lfortran-0.64.0/tests/reference/ast-expr2-52dd466.stdout0000664000175000017500000000004115227365530023004 0ustar alastairalastair(TranslationUnit [(+ 5 3)] ) lfortran-0.64.0/tests/reference/asr-complex_dp_param-b21353f.json0000664000175000017500000000077215227365530024705 0ustar alastairalastair{ "basename": "asr-complex_dp_param-b21353f", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_dp_param.f90", "infile_hash": "0d4d9eaf5bcc2cee6a8b57ee6a66b5a10ced2edf6d64b5d2e2a0bcb8", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_dp_param-b21353f.stdout", "stdout_hash": "39bf741aae5030584edb7845a2680c2f12eca0420c69b4a143e4eb59", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-case_01-929583e.json0000664000175000017500000000073715227365530022554 0ustar alastairalastair{ "basename": "ast-case_01-929583e", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_01.f90", "infile_hash": "003a23367180e7f228e7e4ef5a6dfdb6749801b29ccf2002e2559e41", "outfile": null, "outfile_hash": null, "stdout": "ast-case_01-929583e.stdout", "stdout_hash": "d8110d26d6efba1a8d1b7d7ee0ae2c5bb42a1a824d883f080b33d08e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-read_83-d6544e3.stdout0000664000175000017500000004512515227365530023370 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__Wrong_allocation = private unnamed_addr constant [51 x i8] c"Attempting to allocate already allocated variable!\00", align 1 @string_const_data = private constant [1 x i8] c" " @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([1 x i8], [1 x i8]* @string_const_data, i32 0, i32 0), i64 1 }> @string_const_data.1 = private constant [12 x i8] c"--empty-read" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([12 x i8], [12 x i8]* @string_const_data.1, i32 0, i32 0), i64 12 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.3 = private constant [58 x i8] c"Starting empty read. All input to stdin will be discarded." @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([58 x i8], [58 x i8]* @string_const_data.3, i32 0, i32 0), i64 58 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @3 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.5 = private constant [92 x i8] c"Empty read 1 completed successfully. Starting empty read 2 with unit=5 (stdin), fmt='(I10)'." @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([92 x i8], [92 x i8]* @string_const_data.5, i32 0, i32 0), i64 92 }> @4 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @5 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.7 = private constant [78 x i8] c"Empty read 2 completed successfully. Starting empty read 3 with unit=*, fmt=*." @string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([78 x i8], [78 x i8]* @string_const_data.7, i32 0, i32 0), i64 78 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @9 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.9 = private constant [77 x i8] c"Empty read 3 completed successfully. Starting empty read 4 with format label." @string_const.10 = private global %string_descriptor <{ i8* getelementptr inbounds ([77 x i8], [77 x i8]* @string_const_data.9, i32 0, i32 0), i64 77 }> @10 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @11 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.11 = private constant [93 x i8] c"Empty read 4 completed successfully. Starting empty read 5 with unit passed through variable." @string_const.12 = private global %string_descriptor <{ i8* getelementptr inbounds ([93 x i8], [93 x i8]* @string_const_data.11, i32 0, i32 0), i64 93 }> @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @15 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.13 = private constant [77 x i8] c"Empty read 5 completed successfully. All empty reads completed without error." @string_const.14 = private global %string_descriptor <{ i8* getelementptr inbounds ([77 x i8], [77 x i8]* @string_const_data.13, i32 0, i32 0), i64 77 }> @16 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define void @_lcompilers_get_command_argument_(i32* %number, %string_descriptor* %value) { .entry: %0 = call i8* @_lfortran_get_default_allocator() %command_argument_holder = alloca %string_descriptor, align 8 store %string_descriptor zeroinitializer, %string_descriptor* %command_argument_holder, align 1 %length_to_allocate = alloca i32, align 4 store i32 0, i32* %length_to_allocate, align 4 %1 = load i32, i32* %number, align 4 %2 = call i32 @_lfortran_get_command_argument_length(i32 %1) store i32 %2, i32* %length_to_allocate, align 4 %3 = load i32, i32* %length_to_allocate, align 4 %4 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %5 = load i8*, i8** %4, align 8 %6 = icmp ne i8* %5, null br i1 %6, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @__Wrong_allocation, i32 0, i32 0)) call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %7 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %8 = sext i32 %3 to i64 %9 = call i8* @_lfortran_get_default_allocator() %10 = call i8* @_lfortran_string_malloc_alloc(i8* %9, i64 %8) store i8* %10, i8** %7, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 1 %12 = sext i32 %3 to i64 store i64 %12, i64* %11, align 8 %13 = load i32, i32* %number, align 4 %14 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %15 = load i8*, i8** %14, align 8 %16 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %17 = load i8*, i8** %16, align 8 call void @_lfortran_get_command_argument_value(i32 %13, i8* %17) %18 = getelementptr %string_descriptor, %string_descriptor* %value, i32 0, i32 0 %19 = getelementptr %string_descriptor, %string_descriptor* %value, i32 0, i32 1 %20 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %21 = load i8*, i8** %20, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 1 %23 = load i64, i64* %22, align 8 call void @_lfortran_strcpy_alloc(i8* %0, i8** %18, i64* %19, i8 0, i8 0, i8* %21, i64 %23, i32 1) br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE__lcompilers_get_command_argument_ FINALIZE_SYMTABLE__lcompilers_get_command_argument_: ; preds = %return br label %Finalize_Variable_command_argument_holder Finalize_Variable_command_argument_holder: ; preds = %FINALIZE_SYMTABLE__lcompilers_get_command_argument_ %24 = getelementptr %string_descriptor, %string_descriptor* %command_argument_holder, i32 0, i32 0 %25 = load i8*, i8** %24, align 8 call void @_lfortran_free_alloc(i8* %0, i8* %25) ret void } declare i32 @_lfortran_get_command_argument_length(i32) declare void @_lfortran_get_command_argument_value(i32, i8*) define i32 @_lcompilers_len_trim_str(%string_descriptor* %str) { .entry: %StringItem = alloca %string_descriptor, align 8 %result = alloca i32, align 4 %0 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 1 %1 = load i64, i64* %0, align 8 %2 = trunc i64 %1 to i32 store i32 %2, i32* %result, align 4 %3 = load i32, i32* %result, align 4 %4 = icmp ne i32 %3, 0 br i1 %4, label %then, label %else2 then: ; preds = %.entry br label %loop.head loop.head: ; preds = %ifcont, %then %5 = load i32, i32* %result, align 4 %6 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = sext i32 %5 to i64 %9 = sub i64 %8, 1 %10 = getelementptr i8, i8* %7, i64 %9 %11 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 0 store i8* %10, i8** %11, align 8 %12 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 1 store i64 1, i64* %12, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %StringItem, i32 0, i32 0 %14 = load i8*, i8** %13, align 8 %15 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 %16 = load i8, i8* %14, align 1 %17 = load i8, i8* %15, align 1 %18 = icmp eq i8 %16, %17 br i1 %18, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %19 = load i32, i32* %result, align 4 %20 = sub i32 %19, 1 store i32 %20, i32* %result, align 4 %21 = load i32, i32* %result, align 4 %22 = icmp eq i32 %21, 0 br i1 %22, label %then1, label %else then1: ; preds = %loop.body br label %loop.end unreachable_after_exit: ; No predecessors! br label %ifcont else: ; preds = %loop.body br label %ifcont ifcont: ; preds = %else, %unreachable_after_exit br label %loop.head loop.end: ; preds = %then1, %loop.head br label %ifcont3 else2: ; preds = %.entry br label %ifcont3 ifcont3: ; preds = %else2, %loop.end br label %return return: ; preds = %ifcont3 br label %FINALIZE_SYMTABLE__lcompilers_len_trim_str FINALIZE_SYMTABLE__lcompilers_len_trim_str: ; preds = %return %23 = load i32, i32* %result, align 4 ret i32 %23 } define void @_lcompilers_trim_str(%string_descriptor* %str, %string_descriptor* %result) { .entry: %0 = call i8* @_lfortran_get_default_allocator() %StrSlice_StrView = alloca %string_descriptor, align 8 %1 = call i32 @_lcompilers_len_trim_str(%string_descriptor* %str) %2 = sext i32 %1 to i64 %3 = sub i64 %2, 1 %4 = add i64 %3, 1 %5 = icmp slt i64 %4, 0 %6 = select i1 %5, i64 0, i64 %4 %7 = getelementptr %string_descriptor, %string_descriptor* %str, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %StrSliceGEP = getelementptr i8, i8* %8, i64 0 %9 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 store i8* %StrSliceGEP, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 store i64 %6, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %result, i32 0, i32 0 %12 = getelementptr %string_descriptor, %string_descriptor* %result, i32 0, i32 1 %13 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 0 %14 = load i8*, i8** %13, align 8 %15 = getelementptr %string_descriptor, %string_descriptor* %StrSlice_StrView, i32 0, i32 1 %16 = load i64, i64* %15, align 8 call void @_lfortran_strcpy_alloc(i8* %0, i8** %11, i64* %12, i8 0, i8 0, i8* %14, i64 %16, i32 1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_trim_str FINALIZE_SYMTABLE__lcompilers_trim_str: ; preds = %return ret void } declare void @_lcompilers_print_error(i8*, ...) declare void @exit(i32) declare i8* @_lfortran_string_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_strcpy_alloc(i8*, i8**, i64*, i8, i8, i8*, i64, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %2 = call i8* @_lfortran_get_default_allocator() %call_arg_value = alloca i32, align 4 %empty_read = alloca %string_descriptor, align 8 %__libasr__created__var__0_return_slot = alloca %string_descriptor, align 8 call void @_lpython_call_initial_functions(i32 %0, i8** %1) store %string_descriptor zeroinitializer, %string_descriptor* %__libasr__created__var__0_return_slot, align 1 store %string_descriptor zeroinitializer, %string_descriptor* %empty_read, align 1 %3 = getelementptr %string_descriptor, %string_descriptor* %empty_read, i32 0, i32 1 store i64 32, i64* %3, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %empty_read, i32 0, i32 0 %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 32) store i8* %6, i8** %4, align 8 %unit_num = alloca i32, align 4 store i32 1, i32* %call_arg_value, align 4 call void @_lcompilers_get_command_argument_(i32* %call_arg_value, %string_descriptor* %empty_read) %7 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %8 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 1 %9 = load i8*, i8** %7, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %9) store i8* null, i8** %7, align 8 store i64 0, i64* %8, align 8 %10 = call i32 @_lcompilers_len_trim_str(%string_descriptor* %empty_read) %11 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = icmp ne i8* %12, null br i1 %13, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @__Wrong_allocation, i32 0, i32 0)) call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then %14 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %15 = sext i32 %10 to i64 %16 = call i8* @_lfortran_get_default_allocator() %17 = call i8* @_lfortran_string_malloc_alloc(i8* %16, i64 %15) store i8* %17, i8** %14, align 8 %18 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 1 %19 = sext i32 %10 to i64 store i64 %19, i64* %18, align 8 call void @_lcompilers_trim_str(%string_descriptor* %empty_read, %string_descriptor* %__libasr__created__var__0_return_slot) %20 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %21 = load i8*, i8** %20, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 1 %23 = load i64, i64* %22, align 8 %24 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 %25 = call i32 @str_compare(i8* %21, i64 %23, i8* %24, i64 12) %26 = icmp eq i32 %25, 0 br i1 %26, label %then1, label %else2 then1: ; preds = %ifcont %27 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %27, i32 58, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %28 = alloca i32, align 4 store i32 0, i32* %28, align 4 %29 = alloca i32, align 4 call void @_lfortran_empty_read(i32 -2, i32* %28, i32 1) %30 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @4, i32 0, i32 0), i8* %30, i32 92, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @3, i32 0, i32 0), i32 1) %31 = alloca i32, align 4 store i32 0, i32* %31, align 4 %32 = alloca i32, align 4 call void @_lfortran_empty_read(i32 -2, i32* %31, i32 1) %33 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %33, i32 78, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %34 = alloca i32, align 4 store i32 0, i32* %34, align 4 %35 = alloca i32, align 4 call void @_lfortran_empty_read(i32 -2, i32* %34, i32 1) %36 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.10, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @10, i32 0, i32 0), i8* %36, i32 77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @9, i32 0, i32 0), i32 1) br label %goto_target goto_target: ; preds = %then1 %37 = alloca i32, align 4 store i32 0, i32* %37, align 4 %38 = alloca i32, align 4 call void @_lfortran_empty_read(i32 -2, i32* %37, i32 1) %39 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.12, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %39, i32 93, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) store i32 5, i32* %unit_num, align 4 %40 = load i32, i32* %unit_num, align 4 %41 = icmp eq i32 %40, 5 %42 = select i1 %41, i32 -2, i32 %40 %43 = alloca i32, align 4 store i32 0, i32* %43, align 4 %44 = alloca i32, align 4 call void @_lfortran_empty_read(i32 %42, i32* %43, i32 1) %45 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.14, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @16, i32 0, i32 0), i8* %45, i32 77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @15, i32 0, i32 0), i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %goto_target br label %return return: ; preds = %ifcont3 br label %FINALIZE_SYMTABLE_read_83 FINALIZE_SYMTABLE_read_83: ; preds = %return br label %Finalize_Variable___libasr__created__var__0_return_slot Finalize_Variable___libasr__created__var__0_return_slot: ; preds = %FINALIZE_SYMTABLE_read_83 %46 = getelementptr %string_descriptor, %string_descriptor* %__libasr__created__var__0_return_slot, i32 0, i32 0 %47 = load i8*, i8** %46, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %47) br label %Finalize_Variable_empty_read Finalize_Variable_empty_read: ; preds = %Finalize_Variable___libasr__created__var__0_return_slot %48 = getelementptr %string_descriptor, %string_descriptor* %empty_read, i32 0, i32 0 %49 = load i8*, i8** %48, align 8 call void @_lfortran_free_alloc(i8* %2, i8* %49) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i32 @str_compare(i8*, i64, i8*, i64) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_empty_read(i32, i32*, i32) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/pass_global_stmts-expr3-c9c0bd7.json0000664000175000017500000000076415227365530025536 0ustar alastairalastair{ "basename": "pass_global_stmts-expr3-c9c0bd7", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr3.f90", "infile_hash": "a4aed9754913f48e6b1982a698f85476db8324f2d2efe0b1a2de88f5", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-expr3-c9c0bd7.stdout", "stdout_hash": "b778a4f9bc2efae9a53255667776ca61c1841ebf2f3e7fd70e705e35", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-global_scope9-bdf4288.stdout0000664000175000017500000000112015227365530024733 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i64 0 define i64 @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i64, align 8 store i64 6, i64* @x, align 8 %0 = load i64, i64* @x, align 8 store i64 %0, i64* %__lfortran_evaluate_11, align 8 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return %1 = load i64, i64* %__lfortran_evaluate_11, align 8 ret i64 %1 } lfortran-0.64.0/tests/reference/ast-where1-c237415.json0000664000175000017500000000070715227365530022511 0ustar alastairalastair{ "basename": "ast-where1-c237415", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/where1.f90", "infile_hash": "cd5e0b85aa90c2bb3dff3fdc1e1e563b601c361a4b57ba16db0bf051", "outfile": null, "outfile_hash": null, "stdout": "ast-where1-c237415.stdout", "stdout_hash": "73fb69d0990b9844dd3d2849ea2807edf6b55e781d9ffa13031a226b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do6-02ec641.json0000664000175000017500000000067615227365530022067 0ustar alastairalastair{ "basename": "ast-do6-02ec641", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/do6.f90", "infile_hash": "47676f4b10ae9b305cb49d9ea4650d1e255a2b3506ab9001fc8f402c", "outfile": null, "outfile_hash": null, "stdout": "ast-do6-02ec641.stdout", "stdout_hash": "602eff746511f9e869e94ab4f5cedfefd72d48e88d2f9277c4281822", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-derived_types_03-3580222.stdout0000664000175000017500000001230715227365530024753 0ustar alastairalastair(TranslationUnit [(Program derived_types_03 (TriviaNode [(EndOfLine) (Comment "! AST only" )] [] ) [] [] [] [(DoLoop 0 () 0 nn 1 ndiag () [(Assignment 0 ing len [(diag [(() nn () 0)])] () ) (Allocate 0 [(() (FuncCallOrArray cell_id [(diag [(() nn () 0)])] [(() ing () 0)] [] [] [] ) () 0)] [(STAT ierr)] () ) (If 0 () (/= ierr 0) [(Return 0 () () )] [] () () () ) (Assignment 0 ndpwds (+ ndpwds (FuncCallOrArray SIZE [] [(() cell_id [(diag [(() nn () 0)])] () 0)] [] [] [] )) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (DoLoop 0 () 0 k 1 nz () [(DoLoop 0 () 0 j 1 ny () [(DoLoop 0 () 0 i 1 ichunk () [(Assignment 0 nn (- (+ (+ i j) k) 2) () ) (Assignment 0 (FuncCallOrArray indx [] [(() nn () 0)] [] [] [] ) (+ (FuncCallOrArray indx [] [(() nn () 0)] [] [] [] ) 1) () ) (Assignment 0 ing (FuncCallOrArray indx [] [(() nn () 0)] [] [] [] ) () ) (Assignment 0 ic [(diag [(() nn () 0)]) (cell_id [(() ing () 0)])] i () ) (Assignment 0 j [(diag [(() nn () 0)]) (cell_id [(() ing () 0)])] j () ) (Assignment 0 k [(diag [(() nn () 0)]) (cell_id [(() ing () 0)])] k () )] () () )] () () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/ast-if1-6e771a0.stdout0000664000175000017500000000350215227365530022424 0ustar alastairalastair(TranslationUnit [(Program if1 () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(Assignment 0 i 5 () ) (If 0 () (== i 5) [(Print 0 () [(String "correct" ())] () )] [] () () () ) (If 0 () (== i 6) [(Print 0 () [(String "incorrect" ())] () )] [] () () () ) (Assignment 0 i (u- 2) () ) (Assignment 40 i (+ i 1) () ) (IfArithmetic 0 () i 50 60 70 () ) (Print 50 () [(String "i < 0" ())] () ) (GoTo 0 () 40 [] () ) (Print 60 () [(String "i == 0" ())] () ) (GoTo 0 () 40 [] () ) (Print 70 () [(String "i > 0" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-modules_15b-09f8335.json0000664000175000017500000000075315227365530023445 0ustar alastairalastair{ "basename": "asr-modules_15b-09f8335", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_15b.f90", "infile_hash": "fbbd085f2ba045d9c713c3e0edf41b67cc3f20b94a53364bf3b9f51c", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_15b-09f8335.stdout", "stdout_hash": "7ea29244c686f9bfd833e5f3d94551d9e63967365100d67bdef85fc0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/fortran-coarray_initialization_01-23c9c70.json0000664000175000017500000000112115227365530027322 0ustar alastairalastair{ "basename": "fortran-coarray_initialization_01-23c9c70", "cmd": "lfortran --pass=coarray --show-fortran --no-color {infile} -o {outfile} --no-error-banner --line=-1 --column=-1 --coarray=true", "infile": "tests/coarray_initialization_01.f90", "infile_hash": "d9b09f3b2056e8f4259ea70bd2075e1e29621f12e5ef352f536981d1", "outfile": null, "outfile_hash": null, "stdout": "fortran-coarray_initialization_01-23c9c70.f90", "stdout_hash": "4a73cd472f5d6fa06a630bdfff553df957595cf7cfdc23ddd11cdd81", "stderr": null, "stderr_hash": null, "returncode": 0 } lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor10-6279d1f.json0000664000175000017500000000077315227365530026545 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor10-6279d1f", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor10.f90", "infile_hash": "128670b190f1e59f40192f15434c3b8d7a85c15fbc901a72e7f7ebc3", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor10-6279d1f.stdout", "stdout_hash": "8620f523932d44584173618faae87ae481b65da55c369ebcd19e1754", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_travel_01b-db46a56.stdout0000664000175000017500000055120715227365530025670 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_travel_01b: (Program (SymbolTable 21 { operation: (ExternalSymbol 21 operation 2 operation template_travel_01b_m [] operation Public ), test_template: (ExternalSymbol 21 test_template 2 test_template template_travel_01b_m [] test_template Public ), travel_tmpl: (ExternalSymbol 21 travel_tmpl 2 travel_tmpl template_travel_01b_m [] travel_tmpl Public ) }) template_travel_01b [template_travel_01b_m] [(SubroutineCall 21 test_template () [] () .false. )] ), template_travel_01b_m: (Module (SymbolTable 2 { operation: (Requirement (SymbolTable 3 { a: (Variable 3 a [] In () () Default (TypeParameter a ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (TypeParameter b ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] In () () Default (TypeParameter c ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), op: (Function (SymbolTable 4 { l: (Variable 4 l [] In () () Default (TypeParameter a ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 4 r [] In () () Default (TypeParameter b ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (TypeParameter c ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) op (FunctionType [(TypeParameter a ) (TypeParameter b )] (TypeParameter c ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 4 l) (Var 4 r)] [] (Var 4 res) Private .true. .true. () ) }) operation [a b c op] [] ), test_template: (Function (SymbolTable 12 { avg_integer_s_from_s: (Function (SymbolTable 20 { avg: (Variable 20 avg [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 20 d1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 20 d2 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 20 s1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 20 s2 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_integer_s_from_s (FunctionType [(Integer 4) (Integer 4) (Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~div_intrinsic1 avg_integer_s_from_t] [(Var 20 d1) (Var 20 s1) (Var 20 d2) (Var 20 s2)] [(Assignment (Var 20 avg) (FunctionCall 12 avg_integer_s_from_t () [((Var 20 d1)) ((FunctionCall 12 ~div_intrinsic1 () [((Var 20 d1)) ((Var 20 s1))] (Integer 4) () () )) ((Var 20 d2)) ((FunctionCall 12 ~div_intrinsic1 () [((Var 20 d2)) ((Var 20 s2))] (Integer 4) () () ))] (Integer 4) () () ) () .false. .false. )] (Var 20 avg) Public .true. .true. () ), avg_integer_s_from_t: (Function (SymbolTable 19 { avg: (Variable 19 avg [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 19 d1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 19 d2 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 19 t1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 19 t2 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_integer_s_from_t (FunctionType [(Integer 4) (Integer 4) (Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~add_intrinsic1 ~div_intrinsic1] [(Var 19 d1) (Var 19 t1) (Var 19 d2) (Var 19 t2)] [(Assignment (Var 19 avg) (FunctionCall 12 ~div_intrinsic1 () [((FunctionCall 12 ~add_intrinsic1 () [((Var 19 d1)) ((Var 19 d2))] (Integer 4) () () )) ((FunctionCall 12 ~add_intrinsic1 () [((Var 19 t1)) ((Var 19 t2))] (Integer 4) () () ))] (Integer 4) () () ) () .false. .false. )] (Var 19 avg) Public .true. .true. () ), avg_real_s_from_s: (Function (SymbolTable 16 { avg: (Variable 16 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 16 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 16 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 16 s1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 16 s2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_real_s_from_s (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~div_intrinsic avg_real_s_from_t] [(Var 16 d1) (Var 16 s1) (Var 16 d2) (Var 16 s2)] [(Assignment (Var 16 avg) (FunctionCall 12 avg_real_s_from_t () [((Var 16 d1)) ((FunctionCall 12 ~div_intrinsic () [((Var 16 d1)) ((Var 16 s1))] (Real 4) () () )) ((Var 16 d2)) ((FunctionCall 12 ~div_intrinsic () [((Var 16 d2)) ((Var 16 s2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 16 avg) Public .true. .true. () ), avg_real_s_from_t: (Function (SymbolTable 15 { avg: (Variable 15 avg [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 15 d1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 15 d2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 15 t1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 15 t2 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_real_s_from_t (FunctionType [(Real 4) (Real 4) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [~add_intrinsic ~div_intrinsic] [(Var 15 d1) (Var 15 t1) (Var 15 d2) (Var 15 t2)] [(Assignment (Var 15 avg) (FunctionCall 12 ~div_intrinsic () [((FunctionCall 12 ~add_intrinsic () [((Var 15 d1)) ((Var 15 d2))] (Real 4) () () )) ((FunctionCall 12 ~add_intrinsic () [((Var 15 t1)) ((Var 15 t2))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 15 avg) Public .true. .true. () ), i1: (Variable 12 i1 [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i2: (Variable 12 i2 [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 12 s1 [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 12 s2 [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 12 ~add [12 ~add_intrinsic 12 ~add_intrinsic1] Public ), ~add_intrinsic: (Function (SymbolTable 13 { arg0: (Variable 13 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 13 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 13 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 13 arg0) (Var 13 arg1)] [(Assignment (Var 13 ret) (RealBinOp (Var 13 arg0) Add (Var 13 arg1) (Real 4) () ) () .false. .false. )] (Var 13 ret) Public .true. .true. () ), ~add_intrinsic1: (Function (SymbolTable 17 { arg0: (Variable 17 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 17 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 17 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic1 (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 17 arg0) (Var 17 arg1)] [(Assignment (Var 17 ret) (IntegerBinOp (Var 17 arg0) Add (Var 17 arg1) (Integer 4) () ) () .false. .false. )] (Var 17 ret) Public .true. .true. () ), ~div: (CustomOperator 12 ~div [12 ~div_intrinsic 12 ~div_intrinsic1] Public ), ~div_intrinsic: (Function (SymbolTable 14 { arg0: (Variable 14 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 14 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 14 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~div_intrinsic (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 14 arg0) (Var 14 arg1)] [(Assignment (Var 14 ret) (RealBinOp (Var 14 arg0) Div (Var 14 arg1) (Real 4) () ) () .false. .false. )] (Var 14 ret) Public .true. .true. () ), ~div_intrinsic1: (Function (SymbolTable 18 { arg0: (Variable 18 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 18 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 18 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~div_intrinsic1 (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 18 arg0) (Var 18 arg1)] [(Assignment (Var 18 ret) (IntegerBinOp (Var 18 arg0) Div (Var 18 arg1) (Integer 4) () ) () .false. .false. )] (Var 18 ret) Public .true. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 12 s1) (FunctionCall 12 avg_real_s_from_t () [((RealConstant 1.000000 (Real 4) )) ((RealConstant 3.000000 (Real 4) )) ((RealConstant 1.500000 (Real 4) )) ((RealConstant 4.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 12 s2) (FunctionCall 12 avg_real_s_from_s () [((RealConstant 1.100000 (Real 4) )) ((Var 12 s1)) ((RealConstant 2.000000 (Real 4) )) ((Var 12 s1))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 12 i1) (FunctionCall 12 avg_integer_s_from_t () [((IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 20 (Integer 4) Decimal)) ((IntegerConstant 4 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 12 i2) (FunctionCall 12 avg_integer_s_from_s () [((IntegerConstant 1 (Integer 4) Decimal)) ((Var 12 i1)) ((IntegerConstant 15 (Integer 4) Decimal)) ((Var 12 i1))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "s1=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 12 s1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "s2=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 12 s2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "i1=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 12 i1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "i2=" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 12 i2)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), travel_tmpl: (Template (SymbolTable 5 { avg_s_from_s: (Function (SymbolTable 11 { avg: (Variable 11 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 11 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 11 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s1: (Variable 11 s1 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s2: (Variable 11 s2 [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_s (FunctionType [(TypeParameter d ) (TypeParameter s ) (TypeParameter d ) (TypeParameter s )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [d_divided_by_s avg_s_from_t] [(Var 11 d1) (Var 11 s1) (Var 11 d2) (Var 11 s2)] [(Assignment (Var 11 avg) (FunctionCall 5 avg_s_from_t () [((Var 11 d1)) ((FunctionCall 5 d_divided_by_s () [((Var 11 d1)) ((Var 11 s1))] (TypeParameter t ) () () )) ((Var 11 d2)) ((FunctionCall 5 d_divided_by_s () [((Var 11 d2)) ((Var 11 s2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 11 avg) Public .true. .true. () ), avg_s_from_t: (Function (SymbolTable 10 { avg: (Variable 10 avg [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d1: (Variable 10 d1 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d2: (Variable 10 d2 [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t1: (Variable 10 t1 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t2: (Variable 10 t2 [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) avg_s_from_t (FunctionType [(TypeParameter d ) (TypeParameter t ) (TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus_d plus_t d_divided_by_t] [(Var 10 d1) (Var 10 t1) (Var 10 d2) (Var 10 t2)] [(Assignment (Var 10 avg) (FunctionCall 5 d_divided_by_t () [((FunctionCall 5 plus_d () [((Var 10 d1)) ((Var 10 d2))] (TypeParameter d ) () () )) ((FunctionCall 5 plus_t () [((Var 10 t1)) ((Var 10 t2))] (TypeParameter t ) () () ))] (TypeParameter s ) () () ) () .false. .false. )] (Var 10 avg) Public .true. .true. () ), d: (Variable 5 d [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), d_divided_by_s: (Function (SymbolTable 9 { l: (Variable 9 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 9 r [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 9 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_s (FunctionType [(TypeParameter d ) (TypeParameter s )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 9 l) (Var 9 r)] [] (Var 9 res) Private .true. .true. () ), d_divided_by_t: (Function (SymbolTable 8 { l: (Variable 8 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 8 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 8 res [] ReturnVar () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) d_divided_by_t (FunctionType [(TypeParameter d ) (TypeParameter t )] (TypeParameter s ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 8 l) (Var 8 r)] [] (Var 8 res) Private .true. .true. () ), plus_d: (Function (SymbolTable 6 { l: (Variable 6 l [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 6 r [] In () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 6 res [] ReturnVar () () Default (TypeParameter d ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_d (FunctionType [(TypeParameter d ) (TypeParameter d )] (TypeParameter d ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 6 l) (Var 6 r)] [] (Var 6 res) Private .true. .true. () ), plus_t: (Function (SymbolTable 7 { l: (Variable 7 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 7 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 7 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 7 l) (Var 7 r)] [] (Var 7 res) Private .true. .true. () ), s: (Variable 5 s [] In () () Default (TypeParameter s ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) travel_tmpl [d t s plus_d plus_t d_divided_by_t d_divided_by_s] [(Require operation [d plus_d] ) (Require operation [t plus_t] ) (Require operation [d t s d_divided_by_t] ) (Require operation [d s t d_divided_by_s] )] ) }) template_travel_01b_m () [template_travel_01b_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-data1-01ffd6c.json0000664000175000017500000000071715227365530023210 0ustar alastairalastair{ "basename": "ast_f90-data1-01ffd6c", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/data1.f90", "infile_hash": "958a14b00f4c624f5f8c444b2e93bcf090a57ee3c44143ec6671b5f6", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-data1-01ffd6c.stdout", "stdout_hash": "21627f18756312556e43b286cdd1671677c03e63cdf6be55e0c5926c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-types_01-dfa3d3c.stdout0000664000175000017500000000136115227365530023622 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { float r; r = 1.00000000000000000e+00; r = 1.50000000000000000e+00; r = 1.00000000000000000e+00; r = (float)(2); r = (double)(3); } } int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); main2(); Kokkos::finalize(); return 0; } lfortran-0.64.0/tests/reference/llvm-while_02-3db2b04.stdout0000664000175000017500000002077715227365530023624 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %i = alloca i32, align 4 %j = alloca i32, align 4 store i32 0, i32* %i, align 4 store i32 0, i32* %j, align 4 br label %loop.head loop.head: ; preds = %loop.body, %.entry %2 = load i32, i32* %i, align 4 %3 = icmp slt i32 %2, 10 br i1 %3, label %loop.body, label %loop.end loop.body: ; preds = %loop.head %4 = load i32, i32* %i, align 4 %5 = add i32 %4, 1 store i32 %5, i32* %i, align 4 %6 = load i32, i32* %j, align 4 %7 = load i32, i32* %i, align 4 %8 = add i32 %6, %7 store i32 %8, i32* %j, align 4 br label %loop.head loop.end: ; preds = %loop.head %9 = load i32, i32* %j, align 4 %10 = icmp ne i32 %9, 55 br i1 %10, label %then, label %else then: ; preds = %loop.end call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %loop.end br label %ifcont ifcont: ; preds = %else, %then %11 = load i32, i32* %i, align 4 %12 = icmp ne i32 %11, 10 br i1 %12, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 store i32 0, i32* %i, align 4 store i32 0, i32* %j, align 4 br label %loop.head4 loop.head4: ; preds = %ifcont8, %ifcont3 %13 = load i32, i32* %i, align 4 %14 = icmp slt i32 %13, 10 br i1 %14, label %loop.body5, label %loop.end9 loop.body5: ; preds = %loop.head4 %15 = load i32, i32* %i, align 4 %16 = add i32 %15, 1 store i32 %16, i32* %i, align 4 %17 = load i32, i32* %i, align 4 %18 = icmp eq i32 %17, 2 br i1 %18, label %then6, label %else7 then6: ; preds = %loop.body5 br label %loop.end9 unreachable_after_exit: ; No predecessors! br label %ifcont8 else7: ; preds = %loop.body5 br label %ifcont8 ifcont8: ; preds = %else7, %unreachable_after_exit %19 = load i32, i32* %j, align 4 %20 = load i32, i32* %i, align 4 %21 = add i32 %19, %20 store i32 %21, i32* %j, align 4 br label %loop.head4 loop.end9: ; preds = %then6, %loop.head4 %22 = load i32, i32* %j, align 4 %23 = icmp ne i32 %22, 1 br i1 %23, label %then10, label %else11 then10: ; preds = %loop.end9 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont12 else11: ; preds = %loop.end9 br label %ifcont12 ifcont12: ; preds = %else11, %then10 %24 = load i32, i32* %i, align 4 %25 = icmp ne i32 %24, 2 br i1 %25, label %then13, label %else14 then13: ; preds = %ifcont12 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %ifcont12 br label %ifcont15 ifcont15: ; preds = %else14, %then13 store i32 0, i32* %i, align 4 store i32 0, i32* %j, align 4 br label %loop.head16 loop.head16: ; preds = %ifcont20, %then18, %ifcont15 %26 = load i32, i32* %i, align 4 %27 = icmp slt i32 %26, 10 br i1 %27, label %loop.body17, label %loop.end21 loop.body17: ; preds = %loop.head16 %28 = load i32, i32* %i, align 4 %29 = add i32 %28, 1 store i32 %29, i32* %i, align 4 %30 = load i32, i32* %i, align 4 %31 = icmp eq i32 %30, 2 br i1 %31, label %then18, label %else19 then18: ; preds = %loop.body17 br label %loop.head16 unreachable_after_cycle: ; No predecessors! br label %ifcont20 else19: ; preds = %loop.body17 br label %ifcont20 ifcont20: ; preds = %else19, %unreachable_after_cycle %32 = load i32, i32* %j, align 4 %33 = load i32, i32* %i, align 4 %34 = add i32 %32, %33 store i32 %34, i32* %j, align 4 br label %loop.head16 loop.end21: ; preds = %loop.head16 %35 = load i32, i32* %j, align 4 %36 = icmp ne i32 %35, 53 br i1 %36, label %then22, label %else23 then22: ; preds = %loop.end21 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont24 else23: ; preds = %loop.end21 br label %ifcont24 ifcont24: ; preds = %else23, %then22 %37 = load i32, i32* %i, align 4 %38 = icmp ne i32 %37, 10 br i1 %38, label %then25, label %else26 then25: ; preds = %ifcont24 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont27 else26: ; preds = %ifcont24 br label %ifcont27 ifcont27: ; preds = %else26, %then25 br label %return return: ; preds = %ifcont27 br label %FINALIZE_SYMTABLE_while_02 FINALIZE_SYMTABLE_while_02: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) lfortran-0.64.0/tests/reference/asr-template_add_03-43a00f9.stdout0000664000175000017500000015620415227365530024674 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_add_03: (Program (SymbolTable 11 { add_t: (ExternalSymbol 11 add_t 2 add_t template_add_03_m [] add_t Public ), r: (ExternalSymbol 11 r 2 r template_add_03_m [] r Public ), test_template: (ExternalSymbol 11 test_template 2 test_template template_add_03_m [] test_template Public ) }) template_add_03 [template_add_03_m] [(SubroutineCall 11 test_template () [] () .false. )] ), template_add_03_m: (Module (SymbolTable 2 { add_t: (Template (SymbolTable 5 { add_generic: (Function (SymbolTable 7 { x: (Variable 7 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 7 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 7 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_generic (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [f] [(Var 7 x) (Var 7 y)] [(Assignment (Var 7 z) (FunctionCall 5 f () [((Var 7 x)) ((Var 7 y))] (TypeParameter t ) () () ) () .false. .false. )] (Var 7 z) Public .true. .true. () ), f: (Function (SymbolTable 6 { x: (Variable 6 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 6 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 6 x) (Var 6 y)] [] (Var 6 z) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_t [t f] [(Require r [t f] )] ), r: (Requirement (SymbolTable 3 { f: (Function (SymbolTable 4 { x: (Variable 4 x [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 4 z [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 4 x) (Var 4 y)] [] (Var 4 z) Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) r [t f] [] ), test_template: (Function (SymbolTable 8 { add_real: (Function (SymbolTable 10 { x: (Variable 10 x [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 10 y [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 10 z [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [~add_intrinsic] [(Var 10 x) (Var 10 y)] [(Assignment (Var 10 z) (FunctionCall 8 ~add_intrinsic () [((Var 10 x)) ((Var 10 y))] (Real 4) () () ) () .false. .false. )] (Var 10 z) Public .true. .true. () ), x: (Variable 8 x [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 8 ~add [8 ~add_intrinsic] Public ), ~add_intrinsic: (Function (SymbolTable 9 { arg0: (Variable 9 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 9 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 9 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .true. ) [] [(Var 9 arg0) (Var 9 arg1)] [(Assignment (Var 9 ret) (RealBinOp (Var 9 arg0) Add (Var 9 arg1) (Real 4) () ) () .false. .false. )] (Var 9 ret) Public .true. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 8 x) (RealConstant 5.100000 (Real 4) ) () .false. .false. ) (Assignment (Var 8 y) (RealConstant 7.200000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(StringConstant "The result is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (FunctionCall 8 add_real () [((Var 8 x)) ((Var 8 y))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (FunctionCall 8 add_real () [((Var 8 x)) ((Var 8 y))] (Real 4) () () ) Sub (RealConstant 12.300000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] () Public .false. .false. () ) }) template_add_03_m () [template_add_03_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixedform_data-650e309.json0000664000175000017500000000075215227365530024275 0ustar alastairalastair{ "basename": "ast-fixedform_data-650e309", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixedform_data.f", "infile_hash": "6fe89c2b6280304d8c329af8dade86a21e78f1189e2c58fe9cd6916b", "outfile": null, "outfile_hash": null, "stdout": "ast-fixedform_data-650e309.stdout", "stdout_hash": "1d4c551e6cd8a923885aa6c3bfb8ef73afb84fcb771530fd8f296b7d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-print2-785df93.json0000664000175000017500000000072215227365530023310 0ustar alastairalastair{ "basename": "ast_f90-print2-785df93", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/print2.f90", "infile_hash": "6adc0ae191ec271ea11820e431167bc842948bb91bf0b54fe86090f7", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-print2-785df93.stdout", "stdout_hash": "339b33d70462d35147ac0857de0da142cbd503ec76403f1a13ce8546", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_39-1b897aa.stdout0000664000175000017500000000010515227365530023643 0ustar alastairalastair3.E+0 0.E+0 10.E+0 3.E+3 30.E+0 391.E+0 31.E+3 -5.E+0 12.E-6 100.E+9 lfortran-0.64.0/tests/reference/asr-boz_01-dedad59.stdout0000664000175000017500000003127315227365530023270 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { boz_01: (Program (SymbolTable 2 { boz_1: (Variable 2 boz_1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), boz_2: (Variable 2 boz_2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), boz_3: (Variable 2 boz_3 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), boz_4: (Variable 2 boz_4 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), boz_5: (Variable 2 boz_5 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), boz_6: (Variable 2 boz_6 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) boz_01 [] [(Assignment (Var 2 boz_1) (IntrinsicElementalFunction Int [(IntegerConstant 93 (Integer 4) Binary)] 0 (Integer 4) (IntegerConstant 93 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 boz_2) (IntrinsicElementalFunction Int [(IntegerConstant 1255 (Integer 4) Octal)] 0 (Integer 4) (IntegerConstant 1255 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 boz_3) (IntrinsicElementalFunction Int [(IntegerConstant 2748 (Integer 4) Hex)] 0 (Integer 4) (IntegerConstant 2748 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 boz_4) (IntrinsicElementalFunction Int [(IntegerConstant 2541551403008843505 (Integer 4) Hex)] 0 (Integer 4) (IntegerConstant 2541551403008843505 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 boz_5) (IntrinsicElementalFunction Int [(IntegerConstant 2541551403008843505 (Integer 4) Hex)] 0 (Integer 4) (IntegerConstant 2541551403008843505 (Integer 4) Decimal) ) () .false. .false. ) (Assignment (Var 2 boz_6) (IntrinsicElementalFunction Real [(RealConstant 0.000000 (Real 4) )] 0 (Real 4) (RealConstant 0.000000 (Real 4) ) ) () .false. .false. ) (If () (IntegerCompare (Var 2 boz_4) NotEq (Var 2 boz_5) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 boz_1) NotEq (IntegerConstant 93 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 boz_2) NotEq (IntegerConstant 1255 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 boz_3) NotEq (IntegerConstant 2748 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 boz_4) NotEq (IntegerConstant 180150001 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (Var 2 boz_5) NotEq (IntegerConstant 180150001 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 boz_1) (Var 2 boz_2) (Var 2 boz_3) (Var 2 boz_4) (Var 2 boz_5) (Var 2 boz_6)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-continue_compilation_ff_1-c2d5950.json0000664000175000017500000000121115227365530026503 0ustar alastairalastair{ "basename": "asr-continue_compilation_ff_1-c2d5950", "cmd": "lfortran --fixed-form --continue-compilation --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/continue_compilation_ff_1.f", "infile_hash": "47b9434d82b9f62214407204f5a77e005bbb6cdfbb117f341cb3bd4d", "outfile": null, "outfile_hash": null, "stdout": "asr-continue_compilation_ff_1-c2d5950.stdout", "stdout_hash": "fe8ab5da1d35f598109c88caa65559be408a617944a9eaadd4b738bb", "stderr": "asr-continue_compilation_ff_1-c2d5950.stderr", "stderr_hash": "3ca681f4e3ed20bcdecafa1505112e5f90026b0b10633230bd11eb6f", "returncode": 1 }lfortran-0.64.0/tests/reference/llvm-execute_command_line-0e9cd63.json0000664000175000017500000000076415227365530026020 0ustar alastairalastair{ "basename": "llvm-execute_command_line-0e9cd63", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/execute_command_line.f90", "infile_hash": "7a0db461a1008c62034590b9709aea78a170f8cfe3b3d9181dddee66", "outfile": null, "outfile_hash": null, "stdout": "llvm-execute_command_line-0e9cd63.stdout", "stdout_hash": "f2ea6c742324a963e43e392fca6847b1dee12d61f139e39d0265ff19", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_typing1-7a0ea7d.json0000664000175000017500000000101115227365530025006 0ustar alastairalastair{ "basename": "asr-implicit_typing1-7a0ea7d", "cmd": "lfortran --std=f23 --show-asr --disable-implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/implicit_typing1.f90", "infile_hash": "e6d1a0c4cb70b6dec80c447e80d4567c3a25f29c7164e956ddfba662", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_typing1-7a0ea7d.stderr", "stderr_hash": "6341b8dd45d0fd22c074531e4e4fa272486a24c10288fb90b558cf7e", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-arrays_03_func-7c8d572.stdout0000664000175000017500000003442115227365530024576 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_03_func: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), mysum: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 3 r [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mysum (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 a)] [(Assignment (Var 3 r) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 3 a) () (Integer 4) () ) ()) [(Assignment (Var 3 r) (IntegerBinOp (Var 3 r) Add (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Integer 4) ColMajor () ) (Integer 4) () ) () .false. .false. )] [] )] (Var 3 r) Public .true. .true. () ), s: (Variable 2 s [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_03_func [] [(DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 2 x) () (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) ()) [(Assignment (ArrayItem (Var 2 x) [(() (Var 2 i) ())] (Integer 4) ColMajor () ) (Var 2 i) () .false. .false. )] [] ) (Assignment (Var 2 s) (FunctionCall 2 mysum () [((ArrayPhysicalCast (Var 2 x) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 2 s)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 s) NotEq (IntegerConstant 55 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-init1-a99a704.stderr0000664000175000017500000000024615227365530022760 0ustar alastairalastairsyntax error: Invalid syntax for variable initialization (try inserting '::' after the type) --> tests/errors/init1.f90:2:1 | 2 | integer x = 1 | ^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-duplicate_module_procedures-3eaed23.stderr0000664000175000017500000000035415227365530027634 0ustar alastairalastairsemantic error: Entity test_01 is already present in the interface --> tests/errors/duplicate_module_procedures.f90:4:8 | 4 | module procedure test_01, test_01, test_01 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-operator_overloading_08-52825a6.stdout0000664000175000017500000004142115227365530026422 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { operator_overloading_08: (Program (SymbolTable 5 { 1_custom_int_value: (ExternalSymbol 5 1_custom_int_value 3 value operator_overloading_08_mod1 [custom_int] value Public ), a: (Variable 5 a [] Local () () Default (StructType [(Integer 4)] [] .true. .false. ) 5 custom_int Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), custom_div: (ExternalSymbol 5 custom_div 2 custom_div operator_overloading_08_mod1 [] custom_div Public ), custom_int: (ExternalSymbol 5 custom_int 2 custom_int operator_overloading_08_mod1 [] custom_int Public ), ~div: (ExternalSymbol 5 ~div 2 ~div operator_overloading_08_mod1 [] ~div Public ) }) operator_overloading_08 [operator_overloading_08_mod1] [(Assignment (StructInstanceMember (Var 5 a) 5 1_custom_int_value (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Print (StringFormat () [(OverloadedBinOp (Var 5 a) Div (IntegerConstant 0 (Integer 4) Decimal) (Integer 4) () (FunctionCall 5 custom_div 5 ~div [((Var 5 a)) ((IntegerConstant 0 (Integer 4) Decimal))] (StructType [(Integer 4)] [] .true. .false. ) () () ) )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), operator_overloading_08_mod1: (Module (SymbolTable 2 { custom_div: (Function (SymbolTable 4 { 1_custom_int_value: (ExternalSymbol 4 1_custom_int_value 3 value operator_overloading_08_mod1 [custom_int] value Public ), a: (Variable 4 a [] In () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 custom_int Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (StructType [(Integer 4)] [] .true. .false. ) 2 custom_int Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) custom_div (FunctionType [(StructType [(Integer 4)] [] .true. .false. ) (Integer 4)] (StructType [(Integer 4)] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 a) (Var 4 b)] [(Assignment (StructInstanceMember (Var 4 res) 4 1_custom_int_value (Integer 4) () ) (IntegerBinOp (StructInstanceMember (Var 4 a) 4 1_custom_int_value (Integer 4) () ) Div (IntegerBinOp (Var 4 b) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Integer 4) () ) () .false. .false. )] (Var 4 res) Public .true. .true. () ), custom_int: (Struct (SymbolTable 3 { value: (Variable 3 value [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) custom_int (StructType [(Integer 4)] [] .true. .false. ) [] [value] [] Source Public .false. .false. .false. [] () () [] ), ~div: (CustomOperator 2 ~div [2 custom_div] Public ) }) operator_overloading_08_mod1 () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-parameter_05-916c4d8.stdout0000664000175000017500000001257115227365530024245 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { paramter_05: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (Cast (RealConstant 5.000000 (Real 4) ) RealToInteger (Integer 4) (IntegerConstant 5 (Integer 4) Decimal) () ) (IntegerConstant 5 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 5.000000 (Real 8) ) () ) (RealConstant 5.000000 (Real 8) ) Parameter (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) paramter_05 [] [(Print (StringFormat () [(Var 2 x) (Var 2 y) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-goto_02-48f3a02.stderr0000664000175000017500000000103115227365530023645 0ustar alastairalastairstyle suggestion: Use '>' instead of '.gt.' --> tests/../integration_tests/goto_02.f90:10:12 | 10 | if (A.GT.2) go to 95 | ^^^^ help: write this as '>' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/goto_02.f90:13:12 | 13 | if (A.EQ.1) go to 10 | ^^^^ help: write this as '==' style suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/goto_02.f90:25:12 | 25 | if (A.EQ.2) go to 99 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/ast-format_02-1ba2faf.json0000664000175000017500000000074515227365530023403 0ustar alastairalastair{ "basename": "ast-format_02-1ba2faf", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/format_02.f90", "infile_hash": "dcd9a1c68ffaff4df93d7299219c47741479f92da85570eb771f05b3", "outfile": null, "outfile_hash": null, "stdout": "ast-format_02-1ba2faf.stdout", "stdout_hash": "2eb18974f199efd31646dad32db608facf4c98ec2efe98a90ff55349", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/wat-types_04-054550e.json0000664000175000017500000000072515227365530022770 0ustar alastairalastair{ "basename": "wat-types_04-054550e", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/types_04.f90", "infile_hash": "da21466af87608d5d323360a130e0a5542261d98fabaeebb5adc16d3", "outfile": null, "outfile_hash": null, "stdout": "wat-types_04-054550e.stdout", "stdout_hash": "3c10352c3e82dc8c629b030759d05559b9519fcda9afa7bcfada5351", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-complex_dp-ec165b1.json0000664000175000017500000000075015227365530023602 0ustar alastairalastair{ "basename": "asr-complex_dp-ec165b1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_dp.f90", "infile_hash": "2ab8a19155ace703dc52c1f26d2ecea0db08a49637452b31871a40b2", "outfile": null, "outfile_hash": null, "stdout": "asr-complex_dp-ec165b1.stdout", "stdout_hash": "a68af8e37c2058d3fed95e6253d8aa34f91f7d044d2b49123d10c825", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_shape_05-429216b.json0000664000175000017500000000071615227365530024136 0ustar alastairalastair{ "basename": "run-array_shape_05-429216b", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_shape_05.f90", "infile_hash": "275313a71e6777c0d439f8f5c29d24c89ad089be510848d42db10643", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_shape_05-429216b.stderr", "stderr_hash": "9fe5da5f4eb7dafc7abe8435133ceacac60c0a1e45d192384fd6df61", "returncode": 1 }lfortran-0.64.0/tests/reference/llvm-global_scope2-ccffd68.stdout0000664000175000017500000000062015227365530025072 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 0 define void @__lfortran_evaluate_1() { .entry: store i32 6, i32* @x, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return ret void } lfortran-0.64.0/tests/reference/ast-fixedform_doloop-d9fb32d.stdout0000664000175000017500000000343015227365530025447 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(k [] [] () () None ()) (l [] [] () () None ()) (m [] [] () () None ()) (n [] [] () () None ())] () )] [(DoLoop 0 () 0 k 1 10 () [(Print 0 () [k] () )] () () ) (DoLoop 0 () 80 l 1 10 () [(Print 0 () [l] () )] () () ) (DoLoop 0 () 800 m 1 10 () [(Print 0 () [m] () )] () () ) (DoLoop 0 () 8000 n 1 10 () [(Print 0 () [n] () )] () () )] [] )] ) lfortran-0.64.0/tests/reference/run-format3-ee61b31.json0000664000175000017500000000066215227365530023044 0ustar alastairalastair{ "basename": "run-format3-ee61b31", "cmd": "lfortran --no-color {infile}", "infile": "tests/format3.f90", "infile_hash": "416c1b82f5461120638fce27597e42a9721aed16668f49fc146f94d3", "outfile": null, "outfile_hash": null, "stdout": "run-format3-ee61b31.stdout", "stdout_hash": "478638af760ebc36887ce7aaca13365ca0500aceeeb8b18a1d915a5a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_array_01-691b151.json0000664000175000017500000000077515227365530024632 0ustar alastairalastair{ "basename": "asr-template_array_01-691b151", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_array_01.f90", "infile_hash": "6756a93056719ca3ede501254efbeec0d93fdeaf8378cddc308bb5b5", "outfile": null, "outfile_hash": null, "stdout": "asr-template_array_01-691b151.stdout", "stdout_hash": "f6aff7f006d4eaaa9504a0eb30c909fde46877dd1d157a9cd4b04aa4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_types_17-17c3d46.json0000664000175000017500000000077215227365530024556 0ustar alastairalastair{ "basename": "asr-derived_types_17-17c3d46", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_17.f90", "infile_hash": "28433c27ffce2fdaa063d1519081b83d3567a558abf87f26d64558dc", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_17-17c3d46.stdout", "stdout_hash": "f9f90320b033dcfd842a996fe522ed5353f6435ea3ddcb2af433f54e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_array_04b-94baaad.stdout0000664000175000017500000007305015227365530025641 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_array_04b: (Program (SymbolTable 7 { default_behavior: (ExternalSymbol 7 default_behavior 2 default_behavior template_array_04b_m [] default_behavior Public ), swap: (ExternalSymbol 7 swap 2 swap template_array_04b_m [] swap Public ), test_reverse: (ExternalSymbol 7 test_reverse 2 test_reverse template_array_04b_m [] test_reverse Public ) }) template_array_04b [template_array_04b_m] [(SubroutineCall 7 test_reverse () [] () .false. )] ), template_array_04b_m: (Module (SymbolTable 2 { default_behavior: (Requirement (SymbolTable 3 { t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) default_behavior [t] [] ), swap: (Template (SymbolTable 4 { swap: (Function (SymbolTable 5 { tmp: (Variable 5 tmp [] Local () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] InOut () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] InOut () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) swap (FunctionType [(TypeParameter t ) (TypeParameter t )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 x) (Var 5 y)] [(Assignment (Var 5 tmp) (Var 5 x) () .false. .false. ) (Assignment (Var 5 x) (Var 5 y) () .false. .false. ) (Assignment (Var 5 y) (Var 5 tmp) () .false. .false. )] () Private .true. .true. () ), t: (Variable 4 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) swap [t] [(Require default_behavior [t] )] ), test_reverse: (Function (SymbolTable 6 { __instantiated_swap: (Function (SymbolTable 8 { tmp: (Variable 8 tmp [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 8 x [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 8 y [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) __instantiated_swap (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 8 x) (Var 8 y)] [(Assignment (Var 8 tmp) (Var 8 x) () .false. .false. ) (Assignment (Var 8 x) (Var 8 y) () .false. .false. ) (Assignment (Var 8 y) (Var 8 tmp) () .false. .false. )] () Private .true. .true. () ), a: (Variable 6 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_reverse (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 6 a) (ArrayConstant 8 [1, 2] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Print (StringFormat () [(Var 6 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (SubroutineCall 6 __instantiated_swap () [((ArrayItem (Var 6 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 6 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ))] () .false. ) (Print (StringFormat () [(Var 6 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_array_04b_m () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-logical3-4bbf8ea.json0000664000175000017500000000106515227365530023477 0ustar alastairalastair{ "basename": "llvm-logical3-4bbf8ea", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/logical3.f90", "infile_hash": "d7f7994a85ee59f1b3b80060886eeeb7390f9733461bd9349e4bb7c0", "outfile": null, "outfile_hash": null, "stdout": "llvm-logical3-4bbf8ea.stdout", "stdout_hash": "51992588f6050e2b97ae924a6fffa0a2e49a9f8f71a97257b468051a", "stderr": "llvm-logical3-4bbf8ea.stderr", "stderr_hash": "d7e28e54d198e14f86c18ab4c4ad128018b9bc6523fb945b05607a57", "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-operator_overloading_03-d9fd880.json0000664000175000017500000000102215227365530026374 0ustar alastairalastair{ "basename": "llvm-operator_overloading_03-d9fd880", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/operator_overloading_03.f90", "infile_hash": "3340e64f6a134b16739a00f54087bb1816f1e6876ec32e6170275e19", "outfile": null, "outfile_hash": null, "stdout": "llvm-operator_overloading_03-d9fd880.stdout", "stdout_hash": "e49ea24acbbe3c5549c7b610b53425a27592f520ea6950adbcd8db47", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-common_13-fa7cbf0.json0000664000175000017500000000074515227365530023411 0ustar alastairalastair{ "basename": "asr-common_13-fa7cbf0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/common_13.f90", "infile_hash": "c06b84e80775a9b491a5bb86de409be83180247a70c7c75af9e92a4e", "outfile": null, "outfile_hash": null, "stdout": "asr-common_13-fa7cbf0.stdout", "stdout_hash": "66868ae4b5235632e5d965f21ae5be68cfbf89db76df599171fcfc42", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-include1-f5bbd80.stdout0000664000175000017500000000264515227365530023620 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [] [(DoLoop 0 () 1 i 1 2 () [(DoLoop 0 () 2 j 1 3 () [(DoLoop 0 () 2 k 1 4 () [] () () )] () () )] () () )] [] [] ) (Subroutine g [] [] () () [] [] [] [] [(DoLoop 0 () 1 i 1 2 () [(GoTo 0 () 1 [] () )] () () )] [] [] ) (Program main () [] [] [] [(SubroutineCall 0 f [] [] [] [] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-recursion_02-76da7b3.stdout0000664000175000017500000003065415227365530024535 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @__module___lcompilers_created__nested_context__sub1__x = global i32 0 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [12 x i8] c"S-DESC-7,I4\00", align 1 @string_const_data = private constant [7 x i8] c"before:" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data, i32 0, i32 0), i64 7 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [12 x i8] c"S-DESC-6,I4\00", align 1 @string_const_data.2 = private constant [6 x i8] c"after:" @string_const.3 = private global %string_descriptor <{ i8* getelementptr inbounds ([6 x i8], [6 x i8]* @string_const_data.2, i32 0, i32 0), i64 6 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [12 x i8] c"S-DESC-9,I4\00", align 1 @string_const_data.5 = private constant [9 x i8] c"x in getx" @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([9 x i8], [9 x i8]* @string_const_data.5, i32 0, i32 0), i64 9 }> @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.7 = private constant [7 x i8] c"in sub1" @string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([7 x i8], [7 x i8]* @string_const_data.7, i32 0, i32 0), i64 7 }> @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.9 = private unnamed_addr constant [12 x i8] c"S-DESC-3,I4\00", align 1 @string_const_data.10 = private constant [3 x i8] c"r =" @string_const.11 = private global %string_descriptor <{ i8* getelementptr inbounds ([3 x i8], [3 x i8]* @string_const_data.10, i32 0, i32 0), i64 3 }> @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @__module_recursion_02_solver(i32 ()* %f, i32* %iter) { .entry: %stringFormat_desc2 = alloca %string_descriptor, align 8 %call_arg_value1 = alloca i32, align 4 %call_arg_value = alloca i32, align 4 %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %f_val = alloca i32, align 4 %solver = alloca i32, align 4 %1 = call i32 %f() store i32 %1, i32* %f_val, align 4 %2 = alloca i64, align 8 %3 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info, i32 0, i32 0), i64* %2, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const, i32* %f_val) %4 = load i64, i64* %2, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %3, i8** %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %4, i64* %6, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %8 = load i8*, i8** %7, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %10 = load i64, i64* %9, align 8 %11 = trunc i64 %10 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %8, i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %12 = icmp eq i8* %3, null br i1 %12, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %3) br label %free_done free_done: ; preds = %free_nonnull, %.entry store i32 2, i32* %call_arg_value, align 4 %13 = load i32, i32* %iter, align 4 %14 = sub i32 %13, 1 store i32 %14, i32* %call_arg_value1, align 4 %15 = call i32 @__module_recursion_02_sub1(i32* %call_arg_value, i32* %call_arg_value1) store i32 %15, i32* %solver, align 4 %16 = call i32 %f() store i32 %16, i32* %f_val, align 4 %17 = alloca i64, align 8 %18 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.1, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.3, i32* %f_val) %19 = load i64, i64* %17, align 8 %20 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 store i8* %18, i8** %20, align 8 %21 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 store i64 %19, i64* %21, align 8 %22 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 0 %23 = load i8*, i8** %22, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc2, i32 0, i32 1 %25 = load i64, i64* %24, align 8 %26 = trunc i64 %25 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %23, i32 %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %27 = icmp eq i8* %18, null br i1 %27, label %free_done4, label %free_nonnull3 free_nonnull3: ; preds = %free_done call void @_lfortran_free_alloc(i8* %0, i8* %18) br label %free_done4 free_done4: ; preds = %free_nonnull3, %free_done br label %return return: ; preds = %free_done4 br label %FINALIZE_SYMTABLE_solver FINALIZE_SYMTABLE_solver: ; preds = %return %28 = load i32, i32* %solver, align 4 ret i32 %28 } declare i32 @f() define i32 @__module_recursion_02_sub1(i32* %y, i32* %iter) { .entry: %sub1 = alloca i32, align 4 %tmp = alloca i32, align 4 %x = alloca i32, align 4 %0 = load i32, i32* %y, align 4 store i32 %0, i32* %x, align 4 %1 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %1, i32 7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %2 = load i32, i32* %iter, align 4 %3 = icmp eq i32 %2, 1 br i1 %3, label %then, label %else then: ; preds = %.entry store i32 1, i32* %sub1, align 4 br label %return unreachable_after_return: ; No predecessors! br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %unreachable_after_return %4 = load i32, i32* %x, align 4 store i32 %4, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %5 = call i32 @sub1.__module_recursion_02_getx() store i32 %5, i32* %tmp, align 4 %6 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %6, i32* %x, align 4 %7 = load i32, i32* %x, align 4 store i32 %7, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 %8 = call i32 @__module_recursion_02_solver(i32 ()* @sub1.__module_recursion_02_getx, i32* %iter) store i32 %8, i32* %sub1, align 4 %9 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %9, i32* %x, align 4 br label %return return: ; preds = %ifcont, %then br label %FINALIZE_SYMTABLE_sub1 FINALIZE_SYMTABLE_sub1: ; preds = %return %10 = load i32, i32* %sub1, align 4 ret i32 %10 } define i32 @sub1.__module_recursion_02_getx() { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %0 = call i8* @_lfortran_get_default_allocator() %getx = alloca i32, align 4 %1 = alloca i64, align 8 %2 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %0, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.4, i32 0, i32 0), i64* %1, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.6, i32* @__module___lcompilers_created__nested_context__sub1__x) %3 = load i64, i64* %1, align 8 %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %2, i8** %4, align 8 %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %3, i64* %5, align 8 %6 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %7 = load i8*, i8** %6, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %9 = load i64, i64* %8, align 8 %10 = trunc i64 %9 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %7, i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %11 = icmp eq i8* %2, null br i1 %11, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %0, i8* %2) br label %free_done free_done: ; preds = %free_nonnull, %.entry %12 = load i32, i32* @__module___lcompilers_created__nested_context__sub1__x, align 4 store i32 %12, i32* %getx, align 4 br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_getx FINALIZE_SYMTABLE_getx: ; preds = %return %13 = load i32, i32* %getx, align 4 ret i32 %13 } declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() %call_arg_value1 = alloca i32, align 4 %call_arg_value = alloca i32, align 4 call void @_lpython_call_initial_functions(i32 %0, i8** %1) %r = alloca i32, align 4 store i32 3, i32* %call_arg_value, align 4 store i32 3, i32* %call_arg_value1, align 4 %3 = call i32 @__module_recursion_02_sub1(i32* %call_arg_value, i32* %call_arg_value1) store i32 %3, i32* %r, align 4 %4 = alloca i64, align 8 %5 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.9, i32 0, i32 0), i64* %4, i32 0, i32 0, i32 0, i32 0, i32 0, %string_descriptor* @string_const.11, i32* %r) %6 = load i64, i64* %4, align 8 %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %5, i8** %7, align 8 %8 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %6, i64* %8, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %10 = load i8*, i8** %9, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %12 = load i64, i64* %11, align 8 %13 = trunc i64 %12 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %10, i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %14 = icmp eq i8* %5, null br i1 %14, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %5) br label %free_done free_done: ; preds = %free_nonnull, %.entry br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_main FINALIZE_SYMTABLE_main: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-types_04-056d321.stdout0000664000175000017500000003162215227365530023330 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { types_04: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) types_04 [] [(Assignment (Var 2 r) (RealConstant 1.500000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 x) (Cast (IntegerBinOp (Var 2 i) Mul (Var 2 i) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Mul (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Mul (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Mul (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (Cast (IntegerBinOp (Var 2 i) Add (Var 2 i) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Add (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Add (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Add (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (Cast (IntegerBinOp (Var 2 i) Sub (Var 2 i) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Sub (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Sub (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Sub (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (Cast (IntegerBinOp (Var 2 i) Div (Var 2 i) (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Div (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Cast (Var 2 i) IntegerToReal (Real 4) () () ) Div (Var 2 r) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 x) (RealBinOp (Var 2 r) Div (Cast (Var 2 i) IntegerToReal (Real 4) () () ) (Real 4) () ) () .false. .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_25-0bdc4b7.json0000664000175000017500000000071515227365530023345 0ustar alastairalastair{ "basename": "run-format_25-0bdc4b7", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_25.f90", "infile_hash": "cb35907bcd56b0eb47a987a7dea054ef0a376978f17c94d49fa1b90f", "outfile": null, "outfile_hash": null, "stdout": "run-format_25-0bdc4b7.stdout", "stdout_hash": "c16842418a1b5859dc18ab87bcfdaac17a23e7073539f54a7f98378d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-fn4-83c4d1a.json0000664000175000017500000000071115227365530022615 0ustar alastairalastair{ "basename": "ast_f90-fn4-83c4d1a", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/fn4.f90", "infile_hash": "35fb507c50c885547daa8eef3f01aa0be9b3eb6db98d824ad6f51bc9", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-fn4-83c4d1a.stdout", "stdout_hash": "d3a07020fcd3d38933f01299e50000f5eae3e32ee3f21beccbea58b0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_openmp-pragma1-25cfcb2.stdout0000664000175000017500000004302515227365530025011 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { a1: (Function (SymbolTable 2 { a: (Variable 2 a [n] In () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [n] Out () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) a1 (FunctionType [(Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 2 n) (Var 2 a) (Var 2 b)] [(OMPRegion ParallelDo [] [(DoLoop () ((Var 2 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 2 n) ()) [(Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Real 4) ColMajor () ) (RealBinOp (RealBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Real 4) ColMajor () ) Add (ArrayItem (Var 2 a) [(() (IntegerBinOp (Var 2 i) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ())] (Real 4) ColMajor () ) (Real 4) () ) Div (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) (Real 4) () ) () .false. .false. )] [] )] )] () Public .true. .true. () ), parallel_sum: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), partial_sum: (Variable 3 partial_sum [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), total_sum: (Variable 3 total_sum [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) parallel_sum (FunctionType [(Integer 4) (Array (Integer 4) [(() ())] DescriptorArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 n) (Var 3 a)] [(Assignment (Var 3 partial_sum) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 total_sum) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. ) (OMPRegion Parallel [(OMPPrivate [(Var 3 partial_sum)] ) (OMPShared [(Var 3 total_sum)] )] [(OMPRegion Do [] [(DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (Var 3 n) ()) [(Assignment (Var 3 partial_sum) (IntegerBinOp (Var 3 partial_sum) Add (ArrayItem (Var 3 a) [(() (Var 3 i) ())] (Integer 4) ColMajor () ) (Integer 4) () ) () .false. .false. )] [] )] )] )] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr_preprocess-cpp_err7-2a5424f.json0000664000175000017500000000076015227365530025360 0ustar alastairalastair{ "basename": "asr_preprocess-cpp_err7-2a5424f", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp_err7.f90", "infile_hash": "f292f0e2aa8cc1376743882c76f94abf372158371633d7ed21edf469", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp_err7-2a5424f.stderr", "stderr_hash": "91fde58cd0993ee4c8062a3bab54ab57e745a49736a51e082f11d7ea", "returncode": 2 }lfortran-0.64.0/tests/reference/run-file_open_06-cc72219.json0000664000175000017500000000072615227365530023663 0ustar alastairalastair{ "basename": "run-file_open_06-cc72219", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/file_open_06.f90", "infile_hash": "38c29295a37c9aac5fa968468906167d4e5ae77bcf9aa7cce4be6d1b", "outfile": null, "outfile_hash": null, "stdout": "run-file_open_06-cc72219.stdout", "stdout_hash": "a8b3c28327d978bed230e9f55e67dc389ca40a82fbc5251d574c636e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-subroutine3-9c6f5d1.json0000664000175000017500000000073515227365530023750 0ustar alastairalastair{ "basename": "asr-subroutine3-9c6f5d1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/subroutine3.f90", "infile_hash": "7d760144ce6e5f0307d6d35c1d27ab357dc88df82f61cd5d6058d75f", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-subroutine3-9c6f5d1.stderr", "stderr_hash": "ffe0a4412cffe166df5f25b690125e6886c03e45343fb76b900fd1fa", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-entry_06-b57385d.stdout0000664000175000017500000010431615227365530023425 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { entry_06: (Program (SymbolTable 5 { mvndfn: (Function (SymbolTable 6 { mvndfn: (Variable 6 mvndfn [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 6 w [] Unspecified () () Default (Array (Real 8) [(() ())] UnboundedPointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mvndfn (FunctionType [(Array (Real 8) [(() ())] UnboundedPointerArray )] (Real 8) Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 w)] [] (Var 6 mvndfn) Public .false. .false. () ), w: (Variable 5 w [] Local () () Default (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) entry_06 [] [(If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (FunctionCall 5 mvndfn () [((ArrayPhysicalCast (Var 5 w) FixedSizeArray UnboundedPointerArray (Array (Real 8) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] UnboundedPointerArray ) () ))] (Real 8) () () ) Sub (RealConstant 1.200000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ), mvndfn: (Function (SymbolTable 2 { mvndfn: (Variable 2 mvndfn [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 2 w [] Unspecified () () Default (Array (Real 8) [(() ())] UnboundedPointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mvndfn (FunctionType [(Array (Real 8) [(() ())] UnboundedPointerArray )] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [mvndfn_main__lcompilers] [(Var 2 w)] [(Assignment (Var 2 mvndfn) (FunctionCall 1 mvndfn_main__lcompilers 1 mvndfn_main__lcompilers [((IntegerConstant 1 (Integer 4) Decimal)) ((Var 2 w))] (Real 8) () () ) () .false. .false. )] (Var 2 mvndfn) Public .true. .true. () ), mvndfn_main__lcompilers: (Function (SymbolTable 4 { entry__lcompilers: (Variable 4 entry__lcompilers [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), mvndfn: (Variable 4 mvndfn [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), mvndfn_main__lcompilers: (Variable 4 mvndfn_main__lcompilers [] ReturnVar () () Default (Real 8) 4 mvndfn Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 4 w [] Unspecified () () Default (Array (Real 8) [(() ())] UnboundedPointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mvndfn_main__lcompilers (FunctionType [(Integer 4) (Array (Real 8) [(() ())] UnboundedPointerArray )] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 entry__lcompilers) (Var 4 w)] [(If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 1 1 )] [] ) (If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 2 2 )] [] ) (GoToTarget 1 1 ) (Assignment (ArrayItem (Var 4 w) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (RealConstant 10.900000 (Real 8) ) () .false. .false. ) (Assignment (ArrayItem (Var 4 w) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (RealConstant 10.900000 (Real 8) ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 4 w) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) Sub (RealConstant 10.900000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 4 w) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) Sub (RealConstant 10.900000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 4 mvndfn_main__lcompilers) (RealConstant 1.200000 (Real 8) ) () .false. .false. ) (GoToTarget 2 2 ) (Assignment (ArrayItem (Var 4 w) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (RealConstant 10.900000 (Real 8) ) () .false. .false. ) (Assignment (ArrayItem (Var 4 w) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) (RealConstant 10.900000 (Real 8) ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 4 w) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) Sub (RealConstant 10.900000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 4 w) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 8) ColMajor () ) Sub (RealConstant 10.900000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (Var 4 mvndfn_main__lcompilers) (RealConstant 1.200000 (Real 8) ) () .false. .false. )] (Var 4 mvndfn_main__lcompilers) Public .true. .true. () ), mvndnt: (Function (SymbolTable 3 { mvndfn: (Variable 3 mvndfn [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), mvndnt: (Variable 3 mvndnt [] ReturnVar () () Default (Real 8) 3 mvndfn Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), w: (Variable 3 w [] Local () () Default (Pointer (Array (Real 8) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) mvndnt (FunctionType [] (Real 8) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [mvndfn_main__lcompilers] [] [(Assignment (Var 3 mvndnt) (FunctionCall 1 mvndfn_main__lcompilers 1 mvndfn_main__lcompilers [((IntegerConstant 2 (Integer 4) Decimal)) ((Var 3 w))] (Real 8) () () ) () .false. .false. )] (Var 3 mvndnt) Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_triple-54fa485.stdout0000664000175000017500000054447015227365530025161 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { math_integer_m: (Module (SymbolTable 2 { add_integer: (Function (SymbolTable 3 { result: (Variable 3 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 3 x) (Var 3 y)] [(Assignment (Var 3 result) (IntegerBinOp (Var 3 x) Add (Var 3 y) (Integer 4) () ) () .false. .false. )] (Var 3 result) Public .true. .true. () ), max_integer: (Function (SymbolTable 5 { result: (Variable 5 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 5 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 5 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) max_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 5 x) (Var 5 y)] [(Assignment (Var 5 result) (IntrinsicElementalFunction Max [(Var 5 x) (Var 5 y)] 0 (Integer 4) () ) () .false. .false. )] (Var 5 result) Public .true. .true. () ), min_integer: (Function (SymbolTable 6 { result: (Variable 6 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 6 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 6 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) min_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 6 x) (Var 6 y)] [(Assignment (Var 6 result) (IntrinsicElementalFunction Min [(Var 6 x) (Var 6 y)] 0 (Integer 4) () ) () .false. .false. )] (Var 6 result) Public .true. .true. () ), minus_integer: (Function (SymbolTable 4 { result: (Variable 4 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 4 y [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus_integer (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 x) (Var 4 y)] [(Assignment (Var 4 result) (IntegerBinOp (Var 4 x) Sub (Var 4 y) (Integer 4) () ) () .false. .false. )] (Var 4 result) Public .true. .true. () ), one_integer: (Function (SymbolTable 8 { result: (Variable 8 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) one_integer (FunctionType [] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 8 result) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. )] (Var 8 result) Public .true. .true. () ), zero_integer: (Function (SymbolTable 7 { result: (Variable 7 result [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_integer (FunctionType [] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 7 result) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 7 result) Public .true. .true. () ) }) math_integer_m () [] .false. .false. .false. ), math_real_m: (Module (SymbolTable 9 { add_real: (Function (SymbolTable 10 { result: (Variable 10 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 10 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 10 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 10 x) (Var 10 y)] [(Assignment (Var 10 result) (RealBinOp (Var 10 x) Add (Var 10 y) (Real 4) () ) () .false. .false. )] (Var 10 result) Public .true. .true. () ), max_real: (Function (SymbolTable 13 { result: (Variable 13 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 13 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 13 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) max_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 13 x) (Var 13 y)] [(Assignment (Var 13 result) (IntrinsicElementalFunction Max [(Var 13 x) (Var 13 y)] 0 (Real 4) () ) () .false. .false. )] (Var 13 result) Public .true. .true. () ), min_real: (Function (SymbolTable 14 { result: (Variable 14 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 14 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 14 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) min_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 14 x) (Var 14 y)] [(Assignment (Var 14 result) (IntrinsicElementalFunction Min [(Var 14 x) (Var 14 y)] 0 (Real 4) () ) () .false. .false. )] (Var 14 result) Public .true. .true. () ), minus_real: (Function (SymbolTable 11 { result: (Variable 11 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 11 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 11 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) minus_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 11 x) (Var 11 y)] [(Assignment (Var 11 result) (RealBinOp (Var 11 x) Sub (Var 11 y) (Real 4) () ) () .false. .false. )] (Var 11 result) Public .true. .true. () ), one_real: (Function (SymbolTable 16 { result: (Variable 16 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) one_real (FunctionType [] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 16 result) (RealConstant 1.000000 (Real 4) ) () .false. .false. )] (Var 16 result) Public .true. .true. () ), slash_real: (Function (SymbolTable 12 { result: (Variable 12 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 12 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 12 y [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) slash_real (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 12 x) (Var 12 y)] [(Assignment (Var 12 result) (RealBinOp (Var 12 x) Div (Var 12 y) (Real 4) () ) () .false. .false. )] (Var 12 result) Public .true. .true. () ), zero_real: (Function (SymbolTable 15 { result: (Variable 15 result [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) zero_real (FunctionType [] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 15 result) (RealConstant 0.000000 (Real 4) ) () .false. .false. )] (Var 15 result) Public .true. .true. () ) }) math_real_m () [] .false. .false. .false. ), template_triple: (Program (SymbolTable 34 { add_integer: (ExternalSymbol 34 add_integer 2 add_integer math_integer_m [] add_integer Public ), add_real: (ExternalSymbol 34 add_real 9 add_real math_real_m [] add_real Public ), magma_r: (ExternalSymbol 34 magma_r 17 magma_r triple_m [] magma_r Public ), max_integer: (ExternalSymbol 34 max_integer 2 max_integer math_integer_m [] max_integer Public ), max_real: (ExternalSymbol 34 max_real 9 max_real math_real_m [] max_real Public ), min_integer: (ExternalSymbol 34 min_integer 2 min_integer math_integer_m [] min_integer Public ), min_real: (ExternalSymbol 34 min_real 9 min_real math_real_m [] min_real Public ), minus_integer: (ExternalSymbol 34 minus_integer 2 minus_integer math_integer_m [] minus_integer Public ), minus_real: (ExternalSymbol 34 minus_real 9 minus_real math_real_m [] minus_real Public ), one_integer: (ExternalSymbol 34 one_integer 2 one_integer math_integer_m [] one_integer Public ), one_real: (ExternalSymbol 34 one_real 9 one_real math_real_m [] one_real Public ), slash_real: (ExternalSymbol 34 slash_real 9 slash_real math_real_m [] slash_real Public ), test_add_triples: (ExternalSymbol 34 test_add_triples 24 test_add_triples use_triple_m [] test_add_triples Public ), test_max_triples: (ExternalSymbol 34 test_max_triples 24 test_max_triples use_triple_m [] test_max_triples Public ), test_minus_triples: (ExternalSymbol 34 test_minus_triples 24 test_minus_triples use_triple_m [] test_minus_triples Public ), triple_tmpl: (ExternalSymbol 34 triple_tmpl 17 triple_tmpl triple_m [] triple_tmpl Public ), zero_integer: (ExternalSymbol 34 zero_integer 2 zero_integer math_integer_m [] zero_integer Public ), zero_real: (ExternalSymbol 34 zero_real 9 zero_real math_real_m [] zero_real Public ) }) template_triple [use_triple_m math_integer_m math_real_m triple_m] [(SubroutineCall 34 test_add_triples () [] () .false. ) (SubroutineCall 34 test_minus_triples () [] () .false. ) (SubroutineCall 34 test_max_triples () [] () .false. )] ), triple_m: (Module (SymbolTable 17 { magma_r: (Requirement (SymbolTable 18 { plus_t: (Function (SymbolTable 19 { l: (Variable 19 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 19 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 19 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 19 l) (Var 19 r)] [] (Var 19 total) Private .true. .true. () ), t: (Variable 18 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) magma_r [t plus_t] [] ), triple_tmpl: (Template (SymbolTable 20 { plus_t: (Function (SymbolTable 21 { l: (Variable 21 l [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 21 r [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), total: (Variable 21 total [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) plus_t (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .true. ) [] [(Var 21 l) (Var 21 r)] [] (Var 21 total) Private .true. .true. () ), t: (Variable 20 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), triple_l: (Function (SymbolTable 22 { result: (Variable 22 result [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 22 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_l (FunctionType [(TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus_t] [(Var 22 t)] [(Assignment (Var 22 result) (FunctionCall 20 plus_t () [((FunctionCall 20 plus_t () [((Var 22 t)) ((Var 22 t))] (TypeParameter t ) () () )) ((Var 22 t))] (TypeParameter t ) () () ) () .false. .false. )] (Var 22 result) Public .true. .true. () ), triple_r: (Function (SymbolTable 23 { result: (Variable 23 result [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 23 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_r (FunctionType [(TypeParameter t )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [plus_t] [(Var 23 t)] [(Assignment (Var 23 result) (FunctionCall 20 plus_t () [((Var 23 t)) ((FunctionCall 20 plus_t () [((Var 23 t)) ((Var 23 t))] (TypeParameter t ) () () ))] (TypeParameter t ) () () ) () .false. .false. )] (Var 23 result) Public .true. .true. () ) }) triple_tmpl [t plus_t] [(Require magma_r [t plus_t] )] ) }) triple_m () [triple_m] .false. .false. .false. ), use_triple_m: (Module (SymbolTable 24 { add_integer: (ExternalSymbol 24 add_integer 2 add_integer math_integer_m [] add_integer Public ), add_real: (ExternalSymbol 24 add_real 9 add_real math_real_m [] add_real Public ), magma_r: (ExternalSymbol 24 magma_r 17 magma_r triple_m [] magma_r Public ), max_integer: (ExternalSymbol 24 max_integer 2 max_integer math_integer_m [] max_integer Public ), max_real: (ExternalSymbol 24 max_real 9 max_real math_real_m [] max_real Public ), min_integer: (ExternalSymbol 24 min_integer 2 min_integer math_integer_m [] min_integer Public ), min_real: (ExternalSymbol 24 min_real 9 min_real math_real_m [] min_real Public ), minus_integer: (ExternalSymbol 24 minus_integer 2 minus_integer math_integer_m [] minus_integer Public ), minus_real: (ExternalSymbol 24 minus_real 9 minus_real math_real_m [] minus_real Public ), one_integer: (ExternalSymbol 24 one_integer 2 one_integer math_integer_m [] one_integer Public ), one_real: (ExternalSymbol 24 one_real 9 one_real math_real_m [] one_real Public ), slash_real: (ExternalSymbol 24 slash_real 9 slash_real math_real_m [] slash_real Public ), test_add_triples: (Function (SymbolTable 25 { tal: (Variable 25 tal [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tar: (Variable 25 tar [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), triple_add_l: (Function (SymbolTable 26 { result: (Variable 26 result [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 26 t [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_add_l (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 26 t)] [(Assignment (Var 26 result) (FunctionCall 24 add_integer () [((FunctionCall 24 add_integer () [((Var 26 t)) ((Var 26 t))] (Integer 4) () () )) ((Var 26 t))] (Integer 4) () () ) () .false. .false. )] (Var 26 result) Public .true. .true. () ), triple_add_r: (Function (SymbolTable 27 { result: (Variable 27 result [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 27 t [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_add_r (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 27 t)] [(Assignment (Var 27 result) (FunctionCall 24 add_integer () [((Var 27 t)) ((FunctionCall 24 add_integer () [((Var 27 t)) ((Var 27 t))] (Integer 4) () () ))] (Integer 4) () () ) () .false. .false. )] (Var 27 result) Public .true. .true. () ) }) test_add_triples (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 25 tal) (FunctionCall 25 triple_add_l () [((IntegerConstant 7 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 25 tar) (FunctionCall 25 triple_add_r () [((IntegerConstant 7 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "tal = " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 25 tal) (StringConstant " tar = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 25 tar)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), test_max_triples: (Function (SymbolTable 31 { tmaxl: (Variable 31 tmaxl [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmaxr: (Variable 31 tmaxr [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), triple_max_l: (Function (SymbolTable 32 { result: (Variable 32 result [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 32 t [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_max_l (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 32 t)] [(Assignment (Var 32 result) (FunctionCall 24 max_real () [((FunctionCall 24 max_real () [((Var 32 t)) ((Var 32 t))] (Real 4) () () )) ((Var 32 t))] (Real 4) () () ) () .false. .false. )] (Var 32 result) Public .true. .true. () ), triple_max_r: (Function (SymbolTable 33 { result: (Variable 33 result [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 33 t [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_max_r (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 33 t)] [(Assignment (Var 33 result) (FunctionCall 24 max_real () [((Var 33 t)) ((FunctionCall 24 max_real () [((Var 33 t)) ((Var 33 t))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 33 result) Public .true. .true. () ) }) test_max_triples (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 31 tmaxl) (FunctionCall 31 triple_max_l () [((RealConstant 7.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 31 tmaxr) (FunctionCall 31 triple_max_r () [((RealConstant 7.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "tmaxl =" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 31 tmaxl) (StringConstant " tmaxr =" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 31 tmaxr)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), test_minus_triples: (Function (SymbolTable 28 { tml: (Variable 28 tml [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmr: (Variable 28 tmr [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), triple_minus_l: (Function (SymbolTable 29 { result: (Variable 29 result [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 29 t [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_minus_l (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 29 t)] [(Assignment (Var 29 result) (FunctionCall 24 minus_real () [((FunctionCall 24 minus_real () [((Var 29 t)) ((Var 29 t))] (Real 4) () () )) ((Var 29 t))] (Real 4) () () ) () .false. .false. )] (Var 29 result) Public .true. .true. () ), triple_minus_r: (Function (SymbolTable 30 { result: (Variable 30 result [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), t: (Variable 30 t [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) triple_minus_r (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 30 t)] [(Assignment (Var 30 result) (FunctionCall 24 minus_real () [((Var 30 t)) ((FunctionCall 24 minus_real () [((Var 30 t)) ((Var 30 t))] (Real 4) () () ))] (Real 4) () () ) () .false. .false. )] (Var 30 result) Public .true. .true. () ) }) test_minus_triples (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 28 tml) (FunctionCall 28 triple_minus_l () [((RealConstant 7.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Assignment (Var 28 tmr) (FunctionCall 28 triple_minus_r () [((RealConstant 7.000000 (Real 4) ))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(StringConstant "tml = " (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 28 tml) (StringConstant " tmr = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 28 tmr)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), triple_tmpl: (ExternalSymbol 24 triple_tmpl 17 triple_tmpl triple_m [] triple_tmpl Public ), zero_integer: (ExternalSymbol 24 zero_integer 2 zero_integer math_integer_m [] zero_integer Public ), zero_real: (ExternalSymbol 24 zero_real 9 zero_real math_real_m [] zero_real Public ) }) use_triple_m () [math_integer_m math_real_m triple_m use_triple_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-derived_types_16_module-4aac273.json0000664000175000017500000000101715227365530026164 0ustar alastairalastair{ "basename": "asr-derived_types_16_module-4aac273", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/derived_types_16_module.f90", "infile_hash": "81550c6abc6abf36b4e475e6f0297fe376befa5adbc94ae398f33526", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_types_16_module-4aac273.stdout", "stdout_hash": "5464795b6e2d35f8243b2034673c4e5714b4f8b92c5217e7d2984d43", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-arrays_01_size-b2012a6.stdout0000664000175000017500000000313015227365530025075 0ustar alastairalastairfunction main() local a::Array{Int32, 1} local b::Array{Int32, 1} local i::Int32 local size_a::Int32 local size_b::Int32 size_a = length(a) size_b = size(b)[1] if size_a ≠ 3 println(Base.stderr, "ERROR STOP") exit(1) end if size_b ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end for i ∈ 1:size_a a[i] = i + 10 end if a[1] ≠ 11 println(Base.stderr, "ERROR STOP") exit(1) end if a[2] ≠ 12 println(Base.stderr, "ERROR STOP") exit(1) end if a[3] ≠ 13 println(Base.stderr, "ERROR STOP") exit(1) end for i ∈ 11:10 + size_b b[i - 10] = i end if b[1] ≠ 11 println(Base.stderr, "ERROR STOP") exit(1) end if b[2] ≠ 12 println(Base.stderr, "ERROR STOP") exit(1) end if b[3] ≠ 13 println(Base.stderr, "ERROR STOP") exit(1) end if b[4] ≠ 14 println(Base.stderr, "ERROR STOP") exit(1) end for i ∈ 1:size_a b[i] = a[i] - 10 end if b[1] ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if b[2] ≠ 2 println(Base.stderr, "ERROR STOP") exit(1) end if b[3] ≠ 3 println(Base.stderr, "ERROR STOP") exit(1) end b[4] = b[1] + b[2] + b[3] + a[1] if b[4] ≠ 17 println(Base.stderr, "ERROR STOP") exit(1) end b[4] = a[1] if b[4] ≠ 11 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/asr-intrinsics_05-4c31742.stdout0000664000175000017500000001064615227365530024360 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { intrinsics_05: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) intrinsics_05 [] [(Assignment (Var 2 x) (IntrinsicElementalFunction Sinh [(RealConstant 1.000000 (Real 4) )] 0 (Real 4) (RealConstant 1.175201 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Cosh [(RealConstant 1.000000 (Real 4) )] 0 (Real 4) (RealConstant 1.543081 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (IntrinsicElementalFunction Tanh [(RealConstant 1.000000 (Real 4) )] 0 (Real 4) (RealConstant 0.761594 (Real 4) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_global_stmts-expr1-213371d.stdout0000664000175000017500000000411215227365530025645 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. )] (Var 2 f1) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-continue_compilation_2-a6145a1.json0000664000175000017500000000101615227365530026023 0ustar alastairalastair{ "basename": "asr-continue_compilation_2-a6145a1", "cmd": "lfortran --semantics-only --continue-compilation --no-color {infile}", "infile": "tests/errors/continue_compilation_2.f90", "infile_hash": "8d83437b6c7897080497aedff0a2914ff625b77fe9532b5bee93b373", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-continue_compilation_2-a6145a1.stderr", "stderr_hash": "301f6f7badd891d59afe44c3a1ab880018950d4beeee7f9aa83b2511", "returncode": 1 }lfortran-0.64.0/tests/reference/cpp-fn2-ff8ef37.stdout0000664000175000017500000000135315227365530022605 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations int32_t a(); float b(); bool c(); int32_t d(); float e(); bool f(); // Implementations int32_t a() { int32_t a; return a; } float b() { float b; return b; } bool c() { bool c; return c; } int32_t d() { int32_t r; return r; } float e() { float r; return r; } bool f() { bool r; return r; } lfortran-0.64.0/tests/reference/wat-if_04-1d3b97a.json0000664000175000017500000000103015227365530022353 0ustar alastairalastair{ "basename": "wat-if_04-1d3b97a", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/if_04.f90", "infile_hash": "dc3029f2df7281746bd116d435ee39913201c693d801c2e53aca3886", "outfile": null, "outfile_hash": null, "stdout": "wat-if_04-1d3b97a.stdout", "stdout_hash": "79a69e07bcecedfc95012ed1f1dcc4e012e1e7cbf351bd25c5f1ad20", "stderr": "wat-if_04-1d3b97a.stderr", "stderr_hash": "8b854a8be811f407b5f543a37121d6b73b7265ed8b67dc1c76a42d63", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allocate_03-8219a72.json0000664000175000017500000000075315227365530023410 0ustar alastairalastair{ "basename": "asr-allocate_03-8219a72", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/allocate_03.f90", "infile_hash": "1f3440c7b139aaa793981c1458c516ddc41106d2950a39f47077b0f5", "outfile": null, "outfile_hash": null, "stdout": "asr-allocate_03-8219a72.stdout", "stdout_hash": "ef22d1c0e6cbf25b3bb9f03ca3211d329df5867aa325c2f9a3795788", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-nested_02-726d5e8.json0000664000175000017500000000075015227365530023356 0ustar alastairalastair{ "basename": "llvm-nested_02-726d5e8", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_02.f90", "infile_hash": "6ff700b8b837d9efad78b5ed4d8defc823333a19f8afa37c7da6899d", "outfile": null, "outfile_hash": null, "stdout": "llvm-nested_02-726d5e8.stdout", "stdout_hash": "8ed77d065ae8eff53ca5498af477f8ebe41609362434d7ce1e668639", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-module_struct_global_separate_compilation_01-043bc7f.json0000664000175000017500000000107415227365530032632 0ustar alastairalastair{ "basename": "llvm-module_struct_global_separate_compilation_01-043bc7f", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/module_struct_global_separate_compilation_01.f90", "infile_hash": "08f54b36d504349558d92a29ac0ea311917967e95e6d32b9019a9574", "outfile": null, "outfile_hash": null, "stdout": "llvm-module_struct_global_separate_compilation_01-043bc7f.stdout", "stdout_hash": "3312f21b19cb099a6045658030b4bdfaef3d2d6169a25cb520da9567", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-incorrect_type_where_01-8974c02.json0000664000175000017500000000100115227365530026033 0ustar alastairalastair{ "basename": "asr-incorrect_type_where_01-8974c02", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_type_where_01.f90", "infile_hash": "b69410e8dc944d0748ba6ceb9a98bb46621c18dc322814e045286eeb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_type_where_01-8974c02.stderr", "stderr_hash": "695ca61a08fc7f97084ebac3997c3cf7dc2a84c2a0a786ccd345b928", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-show_errors1-cc473c3.stdout0000664000175000017500000000123615227365530024461 0ustar alastairalastair{"uri":"file://tests/errors/show_errors1.f90","diagnostics":[{"source":"lpyth","range":{"start":{"line":9,"character":5},"end":{"line":9,"character":5}},"message":"Newline is unexpected here","severity":0},{"source":"lpyth","range":{"start":{"line":12,"character":10},"end":{"line":12,"character":11}},"message":"Variable 'xx' is not declared","severity":0},{"source":"lpyth","range":{"start":{"line":13,"character":10},"end":{"line":13,"character":11}},"message":"Variable 'xz' is not declared","severity":0},{"source":"lpyth","range":{"start":{"line":14,"character":10},"end":{"line":14,"character":18}},"message":"Variable 'fasldjkfh' is not declared","severity":0}]}lfortran-0.64.0/tests/reference/asr-assign_to1-a6b7599.json0000664000175000017500000000077215227365530023463 0ustar alastairalastair{ "basename": "asr-assign_to1-a6b7599", "cmd": "lfortran --show-asr --implicit-typing --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/assign_to1.f90", "infile_hash": "a8a83c753ee6f6e22b44441dbf0e5d8e7f180ca811bcbe45e810b869", "outfile": null, "outfile_hash": null, "stdout": "asr-assign_to1-a6b7599.stdout", "stdout_hash": "875a5bca5c12b7321bfa5134b5adaf7ac25e906d1cff3037f3e847af", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-expr_06-78489bb.json0000664000175000017500000000073015227365530023211 0ustar alastairalastair{ "basename": "julia-expr_06-78489bb", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/expr_06.f90", "infile_hash": "86c5ce938c64e34b4a0d0c0005ed174ab091a74089c4e28d87f55945", "outfile": null, "outfile_hash": null, "stdout": "julia-expr_06-78489bb.stdout", "stdout_hash": "2ed657c315a9bd7fe376394fb43251634c6805d135d464da42d2218a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-fixed_form_implicit2-4d3e56c.json0000664000175000017500000000104315227365530025551 0ustar alastairalastair{ "basename": "asr-fixed_form_implicit2-4d3e56c", "cmd": "lfortran --fixed-form --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_implicit2.f", "infile_hash": "5300a387c8af9f01e109d5c3f7a9d8aa452020178f6e388e4bfcbce9", "outfile": null, "outfile_hash": null, "stdout": "asr-fixed_form_implicit2-4d3e56c.stdout", "stdout_hash": "f5db4bb18322b5946f9b1b07708d5aa93abb8f40b7505b8050412bed", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-operator_overloading_04-e28fb55.stdout0000664000175000017500000006772515227365530026601 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { operator_overloading_04_stdlib_string_type: (Module (SymbolTable 2 { assign_string_char: (Function (SymbolTable 4 { 1_string_type_raw: (ExternalSymbol 4 1_string_type_raw 3 raw operator_overloading_04_stdlib_string_type [string_type] raw Public ), lhs: (Variable 4 lhs [] InOut () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) assign_string_char (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (String 1 () AssumedLength DescriptorString)] () Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 lhs) (Var 4 rhs)] [(Assignment (StructInstanceMember (Var 4 lhs) 4 1_string_type_raw (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Var 4 rhs) () .false. .false. )] () Public .true. .true. () ), string_type: (Struct (SymbolTable 3 { raw: (Variable 3 raw [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_type (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [raw] [] Source Public .false. .false. .true. [] () () [] ), trim_string: (Function (SymbolTable 5 { 1_string_type_raw: (ExternalSymbol 5 1_string_type_raw 3 raw operator_overloading_04_stdlib_string_type [string_type] raw Public ), assign_string_char: (ExternalSymbol 5 assign_string_char 2 assign_string_char operator_overloading_04_stdlib_string_type [] assign_string_char Public ), string: (Variable 5 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), trimmed_string: (Variable 5 trimmed_string [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) trim_string (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 5 string)] [(Assignment (Var 5 trimmed_string) (StructInstanceMember (Var 5 string) 5 1_string_type_raw (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (SubroutineCall 5 assign_string_char 5 assign_string_char [((Var 5 trimmed_string)) ((StructInstanceMember (Var 5 string) 5 1_string_type_raw (Allocatable (String 1 () DeferredLength DescriptorString) ) () ))] () .false. ) .false. .false. )] (Var 5 trimmed_string) Public .true. .true. () ), ~assign: (CustomOperator 2 ~assign [2 assign_string_char] Public ) }) operator_overloading_04_stdlib_string_type () [operator_overloading_04_stdlib_string_type] .false. .false. .false. ), operator_overloading_stdlib_string_use: (Module (SymbolTable 6 { chomp_string: (Function (SymbolTable 7 { assign_string_char@~assign: (ExternalSymbol 7 assign_string_char@~assign 2 assign_string_char operator_overloading_04_stdlib_string_type [] assign_string_char Public ), chomped_string: (Variable 7 chomped_string [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 7 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 7 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~assign: (ExternalSymbol 7 ~assign 2 ~assign operator_overloading_04_stdlib_string_type [] ~assign Public ) }) chomp_string (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 7 string)] [] (Var 7 chomped_string) Public .true. .true. () ), string_type: (ExternalSymbol 6 string_type 2 string_type operator_overloading_04_stdlib_string_type [] string_type Public ) }) operator_overloading_stdlib_string_use () [operator_overloading_04_stdlib_string_type] .false. .false. .false. ), stdlib_string: (Program (SymbolTable 8 { }) stdlib_string [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-template_lapack_01-0d30f43.json0000664000175000017500000000100015227365530025000 0ustar alastairalastair{ "basename": "asr-template_lapack_01-0d30f43", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_lapack_01.f90", "infile_hash": "d79e24fee2aba2e6b98fffd327df1e6a264fdf9cc3e5ebc77b5822d0", "outfile": null, "outfile_hash": null, "stdout": "asr-template_lapack_01-0d30f43.stdout", "stdout_hash": "e87448c37fc5cf221437cd689d40d7badc9d6c3c3075be77a1d0922c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bits_04-d0f89f1.json0000664000175000017500000000073715227365530022734 0ustar alastairalastair{ "basename": "asr-bits_04-d0f89f1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bits_04.f90", "infile_hash": "1cf82954b9eed57d1f61a7b86cf2aaaf4cb3a8efdf960365bab23692", "outfile": null, "outfile_hash": null, "stdout": "asr-bits_04-d0f89f1.stdout", "stdout_hash": "c0fac706952f050773d0b767fb9e5dbc29a93923d223062bdfbe96de", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-types_11-696c3ee.json0000664000175000017500000000074215227365530023136 0ustar alastairalastair{ "basename": "ast-types_11-696c3ee", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_11.f90", "infile_hash": "ec77a687fe909a61a4d7e9edc0d249eb8fbcd372a60ff4c84d9d50ca", "outfile": null, "outfile_hash": null, "stdout": "ast-types_11-696c3ee.stdout", "stdout_hash": "133033e1bee41d47e922546395584ff57c6fe6b3408f737936d377bb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-matrix_matmul_05-c57a23d.stderr0000664000175000017500000000031015227365530025163 0ustar alastairalastairsemantic error: `matmul` accepts arrays of rank 1 or 2 only, provided an array with rank, 4 --> tests/errors/matrix_matmul_05.f90:5:24 | 5 | print *, matmul(a, b) | ^ lfortran-0.64.0/tests/reference/run-scalar_allocation_check_02-b6aed2a.json0000664000175000017500000000076215227365530026740 0ustar alastairalastair{ "basename": "run-scalar_allocation_check_02-b6aed2a", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/scalar_allocation_check_02.f90", "infile_hash": "334ddfdd17e21ad5f18931bde4b01c8463c16124c4f2b35f872b0bae", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-scalar_allocation_check_02-b6aed2a.stderr", "stderr_hash": "50fde05f32a37b3018afb50ffe4509b2f681682323043ff7957ffde3", "returncode": 1 }lfortran-0.64.0/tests/reference/ast-do1-0a89222.stderr0000664000175000017500000000020315227365530022321 0ustar alastairalastairstyle suggestion: Use 'end do' instead of 'enddo' --> tests/do1.f90:21:1 | 21 | enddo | ^^^^^ help: write this as 'end do' lfortran-0.64.0/tests/reference/ast_f90-associate_01-aa0fe46.stderr0000664000175000017500000000025615227365530025016 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/associate_01.f90:18:8 | 18 | if(a(1).EQ.5) GO TO 1 | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/asr-types_03-f0b782e.stdout0000664000175000017500000000735715227365530023510 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { types_03: (Program (SymbolTable 2 { i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) types_03 [] [(Assignment (Var 2 r) (RealConstant 1.500000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(Var 2 r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 i) (Cast (Var 2 r) RealToInteger (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 2 i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/lookup_name-lookup_name1-9a3abcc.json0000664000175000017500000000075415227365530025731 0ustar alastairalastair{ "basename": "lookup_name-lookup_name1-9a3abcc", "cmd": "lfortran --lookup-name --no-color {infile} -o {outfile}", "infile": "tests/lookup_name1.f90", "infile_hash": "6040a3665d4455ccb812ccc763c7d458221ef5b0eb639ed341de0618", "outfile": null, "outfile_hash": null, "stdout": "lookup_name-lookup_name1-9a3abcc.stdout", "stdout_hash": "8df160638b3c83441d1ecd0dd1fdff905f4f006d492e805dc0041307", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-stop1-c0d0295.stdout0000664000175000017500000000131415227365530023464 0ustar alastairalastairprogram stop1 implicit none ! AST only(Syntax check) integer :: stop = 15 integer :: errstop = 25 if (stop /= 15) then stop else if (errstop /= 25) then error stop end if end if if (stop /= 15) then stop "message" else if (errstop /= 25) then error stop "message" end if end if if (stop /= 15) then stop 0 else if (errstop /= 25) then error stop 0 end if end if if (stop /= 15) then stop, quiet = .true. else if (errstop /= 25) then error stop, quiet = .true. end if end if if (stop /= 15) then stop 1, quiet = .false. else if (errstop /= 25) then error stop 1, quiet = .false. end if end if end program stop1 lfortran-0.64.0/tests/reference/asr-array1-20700fb.stdout0000664000175000017500000003776315227365530023150 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array1: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b2: (Variable 2 b2 [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b3: (Variable 2 b3 [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e2: (Variable 2 e2 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e3: (Variable 2 e3 [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 2 g [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g2: (Variable 2 g2 [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 6 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g3: (Variable 2 g3 [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array1 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/ast-subroutine2-c8b0b6f.stdout0000664000175000017500000003001015227365530024360 0ustar alastairalastair(TranslationUnit [(Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y () ) (Assignment 0 x (* 2 y) () )] [] [] ) (Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (* 2 y) () )] [] [] ) (Subroutine g [] [] () (TriviaNode [(EndOfLine) (EndOfLine)] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine)] ) ) (Assignment 0 x (* 2 y) (TriviaNode [] [(EndOfLine) (EndOfLine) (EndOfLine) (EndOfLine)] ) )] [] [] ) (Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(EndOfLine) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (Semicolon) (EndOfLine)] ) ) (Assignment 0 x (* 2 y) () )] [] [] ) (Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(Semicolon) (EndOfLine)] ) ) (Assignment 0 x (* 2 y) (TriviaNode [] [(Semicolon) (EndOfLine)] ) )] [] [] ) (Subroutine g [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(Semicolon) (Semicolon) (EndOfLine)] ) ) (Assignment 0 x (* 2 y) (TriviaNode [] [(Semicolon) (Semicolon) (Semicolon) (EndOfLine)] ) )] [] [] ) (Subroutine g [] [] () (TriviaNode [(Semicolon)] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 x y (TriviaNode [] [(Semicolon)] ) ) (Assignment 0 x (* 2 y) (TriviaNode [] [(Semicolon)] ) )] [] [] ) (Subroutine f [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Assignment 0 subroutine y () ) (Assignment 0 x (* 2 subroutine) () )] [] [] ) (Subroutine f [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] [] [] [] ) (Subroutine f [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () )] [] [] [] ) (Subroutine f [(a) (b) (c) (d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(c [] [] () () None ()) (d [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(z [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(y [] [] () () None ())] () )] [] [] [] ) (Subroutine f [(a) (b) (c) (d)] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent Out )] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent InOut )] [(c [] [] () () None ()) (d [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(z [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(y [] [] () () None ())] () )] [] [] [] ) (Subroutine saxpy [(n) (a) (x) (y)] [] () () [] [] [] [(Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent In )] [(x [(() () DimensionExpr)] [] () () None ()) (a [] [] () () None ())] () ) (Declaration (AttrType TypeReal [(() dp Value)] () () None ) [(AttrIntent InOut )] [(y [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent In )] [(n [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () )] [(DoLoop 0 () 0 i 1 n () [(Assignment 0 (FuncCallOrArray y [] [(() i () 0)] [] [] [] ) (+ (* a (FuncCallOrArray x [] [(() i () 0)] [] [] [] )) (FuncCallOrArray y [] [(() i () 0)] [] [] [] )) () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/run-integer_overflow-3cf26f8.json0000664000175000017500000000105315227365530025057 0ustar alastairalastair{ "basename": "run-integer_overflow-3cf26f8", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/integer_overflow.f90", "infile_hash": "99aeb8a8bec3fcc69c64e299272811526c026aaa3da667aca42d6776", "outfile": null, "outfile_hash": null, "stdout": "run-integer_overflow-3cf26f8.stdout", "stdout_hash": "9ea40ed3fc36306eb92a745b1f953060223ad6f7073bb5ba026589ed", "stderr": "run-integer_overflow-3cf26f8.stderr", "stderr_hash": "a4c99417a6e12ac2dd2b0053e6fd4fb8b98d15e5cb5d5fc27eb4ae7f", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-derived_type_05-3836aa5.json0000664000175000017500000000075115227365530024364 0ustar alastairalastair{ "basename": "asr-derived_type_05-3836aa5", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/derived_type_05.f90", "infile_hash": "5987fece6fa8c1cf630060bab7fdff85f72075755e9b3f64cad7ef86", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-derived_type_05-3836aa5.stderr", "stderr_hash": "8ab69b17b3f68e3089a6b8f9633424b69a4391d810104f78380ae35c", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-modules_04-0d478be.stdout0000664000175000017500000001366315227365530024012 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { access_vars: (Module (SymbolTable 2 { print_vars: (Function (SymbolTable 3 { }) print_vars (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringFormat () [(StringConstant "priv = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 priv)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(StringConstant "publ = " (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 publ)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ), priv: (Variable 2 priv [] Local (RealConstant 1.500000 (Real 4) ) (RealConstant 1.500000 (Real 4) ) Save (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), publ: (Variable 2 publ [] Local (RealConstant 2.500000 (Real 4) ) (RealConstant 2.500000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) access_vars () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/julia-case_02-e255e0e.stdout0000664000175000017500000000316015227365530023556 0ustar alastairalastairfunction main() local marks::Int32 local out::Int32 marks = 81 if 91 ≤ marks ≤ 100 out = 0 println("Excellent!") elseif 81 ≤ marks ≤ 90 out = 1 println("Very good!") elseif 71 ≤ marks ≤ 80 out = 2 println("Well done!") elseif 61 ≤ marks ≤ 70 out = 3 println("Not bad!") elseif 41 ≤ marks ≤ 60 out = 4 println("You passed!") elseif marks ≤ 40 out = 5 println("Better try again!") else out = 6 println("Invalid marks") end println("Your marks are ", " ", marks) if out ≠ 1 println(Base.stderr, "ERROR STOP") exit(1) end if 91 ≤ marks ≤ 100 println("Excellent!") elseif 81 ≤ marks ≤ 90 println("Very good!") elseif 71 ≤ marks ≤ 80 println("Well done!") elseif 61 ≤ marks ≤ 70 println("Not bad!") elseif 41 ≤ marks ≤ 60 println("You passed!") elseif marks ≤ 40 println("Better try again!") else println("Invalid marks") end println("Your marks are ", " ", marks) if 91 ≤ marks ≤ 100 println("Excellent!") elseif 81 ≤ marks ≤ 90 println("Very good!") elseif 71 ≤ marks ≤ 80 println("Well done!") elseif 61 ≤ marks ≤ 70 println("Not bad!") elseif 41 ≤ marks ≤ 60 println("You passed!") elseif marks ≤ 40 println("Better try again!") else println("Invalid marks") end println("Your marks are ", " ", marks) end main() lfortran-0.64.0/tests/reference/ast_f90-format_01-fa31fe9.stdout0000664000175000017500000000536715227365530024372 0ustar alastairalastairprogram format_01 implicit none integer :: x integer :: y integer :: z 1 format(/,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5) 2 format(/ ,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5) 3 format( /,'BDF2 step ',i6,': T=',es12.5,', H=',es12.5,', ETAH=',es12.5) 4 format(2x,'Preconditioner update FAILED at T=',es12.5,', ETAH=',es12.5) 5 format(/) 6 format(/ ) 7 format( /) 8 format(i6, /) 9 format(i6,/) 10 format(/ , /) 121 format( /, 80A, / ) 122 format( /, 80A, /) 123 format(/, 80A, /) 124 format(/, 80A, / ) 130 format( 10X, 'keyword Input Echo - Values from input or default', / ,80A, / ) 131 format( 10X, 'keyword Input Echo - Values from input or default', / ,80A, /) 158 format( 4X, 'epsi = ', ES11.4, /, 4X, 'iitm = ', I3, /, 4X, 'oitm = ', I4, /, 4X, 'timedep = ', I1, /, 4X, 'swp_typ = ', I1, /, 4X, 'multiswp = ', I1, /, 4X, 'angcpy = ', I1, /, 4X, 'it_det = ', I1, /, 4X, 'soloutp = ', I1, /, 4X, 'kplane = ', I4, /, 4X, 'popout = ', I1, /, 4X, 'fluxp = ', I1, /, 4X, 'fixup = ', I1, / ) 161 format( 'slgg(nmat,nmom,ng,ng) echo', /, 'Column-order loops:',' Mats (fastest ), Moments, Groups, Groups (slowest)' ) 162 format( 2X, ES15.8, 2X, ES15.8, 2X, ES15.8, 2X, ES15.8 ) 221 format( 4X, 'Group ', I3, 4X, ' Inner ', I5, 4X, ' Dfmxi ', ES11.4, ' Fixup x/y/z/t ', 4(ES9.2,1x) ) 306 format( 2X, I4, 6(1X, ES11.4) ) 324 format( 4(2X, ES17.10) ) 422 format( /, 4X, 'Manufactured/Computed Solutions Max Diff=', ES13.6 ) 500 format( "IARRAY =", *( I0, :, ",")) 501 format(*( I0, :, ",")) 510 format(1X, F10.3, I5, F10.3, I5/F10.3, I5, F10.3, I5) 511 format(3/,I5) 512 format(3/) 513 format(1x, A, 3/ 1x, 2(I10,F10.2) // 1x, 2E15.7) 520 format(1X, I1, 1X, 'ISN''T', 1X, I1) 530 format(1PE12.4, I10) 540 format(I12, /, ' Dates: ', 2 (2I3, I5)) 550 format(ES12.3, ES12.3E3, G3.4, G3.4E100) 600 format(//,63x,'Internal',/, 1x,'Cell',3(5x,'Temp '), 7x,'P',8x,'Density',6x,'Energy', /,2x,'Num',6x,'(K)',7x,'(C)',7x,'(F)',6x,'(Pa)',6x, '(kg/m**3)',5x,'(J/kg)' ) 610 format(71('-'),/,(1x,i4,0p,3f10.1,1p,3e12.3)) 620 format((1x,i4,0p,3(2x,'|',2x,f5.1),1p, 3(1x,'|',1x,e9.3))) 630 format( //,' Format Number ',i4) 631 format(//,' Format Number ',i4) 640 format("Table form of A"/(2F8.2)) 650 format( 5X, 'ng= ', I4, / 5X, 'mat_opt= ', I2, / 5X, 'src_opt= ', I2, / 5X, 'scatp= ', I2 ) 660 format(' Format Number ',0PF17.8,' Ry' ) 670 format(/'xx') 680 format(/"xx") 690 format(/ "xx") 700 format(/ 'xx') 710 format(/ i5, 'x') 720 format(// i5, 'x') 730 format(//) x = 5 740 format(/1X'(',I2,')', X, A) end program format_01 lfortran-0.64.0/tests/reference/ast-subroutine5-d00e190.stdout0000664000175000017500000000210715227365530024221 0ustar alastairalastair(TranslationUnit [(Subroutine add [(a) (b) (c)] [] () () [] [] [] [(Declaration (AttrType TypeReal [] () () None ) [(AttrIntent In )] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(AttrIntent Out )] [(c [] [] () () None ())] () )] [(Assignment 0 c (+ a b) () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-arrays_08_func-2759ced.stderr0000664000175000017500000000032315227365530024635 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/../integration_tests/arrays_08_func.f90:29:27 | 29 | r = r .and. (a(i) .eq. b(i)) | ^^^^ help: write this as '==' lfortran-0.64.0/tests/reference/cpp-fn2-ff8ef37.json0000664000175000017500000000066115227365530022235 0ustar alastairalastair{ "basename": "cpp-fn2-ff8ef37", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/fn2.f90", "infile_hash": "9f61561c47397aa03014fe07094ac838ada4865e513025e384edae00", "outfile": null, "outfile_hash": null, "stdout": "cpp-fn2-ff8ef37.stdout", "stdout_hash": "2bb1359320b16c59d468f0223319c844dd9c3d60dce30003b9c67a42", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-expr1-e0e6d6b.stdout0000664000175000017500000000017615227365530023147 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { }) [(IntegerConstant 5 (Integer 4) Decimal)] ) lfortran-0.64.0/tests/reference/asr-nested_04-8423f42.stdout0000664000175000017500000004535215227365530023463 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { nested_04: (Program (SymbolTable 5 { b: (ExternalSymbol 5 b 2 b nested_04_a [] b Public ), test: (Variable 5 test [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) nested_04 [nested_04_a] [(Assignment (Var 5 test) (FunctionCall 5 b () [((IntegerConstant 5 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. )] ), nested_04_a: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { b: (Variable 3 b [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Function (SymbolTable 4 { c: (Variable 4 c [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 4 z [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) c (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 z)] [(Print (StringFormat () [(Var 4 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 3 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 3 yy)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 4 c) (Var 4 z) () .false. .false. )] (Var 4 c) Public .false. .false. () ), x: (Variable 3 x [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), yy: (Variable 3 yy [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) b (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 x)] [(Assignment (Var 3 yy) (RealConstant 6.600000 (Real 4) ) () .false. .false. ) (Assignment (Var 3 y) (Var 3 x) () .false. .false. ) (Print (StringConstant "b()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Assignment (Var 3 b) (FunctionCall 3 c () [((IntegerConstant 6 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. )] (Var 3 b) Public .false. .false. () ) }) nested_04_a () [nested_04_a] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-reserved_02-a00a6f2.json0000664000175000017500000000076615227365530024250 0ustar alastairalastair{ "basename": "ast_f90-reserved_02-a00a6f2", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/reserved_02.f90", "infile_hash": "f602644fa98db53850a49c69394e3e9eb664cd1250f81f954484c85e", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-reserved_02-a00a6f2.stdout", "stdout_hash": "2cda8233c77ac420d2688c94e80e9c4fcfe12ab17c884a5d0f189929", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-submodule_04-987b68b.stdout0000664000175000017500000004502515227365530024272 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { mod_submodule_04: (Module (SymbolTable 2 { map_open_entry: (Function (SymbolTable 4 { key: (Variable 4 key [] InOut () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), map: (Variable 4 map [] InOut () () Default (StructType [] [] .false. .false. ) 2 open_hashmap_type Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) map_open_entry (FunctionType [(StructType [] [] .false. .false. ) (Integer 4)] () Source Interface () .false. .false. .true. .false. .false. [] .false. ) [] [(Var 4 map) (Var 4 key)] [] () Private .false. .false. () ), open_hashmap_type: (Struct (SymbolTable 3 { map_entry: (StructMethodDeclaration 3 map_entry () map_open_entry 2 map_open_entry Source .false. .false. ) }) open_hashmap_type (StructType [] [] .true. .false. ) [] [] [] Source Private .false. .false. .false. [] () () [] ) }) mod_submodule_04 () [] .false. .false. .true. ), submod_submodule_04: (Module (SymbolTable 5 { map_open_entry: (Function (SymbolTable 6 { i: (Variable 6 i [] Local (IntegerConstant 5 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), key: (Variable 6 key [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), map: (Variable 6 map [] InOut () () Default (StructType [] [] .false. .false. ) 5 open_hashmap_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) map_open_entry (FunctionType [(StructType [] [] .false. .false. ) (Integer 4)] () Source Implementation () .false. .false. .true. .false. .false. [] .false. ) [] [(Var 6 map) (Var 6 key)] [(Assignment (Var 6 key) (Var 6 i) () .false. .false. )] () Public .true. .true. () ), open_hashmap_type: (ExternalSymbol 5 open_hashmap_type 2 open_hashmap_type mod_submodule_04 [] open_hashmap_type Public ) }) submod_submodule_04 mod_submodule_04 [mod_submodule_04] .false. .false. .false. ), submodule_04: (Program (SymbolTable 7 { 1_open_hashmap_type_map_entry: (ExternalSymbol 7 1_open_hashmap_type_map_entry 3 map_entry mod_submodule_04 [open_hashmap_type] map_entry Public ), key: (Variable 7 key [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), map: (Variable 7 map [] Local () () Default (StructType [] [] .true. .false. ) 7 open_hashmap_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), open_hashmap_type: (ExternalSymbol 7 open_hashmap_type 2 open_hashmap_type mod_submodule_04 [] open_hashmap_type Public ) }) submodule_04 [mod_submodule_04] [(SubroutineCall 7 1_open_hashmap_type_map_entry () [((Var 7 map)) ((Var 7 key))] (Var 7 map) .false. ) (Print (StringFormat () [(Var 7 key)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 7 key) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-fixed_form_if_variations-38b0c0a.stdout0000664000175000017500000000413515227365530027055 0ustar alastairalastair(TranslationUnit [(Subroutine f [(a)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(a [] [] () () None ())] () )] [(Print 0 () [a] () )] [] [] ) (Program main () [] [] [] [(If 0 () (< 0 1) [(Print 0 () [(String "first branch" ())] () ) (Continue 10 () )] [(Print 0 () [(String "second branch" ())] () )] () () () ) (SubroutineCall 50 f [] [(() 1 () 0)] [] [] () ) (If 0 () (< 0 2) [(Return 0 () () )] [] () () () ) (If 0 () (> 0 1) [(GoTo 0 () 50 [] () )] [] () () () ) (If 0 () (< 0 1) [(SubroutineCall 0 f [] [(() 2 () 0)] [] [] () )] [] () () () )] [] )] ) lfortran-0.64.0/tests/reference/ast_f90-if1-6dc9fe3.json0000664000175000017500000000071115227365530022701 0ustar alastairalastair{ "basename": "ast_f90-if1-6dc9fe3", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/if1.f90", "infile_hash": "52db0c880c11effc03c530998302e40daa23a4e191ee0dbf7fa5e631", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-if1-6dc9fe3.stdout", "stdout_hash": "47476381af23935043a0e3a59021dcdb204b96dcad8a2fe9e345be7b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-goto_03-38b11b3.json0000664000175000017500000000075215227365530023321 0ustar alastairalastair{ "basename": "ast_f90-goto_03-38b11b3", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/goto_03.f90", "infile_hash": "2a8829b6e334f6c1619d1d9c772f871874336138a9aa68816641754c", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-goto_03-38b11b3.stdout", "stdout_hash": "87bacb0887ea120cb4930811b9bf2a93b1237134d50342241ad24cf5", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-callback_01-21b53de.stdout0000664000175000017500000006561515227365530024067 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { callback_01: (Module (SymbolTable 2 { cb: (Function (SymbolTable 3 { a: (Variable 3 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cb: (Variable 3 cb [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 4 { f: (Variable 4 f [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Real 4)] (Real 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 x)] [] (Var 4 f) Public .false. .false. () ) }) cb (FunctionType [(FunctionType [(Real 4)] (Real 4) Source Interface () .false. .false. .false. .false. .false. [] .false. ) (Real 4) (Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 f) (Var 3 a) (Var 3 b)] [(Assignment (Var 3 cb) (RealBinOp (RealBinOp (RealBinOp (Var 3 b) Sub (Var 3 a) (Real 4) () ) Add (FunctionCall 3 f () [((Var 3 a))] (Real 4) () () ) (Real 4) () ) Add (FunctionCall 3 f () [((Var 3 b))] (Real 4) () () ) (Real 4) () ) () .false. .false. )] (Var 3 cb) Public .false. .false. () ), foo: (Function (SymbolTable 5 { c: (Variable 5 c [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 5 d [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 6 { f: (Variable 6 f [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 6 x [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 6 x)] [(Assignment (Var 6 f) (RealBinOp (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) Mul (Var 6 x) (Real 4) () ) () .false. .false. )] (Var 6 f) Public .true. .true. () ) }) foo (FunctionType [(Real 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [cb] [(Var 5 c) (Var 5 d)] [(Print (StringFormat () [(FunctionCall 2 cb () [((Var 5 f)) ((Var 5 c)) ((Var 5 d))] (Real 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) callback_01 () [callback_01] .false. .false. .false. ), main: (Program (SymbolTable 7 { cb: (ExternalSymbol 7 cb 2 cb callback_01 [] cb Public ), foo: (ExternalSymbol 7 foo 2 foo callback_01 [] foo Public ) }) main [callback_01] [(SubroutineCall 7 foo () [((RealConstant 1.500000 (Real 4) )) ((RealConstant 2.000000 (Real 4) ))] () .false. )] ) }) [] ) lfortran-0.64.0/tests/reference/run-format_27-3469667.stdout0000664000175000017500000000005015227365530023433 0ustar alastairalastair3.E+0 3.E+0 3.E+3 30.E+0 391.E+0 31.E+3 lfortran-0.64.0/tests/reference/asr_preprocess-cpp6-556419a.json0000664000175000017500000000074415227365530024440 0ustar alastairalastair{ "basename": "asr_preprocess-cpp6-556419a", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/cpp6.f90", "infile_hash": "656ffe7987384117872854f94922370f2be857b4aacef14bc6c74347", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr_preprocess-cpp6-556419a.stderr", "stderr_hash": "5f480c0402858952c8e06d5fdc12736b09db6c1aaafc4cc7a3f0c897", "returncode": 2 }lfortran-0.64.0/tests/reference/run-infer_realloc_disabled_01-25a8068.json0000664000175000017500000000075715227365530026300 0ustar alastairalastair{ "basename": "run-infer_realloc_disabled_01-25a8068", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/infer_realloc_disabled_01.f90", "infile_hash": "fe97c92f3a6b2f82c2bc6c67e08a1e1f7b9baec1974bf5f02afd0cbb", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-infer_realloc_disabled_01-25a8068.stderr", "stderr_hash": "218abe6c2d1c1090ef272a3724ef1d2f75c484896cd0ba0cc9959a62", "returncode": 1 }lfortran-0.64.0/tests/reference/rename_symbol-collect_occurence2-a095a33.json0000664000175000017500000000100415227365530027164 0ustar alastairalastair{ "basename": "rename_symbol-collect_occurence2-a095a33", "cmd": "lfortran --rename-symbol --no-color {infile} -o {outfile}", "infile": "tests/collect_occurence2.f90", "infile_hash": "64f44de76cd08c4e21e4f8e05bb2747574f998c95bcdb8d474c8c449", "outfile": null, "outfile_hash": null, "stdout": "rename_symbol-collect_occurence2-a095a33.stdout", "stdout_hash": "ceb3972a4c1cdd81d16bc86d83173dbab5f181773ce8f1b1defed487", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-procedure_with_type-4c8ea35.json0000664000175000017500000000076515227365530025552 0ustar alastairalastair{ "basename": "ast-procedure_with_type-4c8ea35", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/procedure_with_type.f90", "infile_hash": "a2cb3df55c455622783d0b209d9fd84633b8e67530cf4ca17030700e", "outfile": null, "outfile_hash": null, "stdout": "ast-procedure_with_type-4c8ea35.stdout", "stdout_hash": "49ddb23e13380a55dd5eea878d088309735ffe30d6a3cf012de19b4a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-derived_type_01-d480dc4.json0000664000175000017500000000075115227365530024440 0ustar alastairalastair{ "basename": "asr-derived_type_01-d480dc4", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/derived_type_01.f90", "infile_hash": "74c9f7ee5dfaf581b24988b384a68b11d6023d84b46344260436f624", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-derived_type_01-d480dc4.stderr", "stderr_hash": "d6731b078923ba1abe7454042289cdb0c47c5c22f7acb516b02d7d3f", "returncode": 2 }lfortran-0.64.0/tests/reference/ast_f90-derived_types_03-2ad875a.json0000664000175000017500000000076015227365530025306 0ustar alastairalastair{ "basename": "ast_f90-derived_types_03-2ad875a", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/derived_types_03.f90", "infile_hash": "0367caa646d88d9d311f2157b87aa8d37c7c09500fea94cc3adacbe3", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-derived_types_03-2ad875a.stdout", "stdout_hash": "7a98583ef0e15fc8e8f7780421a2615536df4045cfb6b7850739787f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-continue_compilation_walrus-f3d9bd0.json0000664000175000017500000000103515227365530027351 0ustar alastairalastair{ "basename": "asr-continue_compilation_walrus-f3d9bd0", "cmd": "lfortran --semantics-only --continue-compilation --no-color {infile}", "infile": "tests/errors/continue_compilation_walrus.f90", "infile_hash": "672fb70521a3deb2dbe36c76dc53e5b8c89ddd7cd63d75e1285544a9", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-continue_compilation_walrus-f3d9bd0.stderr", "stderr_hash": "62da63fd8d5cc6856482383675826dec3bd0678883779c524b7247d1", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-int_01-9bf3eb9.json0000664000175000017500000000071615227365530022641 0ustar alastairalastair{ "basename": "asr-int_01-9bf3eb9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/int_01.f90", "infile_hash": "e2571a39476234ffe13799808dd85a6cdda52b13f89171e4fc4c868e", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-int_01-9bf3eb9.stderr", "stderr_hash": "c9e39d59ade877d2ab7ac42be2b43f28bfecc44ab58b204ffd1ab5ab", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_where-where_03-00685f9.stdout0000664000175000017500000010204615227365530024664 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 3 { }) main [] [(SubroutineCall 1 where_03 () [] () .false. )] ), where_03: (Function (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) where_03 (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 a) (ArrayConstant 16 [1.00000000e+00, 2.00000000e+00, 3.00000000e+00, 4.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Assignment (Var 2 b) (ArrayConstant 16 [-1.00000000e+00, -2.00000000e+00, 5.00000000e+00, 7.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (If () (RealCompare (Var 2 a) Gt (Var 2 b) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 a) (ArrayBroadcast (RealConstant 1.000000 (Real 4) ) (ArrayConstant 4 [4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 16 [1.00000000e+00, 1.00000000e+00, 1.00000000e+00, 1.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [] ) (If () (RealCompare (Var 2 a) Eq (RealConstant 1.000000 (Real 4) ) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 a) (ArrayBroadcast (RealConstant 2.000000 (Real 4) ) (ArrayConstant 4 [4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 16 [2.00000000e+00, 2.00000000e+00, 2.00000000e+00, 2.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(If () (RealCompare (Var 2 a) Eq (RealConstant 2.000000 (Real 4) ) (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) [(Assignment (Var 2 b) (ArrayBroadcast (RealConstant 3.000000 (Real 4) ) (ArrayConstant 4 [4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 16 [3.00000000e+00, 3.00000000e+00, 3.00000000e+00, 3.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) () .false. .false. )] [(Assignment (Var 2 a) (RealBinOp (RealBinOp (RealBinOp (Var 2 b) Mul (ArrayBroadcast (RealConstant 2.000000 (Real 4) ) (ArrayConstant 4 [4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 16 [2.00000000e+00, 2.00000000e+00, 2.00000000e+00, 2.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) Div (Var 2 a) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) Mul (ArrayBroadcast (RealConstant 3.000000 (Real 4) ) (ArrayConstant 4 [4] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) (ArrayConstant 16 [3.00000000e+00, 3.00000000e+00, 3.00000000e+00, 3.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () ) () .false. .false. )] )] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 2.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 2.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 10.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 10.500000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealUnaryMinus (RealConstant 1.000000 (Real 4) ) (Real 4) (RealConstant -1.000000 (Real 4) ) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealUnaryMinus (RealConstant 2.000000 (Real 4) ) (Real 4) (RealConstant -2.000000 (Real 4) ) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 5.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 7.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 2 b)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/llvm-abort_01-7212a3d.stdout0000664000175000017500000000226415227365530023534 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." define void @_lcompilers_abort_() { .entry: call void @_lfortran_abort() br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE__lcompilers_abort_ FINALIZE_SYMTABLE__lcompilers_abort_: ; preds = %return ret void } declare void @_lfortran_abort() define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) br i1 false, label %then, label %else then: ; preds = %.entry call void @_lcompilers_abort_() br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then br label %return return: ; preds = %ifcont br label %FINALIZE_SYMTABLE_abort1 FINALIZE_SYMTABLE_abort1: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/asr-print_intrinsics-8e5d219.json0000664000175000017500000000074515227365530025010 0ustar alastairalastair{ "basename": "asr-print_intrinsics-8e5d219", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/print_intrinsics.f90", "infile_hash": "a18c84b05282913a620d056c8183e7e7ee364fcb4accdbc21f4d0b63", "outfile": null, "outfile_hash": null, "stdout": "asr-print_intrinsics-8e5d219.stdout", "stdout_hash": "02d91f9d75ad3d515ce1475a2147af65ec29bc35261426d88e27fbc1", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-expr9-c1303f2.stdout0000664000175000017500000000022715227365530023462 0ustar alastairalastaircall ERROR_HANDLER%trigger(errors=.errors.rslt) .INVERSE.B .INVERSE.(A + B) .anotherunary.1 .anotherunary.(1 + 2) .anotherunary.C .anotherunary.(c + d)lfortran-0.64.0/tests/reference/llvm-select_type_13-f465d8c.stdout0000664000175000017500000023252015227365530025050 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %select_type_13_module.shape.3_class = type <{ i32 (...)**, %select_type_13_module.shape.3* }> %select_type_13_module.shape.3 = type {} %string_descriptor = type <{ i8*, i64 }> %select_type_13_module.circle.5_class = type <{ i32 (...)**, %select_type_13_module.circle.5* }> %select_type_13_module.circle.5 = type { %select_type_13_module.shape.3, float } %select_type_13_module.rectangle.6_class = type <{ i32 (...)**, %select_type_13_module.rectangle.6* }> %select_type_13_module.rectangle.6 = type { %select_type_13_module.shape.3, float, float } @_Name_shape = private unnamed_addr constant [6 x i8] c"shape\00", align 1 @_Type_Info_shape = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @_Name_shape, i32 0, i32 0), i8* null, i8* null }, align 8 @_VTable_shape = linkonce_odr unnamed_addr constant { [6 x i8*] } { [6 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_shape to i8*), i8* bitcast (void (i8*, i8*)* @_copy_select_type_13_module_shape to i8*), i8* bitcast (void (i8**)* @_allocate_struct_select_type_13_module_shape to i8*), i8* bitcast (void (i8*)* @finalize_StructType__shape_3_of_select_type_13_module_for_UPoly to i8*), i8* null] }, align 8 @_Name_circle = private unnamed_addr constant [7 x i8] c"circle\00", align 1 @_Type_Info_circle = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @_Name_circle, i32 0, i32 0), i8* inttoptr (i64 4 to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_shape to i8*) }, align 8 @_VTable_circle = linkonce_odr unnamed_addr constant { [6 x i8*] } { [6 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i8* bitcast (void (i8*, i8*)* @_copy_select_type_13_module_circle to i8*), i8* bitcast (void (i8**)* @_allocate_struct_select_type_13_module_circle to i8*), i8* bitcast (void (i8*)* @finalize_StructType__circle_5_of_select_type_13_module_for_UPoly to i8*), i8* bitcast (float (%select_type_13_module.circle.5_class*)* @__module_select_type_13_module_circle_area to i8*)] }, align 8 @_Name_rectangle = private unnamed_addr constant [10 x i8] c"rectangle\00", align 1 @_Type_Info_rectangle = linkonce_odr unnamed_addr constant { i8*, i8*, i8* } { i8* getelementptr inbounds ([10 x i8], [10 x i8]* @_Name_rectangle, i32 0, i32 0), i8* inttoptr (i64 8 to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_shape to i8*) }, align 8 @_VTable_rectangle = linkonce_odr unnamed_addr constant { [6 x i8*] } { [6 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_rectangle to i8*), i8* bitcast (void (i8*, i8*)* @_copy_select_type_13_module_rectangle to i8*), i8* bitcast (void (i8**)* @_allocate_struct_select_type_13_module_rectangle to i8*), i8* bitcast (void (i8*)* @finalize_StructType__rectangle_6_of_select_type_13_module_for_UPoly to i8*), i8* bitcast (float (%select_type_13_module.rectangle.6_class*)* @__module_select_type_13_module_rectangle_area to i8*)] }, align 8 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [20 x i8] c"Matched as rectangle" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([20 x i8], [20 x i8]* @string_const_data, i32 0, i32 0), i64 20 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.1 = private constant [17 x i8] c"Matched as circle" @string_const.2 = private global %string_descriptor <{ i8* getelementptr inbounds ([17 x i8], [17 x i8]* @string_const_data.1, i32 0, i32 0), i64 17 }> @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [3 x i8] c"s1\00", align 1 @5 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @6 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @7 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [3 x i8] c"R4\00", align 1 @9 = private unnamed_addr constant [3 x i8] c"s1\00", align 1 @10 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @11 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @12 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [3 x i8] c"s1\00", align 1 @15 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @16 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @17 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @18 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @19 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @20 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.3 = private constant [16 x i8] c"Matched as shape" @string_const.4 = private global %string_descriptor <{ i8* getelementptr inbounds ([16 x i8], [16 x i8]* @string_const_data.3, i32 0, i32 0), i64 16 }> @21 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @22 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.5 = private constant [17 x i8] c"Matched as circle" @string_const.6 = private global %string_descriptor <{ i8* getelementptr inbounds ([17 x i8], [17 x i8]* @string_const_data.5, i32 0, i32 0), i64 17 }> @23 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @24 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.7 = private constant [20 x i8] c"Matched as rectangle" @string_const.8 = private global %string_descriptor <{ i8* getelementptr inbounds ([20 x i8], [20 x i8]* @string_const_data.7, i32 0, i32 0), i64 20 }> @25 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @26 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @27 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @28 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @29 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @30 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @31 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @32 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @33 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @34 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.9 = private unnamed_addr constant [6 x i8] c"R4,R4\00", align 1 @35 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @36 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @37 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @38 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @39 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @40 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @41 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @42 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @43 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @44 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @45 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @46 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @47 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @48 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @49 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @50 = private unnamed_addr constant [3 x i8] c"s2\00", align 1 @51 = private unnamed_addr constant [46 x i8] c"tests/../integration_tests/select_type_13.f90\00", align 1 @52 = private unnamed_addr constant [22 x i8] c"'%s' unallocated here\00", align 1 @53 = private unnamed_addr constant [52 x i8] c"Tried to access member of unallocated variable '%s'\00", align 1 @54 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @55 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @56 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data.10 = private constant [16 x i8] c"Matched as shape" @string_const.11 = private global %string_descriptor <{ i8* getelementptr inbounds ([16 x i8], [16 x i8]* @string_const_data.10, i32 0, i32 0), i64 16 }> @57 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define float @__module_select_type_13_module_circle_area(%select_type_13_module.circle.5_class* %this) { .entry: %circle_area = alloca float, align 4 %0 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %this, i32 0, i32 1 %1 = load %select_type_13_module.circle.5*, %select_type_13_module.circle.5** %0, align 8 %2 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %1, i32 0, i32 1 %3 = load float, float* %2, align 4 %4 = fmul float 0x400921FA00000000, %3 %5 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %this, i32 0, i32 1 %6 = load %select_type_13_module.circle.5*, %select_type_13_module.circle.5** %5, align 8 %7 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %6, i32 0, i32 1 %8 = load float, float* %7, align 4 %9 = fmul float %4, %8 store float %9, float* %circle_area, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_circle_area FINALIZE_SYMTABLE_circle_area: ; preds = %return %10 = load float, float* %circle_area, align 4 ret float %10 } define float @__module_select_type_13_module_rectangle_area(%select_type_13_module.rectangle.6_class* %this) { .entry: %rectangle_area = alloca float, align 4 %0 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %this, i32 0, i32 1 %1 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %0, align 8 %2 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %1, i32 0, i32 1 %3 = load float, float* %2, align 4 %4 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %this, i32 0, i32 1 %5 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %4, align 8 %6 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %5, i32 0, i32 2 %7 = load float, float* %6, align 4 %8 = fmul float %3, %7 store float %8, float* %rectangle_area, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_rectangle_area FINALIZE_SYMTABLE_rectangle_area: ; preds = %return %9 = load float, float* %rectangle_area, align 4 ret float %9 } define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc35 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %s1 = alloca %select_type_13_module.shape.3_class*, align 8 store %select_type_13_module.shape.3_class* null, %select_type_13_module.shape.3_class** %s1, align 8 %s2 = alloca %select_type_13_module.shape.3_class*, align 8 store %select_type_13_module.shape.3_class* null, %select_type_13_module.shape.3_class** %s2, align 8 %3 = call i8* @_lfortran_get_default_allocator() %4 = call i8* @_lfortran_malloc_alloc(i8* %3, i64 4) call void @llvm.memset.p0i8.i32(i8* %4, i8 0, i32 4, i1 false) %5 = call i8* @_lfortran_get_default_allocator() %6 = call i8* @_lfortran_malloc_alloc(i8* %5, i64 16) call void @llvm.memset.p0i8.i32(i8* %6, i8 0, i32 16, i1 false) %7 = bitcast i8* %6 to %select_type_13_module.shape.3_class* store %select_type_13_module.shape.3_class* %7, %select_type_13_module.shape.3_class** %s1, align 8 %8 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %9 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %8, i32 0, i32 1 %10 = bitcast i8* %4 to %select_type_13_module.shape.3* store %select_type_13_module.shape.3* %10, %select_type_13_module.shape.3** %9, align 8 %11 = load %select_type_13_module.shape.3*, %select_type_13_module.shape.3** %9, align 8 %12 = bitcast %select_type_13_module.shape.3* %11 to %select_type_13_module.circle.5* %13 = bitcast %select_type_13_module.shape.3_class* %7 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_circle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %13, align 8 %14 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %12, i32 0, i32 1 %15 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %12, i32 0, i32 0 %16 = alloca i1, align 1 %17 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %18 = ptrtoint %select_type_13_module.shape.3_class* %17 to i64 %19 = icmp eq i64 %18, 0 br i1 %19, label %then1, label %else then: ; preds = %ifcont br label %"~select_type_block_.start" then1: ; preds = %.entry %20 = alloca i32 (...)**, align 8 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_shape, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %20, align 8 %21 = bitcast i32 (...)*** %20 to i8* %22 = call i8* @__lfortran_dynamic_cast(i8* %21, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_rectangle to i8*), i1 false) %23 = icmp ne i8* %22, null store i1 %23, i1* %16, align 1 br label %ifcont else: ; preds = %.entry %24 = bitcast %select_type_13_module.shape.3_class* %17 to i8* %25 = call i8* @__lfortran_dynamic_cast(i8* %24, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_rectangle to i8*), i1 false) %26 = icmp ne i8* %25, null store i1 %26, i1* %16, align 1 br label %ifcont ifcont: ; preds = %else, %then1 %27 = load i1, i1* %16, align 1 br i1 %27, label %then, label %else2 "~select_type_block_.start": ; preds = %then %28 = call i8* @llvm.stacksave() %29 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %29, i32 20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %"~select_type_block_.end" "~select_type_block_.end": ; preds = %"~select_type_block_.start" br label %"FINALIZE_SYMTABLE_~select_type_block_" "FINALIZE_SYMTABLE_~select_type_block_": ; preds = %"~select_type_block_.end" call void @llvm.stackrestore(i8* %28) br label %ifcont17 else2: ; preds = %ifcont %30 = alloca i1, align 1 %31 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %32 = ptrtoint %select_type_13_module.shape.3_class* %31 to i64 %33 = icmp eq i64 %32, 0 br i1 %33, label %then4, label %else5 then3: ; preds = %ifcont6 br label %"~select_type_block_1.start" then4: ; preds = %else2 %34 = alloca i32 (...)**, align 8 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_shape, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %34, align 8 %35 = bitcast i32 (...)*** %34 to i8* %36 = call i8* @__lfortran_dynamic_cast(i8* %35, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i1 false) %37 = icmp ne i8* %36, null store i1 %37, i1* %30, align 1 br label %ifcont6 else5: ; preds = %else2 %38 = bitcast %select_type_13_module.shape.3_class* %31 to i8* %39 = call i8* @__lfortran_dynamic_cast(i8* %38, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i1 false) %40 = icmp ne i8* %39, null store i1 %40, i1* %30, align 1 br label %ifcont6 ifcont6: ; preds = %else5, %then4 %41 = load i1, i1* %30, align 1 br i1 %41, label %then3, label %else16 "~select_type_block_1.start": ; preds = %then3 %42 = call i8* @llvm.stacksave() %43 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.2, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %43, i32 17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %44 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s1, align 8 %45 = ptrtoint %select_type_13_module.shape.3_class** %44 to i64 %46 = icmp eq i64 %45, 0 br i1 %46, label %then7, label %ifcont8 then7: ; preds = %"~select_type_block_1.start" %47 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %48 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %49 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %48, i32 0, i32 0 %50 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %49, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @5, i32 0, i32 0), i8** %50, align 8 %51 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %49, i32 0, i32 1 store i32 56, i32* %51, align 4 %52 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %49, i32 0, i32 2 store i32 7, i32* %52, align 4 %53 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %49, i32 0, i32 3 store i32 56, i32* %53, align 4 %54 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %49, i32 0, i32 4 store i32 10, i32* %54, align 4 %55 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @4, i32 0, i32 0)) %56 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %47, i32 0, i32 0 %57 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %48, i32 0, i32 0 %58 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %56, i32 0, i32 2 %59 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %56, i32 0, i32 0 store i1 true, i1* %59, align 1 %60 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %56, i32 0, i32 1 store i8* %55, i8** %60, align 8 store { i8*, i32, i32, i32, i32 }* %57, { i8*, i32, i32, i32, i32 }** %58, align 8 %61 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %56, i32 0, i32 3 store i32 1, i32* %61, align 4 %62 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %47, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %62, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @7, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @4, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont8: ; preds = %"~select_type_block_1.start" %63 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %64 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %63, align 1 %65 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %66 = bitcast %select_type_13_module.shape.3_class* %65 to %select_type_13_module.circle.5_class* %67 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %66, i32 0, i32 1 %68 = load %select_type_13_module.circle.5*, %select_type_13_module.circle.5** %67, align 8 %69 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %68, i32 0, i32 1 store float 1.000000e+01, float* %69, align 4 %70 = alloca i64, align 8 %71 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s1, align 8 %72 = ptrtoint %select_type_13_module.shape.3_class** %71 to i64 %73 = icmp eq i64 %72, 0 br i1 %73, label %then9, label %ifcont10 then9: ; preds = %ifcont8 %74 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %75 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %76 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %75, i32 0, i32 0 %77 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @10, i32 0, i32 0), i8** %77, align 8 %78 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 1 store i32 57, i32* %78, align 4 %79 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 2 store i32 16, i32* %79, align 4 %80 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 3 store i32 57, i32* %80, align 4 %81 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %76, i32 0, i32 4 store i32 19, i32* %81, align 4 %82 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @9, i32 0, i32 0)) %83 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %74, i32 0, i32 0 %84 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %75, i32 0, i32 0 %85 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 2 %86 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 0 store i1 true, i1* %86, align 1 %87 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 1 store i8* %82, i8** %87, align 8 store { i8*, i32, i32, i32, i32 }* %84, { i8*, i32, i32, i32, i32 }** %85, align 8 %88 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %83, i32 0, i32 3 store i32 1, i32* %88, align 4 %89 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %74, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %89, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @12, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @9, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont10: ; preds = %ifcont8 %90 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %91 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %90, align 1 %92 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %93 = bitcast %select_type_13_module.shape.3_class* %92 to %select_type_13_module.circle.5_class* %94 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %93, i32 0, i32 1 %95 = load %select_type_13_module.circle.5*, %select_type_13_module.circle.5** %94, align 8 %96 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %95, i32 0, i32 1 %97 = load float, float* %96, align 4 %98 = alloca float, align 4 store float %97, float* %98, align 4 %99 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %70, i32 0, i32 0, i32 0, i32 0, i32 0, float* %98) %100 = load i64, i64* %70, align 8 %101 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %99, i8** %101, align 8 %102 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %100, i64* %102, align 8 %103 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %104 = load i8*, i8** %103, align 8 %105 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %106 = load i64, i64* %105, align 8 %107 = trunc i64 %106 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %104, i32 %107, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %108 = icmp eq i8* %99, null br i1 %108, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont10 call void @_lfortran_free_alloc(i8* %2, i8* %99) br label %free_done free_done: ; preds = %free_nonnull, %ifcont10 %109 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s1, align 8 %110 = ptrtoint %select_type_13_module.shape.3_class** %109 to i64 %111 = icmp eq i64 %110, 0 br i1 %111, label %then11, label %ifcont12 then11: ; preds = %free_done %112 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %113 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %114 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %113, i32 0, i32 0 %115 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %114, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @15, i32 0, i32 0), i8** %115, align 8 %116 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %114, i32 0, i32 1 store i32 58, i32* %116, align 4 %117 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %114, i32 0, i32 2 store i32 11, i32* %117, align 4 %118 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %114, i32 0, i32 3 store i32 58, i32* %118, align 4 %119 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %114, i32 0, i32 4 store i32 14, i32* %119, align 4 %120 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @16, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @14, i32 0, i32 0)) %121 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %112, i32 0, i32 0 %122 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %113, i32 0, i32 0 %123 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %121, i32 0, i32 2 %124 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %121, i32 0, i32 0 store i1 true, i1* %124, align 1 %125 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %121, i32 0, i32 1 store i8* %120, i8** %125, align 8 store { i8*, i32, i32, i32, i32 }* %122, { i8*, i32, i32, i32, i32 }** %123, align 8 %126 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %121, i32 0, i32 3 store i32 1, i32* %126, align 4 %127 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %112, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %127, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @14, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont12: ; preds = %free_done %128 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %129 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %128, align 1 %130 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 %131 = bitcast %select_type_13_module.shape.3_class* %130 to %select_type_13_module.circle.5_class* %132 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %131, i32 0, i32 1 %133 = load %select_type_13_module.circle.5*, %select_type_13_module.circle.5** %132, align 8 %134 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %133, i32 0, i32 1 %135 = load float, float* %134, align 4 %136 = fcmp une float %135, 1.000000e+01 br i1 %136, label %then13, label %else14 then13: ; preds = %ifcont12 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @18, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont15 else14: ; preds = %ifcont12 br label %ifcont15 ifcont15: ; preds = %else14, %then13 br label %"~select_type_block_1.end" "~select_type_block_1.end": ; preds = %ifcont15 br label %"FINALIZE_SYMTABLE_~select_type_block_1" "FINALIZE_SYMTABLE_~select_type_block_1": ; preds = %"~select_type_block_1.end" call void @llvm.stackrestore(i8* %42) br label %ifcont17 else16: ; preds = %ifcont6 br label %"~select_type_block_2.start" "~select_type_block_2.start": ; preds = %else16 %137 = call i8* @llvm.stacksave() %138 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.4, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @21, i32 0, i32 0), i8* %138, i32 16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @20, i32 0, i32 0), i32 1) br label %"~select_type_block_2.end" "~select_type_block_2.end": ; preds = %"~select_type_block_2.start" br label %"FINALIZE_SYMTABLE_~select_type_block_2" "FINALIZE_SYMTABLE_~select_type_block_2": ; preds = %"~select_type_block_2.end" call void @llvm.stackrestore(i8* %137) br label %ifcont17 ifcont17: ; preds = %"FINALIZE_SYMTABLE_~select_type_block_2", %"FINALIZE_SYMTABLE_~select_type_block_1", %"FINALIZE_SYMTABLE_~select_type_block_" %139 = call i8* @_lfortran_get_default_allocator() %140 = call i8* @_lfortran_malloc_alloc(i8* %139, i64 8) call void @llvm.memset.p0i8.i32(i8* %140, i8 0, i32 8, i1 false) %141 = call i8* @_lfortran_get_default_allocator() %142 = call i8* @_lfortran_malloc_alloc(i8* %141, i64 16) call void @llvm.memset.p0i8.i32(i8* %142, i8 0, i32 16, i1 false) %143 = bitcast i8* %142 to %select_type_13_module.shape.3_class* store %select_type_13_module.shape.3_class* %143, %select_type_13_module.shape.3_class** %s2, align 8 %144 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %145 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %144, i32 0, i32 1 %146 = bitcast i8* %140 to %select_type_13_module.shape.3* store %select_type_13_module.shape.3* %146, %select_type_13_module.shape.3** %145, align 8 %147 = load %select_type_13_module.shape.3*, %select_type_13_module.shape.3** %145, align 8 %148 = bitcast %select_type_13_module.shape.3* %147 to %select_type_13_module.rectangle.6* %149 = bitcast %select_type_13_module.shape.3_class* %143 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_rectangle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %149, align 8 %150 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %148, i32 0, i32 1 %151 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %148, i32 0, i32 2 %152 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %148, i32 0, i32 0 %153 = alloca i1, align 1 %154 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %155 = ptrtoint %select_type_13_module.shape.3_class* %154 to i64 %156 = icmp eq i64 %155, 0 br i1 %156, label %then19, label %else20 then18: ; preds = %ifcont21 br label %"~select_type_block_3.start" then19: ; preds = %ifcont17 %157 = alloca i32 (...)**, align 8 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_shape, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %157, align 8 %158 = bitcast i32 (...)*** %157 to i8* %159 = call i8* @__lfortran_dynamic_cast(i8* %158, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i1 false) %160 = icmp ne i8* %159, null store i1 %160, i1* %153, align 1 br label %ifcont21 else20: ; preds = %ifcont17 %161 = bitcast %select_type_13_module.shape.3_class* %154 to i8* %162 = call i8* @__lfortran_dynamic_cast(i8* %161, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_circle to i8*), i1 false) %163 = icmp ne i8* %162, null store i1 %163, i1* %153, align 1 br label %ifcont21 ifcont21: ; preds = %else20, %then19 %164 = load i1, i1* %153, align 1 br i1 %164, label %then18, label %else22 "~select_type_block_3.start": ; preds = %then18 %165 = call i8* @llvm.stacksave() %166 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.6, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @23, i32 0, i32 0), i8* %166, i32 17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @22, i32 0, i32 0), i32 1) br label %"~select_type_block_3.end" "~select_type_block_3.end": ; preds = %"~select_type_block_3.start" br label %"FINALIZE_SYMTABLE_~select_type_block_3" "FINALIZE_SYMTABLE_~select_type_block_3": ; preds = %"~select_type_block_3.end" call void @llvm.stackrestore(i8* %165) br label %ifcont49 else22: ; preds = %ifcont21 %167 = alloca i1, align 1 %168 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %169 = ptrtoint %select_type_13_module.shape.3_class* %168 to i64 %170 = icmp eq i64 %169, 0 br i1 %170, label %then24, label %else25 then23: ; preds = %ifcont26 br label %"~select_type_block_4.start" then24: ; preds = %else22 %171 = alloca i32 (...)**, align 8 store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_shape, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %171, align 8 %172 = bitcast i32 (...)*** %171 to i8* %173 = call i8* @__lfortran_dynamic_cast(i8* %172, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_rectangle to i8*), i1 false) %174 = icmp ne i8* %173, null store i1 %174, i1* %167, align 1 br label %ifcont26 else25: ; preds = %else22 %175 = bitcast %select_type_13_module.shape.3_class* %168 to i8* %176 = call i8* @__lfortran_dynamic_cast(i8* %175, i8* bitcast ({ i8*, i8*, i8* }* @_Type_Info_rectangle to i8*), i1 false) %177 = icmp ne i8* %176, null store i1 %177, i1* %167, align 1 br label %ifcont26 ifcont26: ; preds = %else25, %then24 %178 = load i1, i1* %167, align 1 br i1 %178, label %then23, label %else48 "~select_type_block_4.start": ; preds = %then23 %179 = call i8* @llvm.stacksave() %180 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.8, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @25, i32 0, i32 0), i8* %180, i32 20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @24, i32 0, i32 0), i32 1) %181 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %182 = ptrtoint %select_type_13_module.shape.3_class** %181 to i64 %183 = icmp eq i64 %182, 0 br i1 %183, label %then27, label %ifcont28 then27: ; preds = %"~select_type_block_4.start" %184 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %185 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %186 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %185, i32 0, i32 0 %187 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %186, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @27, i32 0, i32 0), i8** %187, align 8 %188 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %186, i32 0, i32 1 store i32 72, i32* %188, align 4 %189 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %186, i32 0, i32 2 store i32 7, i32* %189, align 4 %190 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %186, i32 0, i32 3 store i32 72, i32* %190, align 4 %191 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %186, i32 0, i32 4 store i32 10, i32* %191, align 4 %192 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @28, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @26, i32 0, i32 0)) %193 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %184, i32 0, i32 0 %194 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %185, i32 0, i32 0 %195 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %193, i32 0, i32 2 %196 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %193, i32 0, i32 0 store i1 true, i1* %196, align 1 %197 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %193, i32 0, i32 1 store i8* %192, i8** %197, align 8 store { i8*, i32, i32, i32, i32 }* %194, { i8*, i32, i32, i32, i32 }** %195, align 8 %198 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %193, i32 0, i32 3 store i32 1, i32* %198, align 4 %199 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %184, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %199, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @26, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont28: ; preds = %"~select_type_block_4.start" %200 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %201 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %200, align 1 %202 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %203 = bitcast %select_type_13_module.shape.3_class* %202 to %select_type_13_module.rectangle.6_class* %204 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %203, i32 0, i32 1 %205 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %204, align 8 %206 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %205, i32 0, i32 1 store float 5.000000e+00, float* %206, align 4 %207 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %208 = ptrtoint %select_type_13_module.shape.3_class** %207 to i64 %209 = icmp eq i64 %208, 0 br i1 %209, label %then29, label %ifcont30 then29: ; preds = %ifcont28 %210 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %211 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %212 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %211, i32 0, i32 0 %213 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %212, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @31, i32 0, i32 0), i8** %213, align 8 %214 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %212, i32 0, i32 1 store i32 73, i32* %214, align 4 %215 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %212, i32 0, i32 2 store i32 7, i32* %215, align 4 %216 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %212, i32 0, i32 3 store i32 73, i32* %216, align 4 %217 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %212, i32 0, i32 4 store i32 10, i32* %217, align 4 %218 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @32, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @30, i32 0, i32 0)) %219 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %210, i32 0, i32 0 %220 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %211, i32 0, i32 0 %221 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %219, i32 0, i32 2 %222 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %219, i32 0, i32 0 store i1 true, i1* %222, align 1 %223 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %219, i32 0, i32 1 store i8* %218, i8** %223, align 8 store { i8*, i32, i32, i32, i32 }* %220, { i8*, i32, i32, i32, i32 }** %221, align 8 %224 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %219, i32 0, i32 3 store i32 1, i32* %224, align 4 %225 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %210, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %225, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @30, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont30: ; preds = %ifcont28 %226 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %227 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %226, align 1 %228 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %229 = bitcast %select_type_13_module.shape.3_class* %228 to %select_type_13_module.rectangle.6_class* %230 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %229, i32 0, i32 1 %231 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %230, align 8 %232 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %231, i32 0, i32 2 store float 4.000000e+00, float* %232, align 4 %233 = alloca i64, align 8 %234 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %235 = ptrtoint %select_type_13_module.shape.3_class** %234 to i64 %236 = icmp eq i64 %235, 0 br i1 %236, label %then31, label %ifcont32 then31: ; preds = %ifcont30 %237 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %238 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %239 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %238, i32 0, i32 0 %240 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %239, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @36, i32 0, i32 0), i8** %240, align 8 %241 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %239, i32 0, i32 1 store i32 74, i32* %241, align 4 %242 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %239, i32 0, i32 2 store i32 16, i32* %242, align 4 %243 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %239, i32 0, i32 3 store i32 74, i32* %243, align 4 %244 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %239, i32 0, i32 4 store i32 19, i32* %244, align 4 %245 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @37, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @35, i32 0, i32 0)) %246 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %237, i32 0, i32 0 %247 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %238, i32 0, i32 0 %248 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %246, i32 0, i32 2 %249 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %246, i32 0, i32 0 store i1 true, i1* %249, align 1 %250 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %246, i32 0, i32 1 store i8* %245, i8** %250, align 8 store { i8*, i32, i32, i32, i32 }* %247, { i8*, i32, i32, i32, i32 }** %248, align 8 %251 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %246, i32 0, i32 3 store i32 1, i32* %251, align 4 %252 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %237, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %252, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @38, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @35, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont32: ; preds = %ifcont30 %253 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %254 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %253, align 1 %255 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %256 = bitcast %select_type_13_module.shape.3_class* %255 to %select_type_13_module.rectangle.6_class* %257 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %256, i32 0, i32 1 %258 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %257, align 8 %259 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %258, i32 0, i32 1 %260 = load float, float* %259, align 4 %261 = alloca float, align 4 store float %260, float* %261, align 4 %262 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %263 = ptrtoint %select_type_13_module.shape.3_class** %262 to i64 %264 = icmp eq i64 %263, 0 br i1 %264, label %then33, label %ifcont34 then33: ; preds = %ifcont32 %265 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %266 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %267 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %266, i32 0, i32 0 %268 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %267, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @40, i32 0, i32 0), i8** %268, align 8 %269 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %267, i32 0, i32 1 store i32 74, i32* %269, align 4 %270 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %267, i32 0, i32 2 store i32 22, i32* %270, align 4 %271 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %267, i32 0, i32 3 store i32 74, i32* %271, align 4 %272 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %267, i32 0, i32 4 store i32 25, i32* %272, align 4 %273 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @41, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @39, i32 0, i32 0)) %274 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %265, i32 0, i32 0 %275 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %266, i32 0, i32 0 %276 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %274, i32 0, i32 2 %277 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %274, i32 0, i32 0 store i1 true, i1* %277, align 1 %278 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %274, i32 0, i32 1 store i8* %273, i8** %278, align 8 store { i8*, i32, i32, i32, i32 }* %275, { i8*, i32, i32, i32, i32 }** %276, align 8 %279 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %274, i32 0, i32 3 store i32 1, i32* %279, align 4 %280 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %265, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %280, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @42, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @39, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont34: ; preds = %ifcont32 %281 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %282 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %281, align 1 %283 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %284 = bitcast %select_type_13_module.shape.3_class* %283 to %select_type_13_module.rectangle.6_class* %285 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %284, i32 0, i32 1 %286 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %285, align 8 %287 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %286, i32 0, i32 2 %288 = load float, float* %287, align 4 %289 = alloca float, align 4 store float %288, float* %289, align 4 %290 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info.9, i32 0, i32 0), i64* %233, i32 0, i32 0, i32 0, i32 0, i32 0, float* %261, float* %289) %291 = load i64, i64* %233, align 8 %292 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc35, i32 0, i32 0 store i8* %290, i8** %292, align 8 %293 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc35, i32 0, i32 1 store i64 %291, i64* %293, align 8 %294 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc35, i32 0, i32 0 %295 = load i8*, i8** %294, align 8 %296 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc35, i32 0, i32 1 %297 = load i64, i64* %296, align 8 %298 = trunc i64 %297 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @43, i32 0, i32 0), i8* %295, i32 %298, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @34, i32 0, i32 0), i32 1) %299 = icmp eq i8* %290, null br i1 %299, label %free_done37, label %free_nonnull36 free_nonnull36: ; preds = %ifcont34 call void @_lfortran_free_alloc(i8* %2, i8* %290) br label %free_done37 free_done37: ; preds = %free_nonnull36, %ifcont34 %300 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %301 = ptrtoint %select_type_13_module.shape.3_class** %300 to i64 %302 = icmp eq i64 %301, 0 br i1 %302, label %then38, label %ifcont39 then38: ; preds = %free_done37 %303 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %304 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %305 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %304, i32 0, i32 0 %306 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %305, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @45, i32 0, i32 0), i8** %306, align 8 %307 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %305, i32 0, i32 1 store i32 75, i32* %307, align 4 %308 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %305, i32 0, i32 2 store i32 11, i32* %308, align 4 %309 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %305, i32 0, i32 3 store i32 75, i32* %309, align 4 %310 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %305, i32 0, i32 4 store i32 14, i32* %310, align 4 %311 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @46, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @44, i32 0, i32 0)) %312 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %303, i32 0, i32 0 %313 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %304, i32 0, i32 0 %314 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %312, i32 0, i32 2 %315 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %312, i32 0, i32 0 store i1 true, i1* %315, align 1 %316 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %312, i32 0, i32 1 store i8* %311, i8** %316, align 8 store { i8*, i32, i32, i32, i32 }* %313, { i8*, i32, i32, i32, i32 }** %314, align 8 %317 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %312, i32 0, i32 3 store i32 1, i32* %317, align 4 %318 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %303, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %318, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @47, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @44, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont39: ; preds = %free_done37 %319 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %320 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %319, align 1 %321 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %322 = bitcast %select_type_13_module.shape.3_class* %321 to %select_type_13_module.rectangle.6_class* %323 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %322, i32 0, i32 1 %324 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %323, align 8 %325 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %324, i32 0, i32 1 %326 = load float, float* %325, align 4 %327 = fcmp une float %326, 5.000000e+00 br i1 %327, label %then40, label %else41 then40: ; preds = %ifcont39 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @49, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @48, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont42 else41: ; preds = %ifcont39 br label %ifcont42 ifcont42: ; preds = %else41, %then40 %328 = load %select_type_13_module.shape.3_class**, %select_type_13_module.shape.3_class** %s2, align 8 %329 = ptrtoint %select_type_13_module.shape.3_class** %328 to i64 %330 = icmp eq i64 %329, 0 br i1 %330, label %then43, label %ifcont44 then43: ; preds = %ifcont42 %331 = alloca [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], align 8 %332 = alloca [1 x { i8*, i32, i32, i32, i32 }], align 8 %333 = getelementptr inbounds [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %332, i32 0, i32 0 %334 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %333, i32 0, i32 0 store i8* getelementptr inbounds ([46 x i8], [46 x i8]* @51, i32 0, i32 0), i8** %334, align 8 %335 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %333, i32 0, i32 1 store i32 76, i32* %335, align 4 %336 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %333, i32 0, i32 2 store i32 11, i32* %336, align 4 %337 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %333, i32 0, i32 3 store i32 76, i32* %337, align 4 %338 = getelementptr { i8*, i32, i32, i32, i32 }, { i8*, i32, i32, i32, i32 }* %333, i32 0, i32 4 store i32 14, i32* %338, align 4 %339 = call i8* (i8*, i8*, ...) @_lcompilers_snprintf_alloc(i8* %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @52, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @50, i32 0, i32 0)) %340 = getelementptr inbounds [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %331, i32 0, i32 0 %341 = getelementptr [1 x { i8*, i32, i32, i32, i32 }], [1 x { i8*, i32, i32, i32, i32 }]* %332, i32 0, i32 0 %342 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %340, i32 0, i32 2 %343 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %340, i32 0, i32 0 store i1 true, i1* %343, align 1 %344 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %340, i32 0, i32 1 store i8* %339, i8** %344, align 8 store { i8*, i32, i32, i32, i32 }* %341, { i8*, i32, i32, i32, i32 }** %342, align 8 %345 = getelementptr { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %340, i32 0, i32 3 store i32 1, i32* %345, align 4 %346 = getelementptr [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }], [1 x { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }]* %331, i32 0, i32 0 call void (i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) @_lcompilers_runtime_error(i8* %2, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }* %346, i32 1, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @53, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @50, i32 0, i32 0)) call void @exit(i32 1) unreachable ifcont44: ; preds = %ifcont42 %347 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %348 = load %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %347, align 1 %349 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 %350 = bitcast %select_type_13_module.shape.3_class* %349 to %select_type_13_module.rectangle.6_class* %351 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %350, i32 0, i32 1 %352 = load %select_type_13_module.rectangle.6*, %select_type_13_module.rectangle.6** %351, align 8 %353 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %352, i32 0, i32 2 %354 = load float, float* %353, align 4 %355 = fcmp une float %354, 4.000000e+00 br i1 %355, label %then45, label %else46 then45: ; preds = %ifcont44 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @55, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @54, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont47 else46: ; preds = %ifcont44 br label %ifcont47 ifcont47: ; preds = %else46, %then45 br label %"~select_type_block_4.end" "~select_type_block_4.end": ; preds = %ifcont47 br label %"FINALIZE_SYMTABLE_~select_type_block_4" "FINALIZE_SYMTABLE_~select_type_block_4": ; preds = %"~select_type_block_4.end" call void @llvm.stackrestore(i8* %179) br label %ifcont49 else48: ; preds = %ifcont26 br label %"~select_type_block_5.start" "~select_type_block_5.start": ; preds = %else48 %356 = call i8* @llvm.stacksave() %357 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const.11, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @57, i32 0, i32 0), i8* %357, i32 16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @56, i32 0, i32 0), i32 1) br label %"~select_type_block_5.end" "~select_type_block_5.end": ; preds = %"~select_type_block_5.start" br label %"FINALIZE_SYMTABLE_~select_type_block_5" "FINALIZE_SYMTABLE_~select_type_block_5": ; preds = %"~select_type_block_5.end" call void @llvm.stackrestore(i8* %356) br label %ifcont49 ifcont49: ; preds = %"FINALIZE_SYMTABLE_~select_type_block_5", %"FINALIZE_SYMTABLE_~select_type_block_4", %"FINALIZE_SYMTABLE_~select_type_block_3" br label %return return: ; preds = %ifcont49 br label %FINALIZE_SYMTABLE_select_type_13 FINALIZE_SYMTABLE_select_type_13: ; preds = %return br label %Finalize_Variable_s1 Finalize_Variable_s1: ; preds = %FINALIZE_SYMTABLE_select_type_13 %358 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s1, align 8 call void @finalize_allocatable__StructType_Class__shape_3_of_select_type_13_module(%select_type_13_module.shape.3_class* %358) br label %Finalize_Variable_s2 Finalize_Variable_s2: ; preds = %Finalize_Variable_s1 %359 = load %select_type_13_module.shape.3_class*, %select_type_13_module.shape.3_class** %s2, align 8 call void @finalize_allocatable__StructType_Class__shape_3_of_select_type_13_module(%select_type_13_module.shape.3_class* %359) call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lfortran_malloc_alloc(i8*, i64) declare i8* @_lfortran_get_default_allocator() ; Function Attrs: argmemonly nounwind willreturn writeonly declare void @llvm.memset.p0i8.i32(i8* nocapture writeonly, i8, i32, i1 immarg) #0 define linkonce_odr void @_copy_select_type_13_module_shape(i8* %0, i8* %1) { entry: %2 = bitcast i8* %0 to %select_type_13_module.shape.3* %3 = bitcast i8* %1 to %select_type_13_module.shape.3* ret void } define linkonce_odr void @_allocate_struct_select_type_13_module_shape(i8** %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = call i8* @_lfortran_malloc_alloc(i8* %1, i64 16) call void @llvm.memset.p0i8.i32(i8* %2, i8 0, i32 16, i1 false) store i8* %2, i8** %0, align 8 %3 = load i8*, i8** %0, align 8 %4 = bitcast i8* %3 to %select_type_13_module.shape.3_class* %5 = bitcast %select_type_13_module.shape.3_class* %4 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_shape, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %5, align 8 %6 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %4, i32 0, i32 1 %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 0) call void @llvm.memset.p0i8.i32(i8* %8, i8 0, i32 0, i1 false) %9 = bitcast i8* %8 to %select_type_13_module.shape.3* store %select_type_13_module.shape.3* %9, %select_type_13_module.shape.3** %6, align 8 ret void } define internal void @finalize_StructType__shape_3_of_select_type_13_module_for_UPoly(i8* %0) { entry: %1 = bitcast i8* %0 to %select_type_13_module.shape.3* ret void } define linkonce_odr void @_copy_select_type_13_module_circle(i8* %0, i8* %1) { entry: %2 = bitcast i8* %0 to %select_type_13_module.circle.5* %3 = bitcast i8* %1 to %select_type_13_module.circle.5* %4 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %2, i32 0, i32 1 %5 = load float, float* %4, align 4 %6 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %3, i32 0, i32 1 br i1 true, label %then, label %else then: ; preds = %entry store float %5, float* %6, align 4 br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then %7 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %2, i32 0, i32 0 %8 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %3, i32 0, i32 0 ret void } define linkonce_odr void @_allocate_struct_select_type_13_module_circle(i8** %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = call i8* @_lfortran_malloc_alloc(i8* %1, i64 16) call void @llvm.memset.p0i8.i32(i8* %2, i8 0, i32 16, i1 false) store i8* %2, i8** %0, align 8 %3 = load i8*, i8** %0, align 8 %4 = bitcast i8* %3 to %select_type_13_module.circle.5_class* %5 = bitcast %select_type_13_module.circle.5_class* %4 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_circle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %5, align 8 %6 = getelementptr %select_type_13_module.circle.5_class, %select_type_13_module.circle.5_class* %4, i32 0, i32 1 %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 4) call void @llvm.memset.p0i8.i32(i8* %8, i8 0, i32 4, i1 false) %9 = bitcast i8* %8 to %select_type_13_module.circle.5* store %select_type_13_module.circle.5* %9, %select_type_13_module.circle.5** %6, align 8 %10 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %9, i32 0, i32 1 %11 = getelementptr %select_type_13_module.circle.5, %select_type_13_module.circle.5* %9, i32 0, i32 0 ret void } define internal void @finalize_StructType__circle_5_of_select_type_13_module_for_UPoly(i8* %0) { entry: %1 = bitcast i8* %0 to %select_type_13_module.circle.5* ret void } define linkonce_odr void @_copy_select_type_13_module_rectangle(i8* %0, i8* %1) { entry: %2 = bitcast i8* %0 to %select_type_13_module.rectangle.6* %3 = bitcast i8* %1 to %select_type_13_module.rectangle.6* %4 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %2, i32 0, i32 1 %5 = load float, float* %4, align 4 %6 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %3, i32 0, i32 1 br i1 true, label %then, label %else then: ; preds = %entry store float %5, float* %6, align 4 br label %ifcont else: ; preds = %entry br label %ifcont ifcont: ; preds = %else, %then %7 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %2, i32 0, i32 2 %8 = load float, float* %7, align 4 %9 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %3, i32 0, i32 2 br i1 true, label %then1, label %else2 then1: ; preds = %ifcont store float %8, float* %9, align 4 br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 %10 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %2, i32 0, i32 0 %11 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %3, i32 0, i32 0 ret void } define linkonce_odr void @_allocate_struct_select_type_13_module_rectangle(i8** %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = call i8* @_lfortran_malloc_alloc(i8* %1, i64 16) call void @llvm.memset.p0i8.i32(i8* %2, i8 0, i32 16, i1 false) store i8* %2, i8** %0, align 8 %3 = load i8*, i8** %0, align 8 %4 = bitcast i8* %3 to %select_type_13_module.rectangle.6_class* %5 = bitcast %select_type_13_module.rectangle.6_class* %4 to i32 (...)*** store i32 (...)** bitcast (i8** getelementptr inbounds ({ [6 x i8*] }, { [6 x i8*] }* @_VTable_rectangle, i32 0, i32 0, i32 2) to i32 (...)**), i32 (...)*** %5, align 8 %6 = getelementptr %select_type_13_module.rectangle.6_class, %select_type_13_module.rectangle.6_class* %4, i32 0, i32 1 %7 = call i8* @_lfortran_get_default_allocator() %8 = call i8* @_lfortran_malloc_alloc(i8* %7, i64 8) call void @llvm.memset.p0i8.i32(i8* %8, i8 0, i32 8, i1 false) %9 = bitcast i8* %8 to %select_type_13_module.rectangle.6* store %select_type_13_module.rectangle.6* %9, %select_type_13_module.rectangle.6** %6, align 8 %10 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %9, i32 0, i32 1 %11 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %9, i32 0, i32 2 %12 = getelementptr %select_type_13_module.rectangle.6, %select_type_13_module.rectangle.6* %9, i32 0, i32 0 ret void } define internal void @finalize_StructType__rectangle_6_of_select_type_13_module_for_UPoly(i8* %0) { entry: %1 = bitcast i8* %0 to %select_type_13_module.rectangle.6* ret void } declare i8* @__lfortran_dynamic_cast(i8*, i8*, i1) ; Function Attrs: nounwind declare i8* @llvm.stacksave() #1 declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) ; Function Attrs: nounwind declare void @llvm.stackrestore(i8*) #1 declare i8* @_lcompilers_snprintf_alloc(i8*, i8*, ...) declare void @_lcompilers_runtime_error(i8*, { i1, i8*, { i8*, i32, i32, i32, i32 }*, i32 }*, i32, i8*, ...) declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() define internal void @finalize_allocatable__StructType_Class__shape_3_of_select_type_13_module(%select_type_13_module.shape.3_class* %0) { entry: %1 = call i8* @_lfortran_get_default_allocator() %2 = icmp ne %select_type_13_module.shape.3_class* %0, null br i1 %2, label %is_allocated.then, label %is_allocated.else2 is_allocated.then: ; preds = %entry call void @finalize_StructType_Class__shape_3_of_select_type_13_module(%select_type_13_module.shape.3_class* %0) %3 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %0, i32 0, i32 1 %4 = load %select_type_13_module.shape.3*, %select_type_13_module.shape.3** %3, align 8 %5 = icmp ne %select_type_13_module.shape.3* %4, null br i1 %5, label %is_allocated.then1, label %is_allocated.else is_allocated.then1: ; preds = %is_allocated.then %6 = bitcast %select_type_13_module.shape.3* %4 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %6) br label %is_allocated.ifcont is_allocated.else: ; preds = %is_allocated.then br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then1 %7 = bitcast %select_type_13_module.shape.3_class* %0 to i8* call void @_lfortran_free_alloc(i8* %1, i8* %7) br label %is_allocated.ifcont3 is_allocated.else2: ; preds = %entry br label %is_allocated.ifcont3 is_allocated.ifcont3: ; preds = %is_allocated.else2, %is_allocated.ifcont ret void } define internal void @finalize_StructType_Class__shape_3_of_select_type_13_module(%select_type_13_module.shape.3_class* %0) { entry: %1 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %0, i32 0, i32 0 %2 = load i32 (...)**, i32 (...)*** %1, align 8 %3 = getelementptr %select_type_13_module.shape.3_class, %select_type_13_module.shape.3_class* %0, i32 0, i32 1 %4 = load %select_type_13_module.shape.3**, %select_type_13_module.shape.3** %3, align 8 %5 = bitcast %select_type_13_module.shape.3** %4 to i8* %6 = icmp ne i32 (...)** %2, null br i1 %6, label %is_allocated.then, label %is_allocated.else2 is_allocated.then: ; preds = %entry %7 = getelementptr inbounds i32 (...)*, i32 (...)** %2, i32 2 %8 = load i8*, i32 (...)** %7, align 8 %9 = bitcast i8* %8 to void (i8*)* %10 = icmp ne i8* %5, null br i1 %10, label %is_allocated.then1, label %is_allocated.else is_allocated.then1: ; preds = %is_allocated.then call void %9(i8* %5) br label %is_allocated.ifcont is_allocated.else: ; preds = %is_allocated.then br label %is_allocated.ifcont is_allocated.ifcont: ; preds = %is_allocated.else, %is_allocated.then1 br label %is_allocated.ifcont3 is_allocated.else2: ; preds = %entry br label %is_allocated.ifcont3 is_allocated.ifcont3: ; preds = %is_allocated.else2, %is_allocated.ifcont ret void } attributes #0 = { argmemonly nounwind willreturn writeonly } attributes #1 = { nounwind } lfortran-0.64.0/tests/reference/run-exit1-29ee7ce.stderr0000664000175000017500000000044015227365530023144 0ustar alastairalastairstyle suggestion: Use '==' instead of '.eq.' --> tests/exit1.f90:6:12 | 6 | if ( i .eq. 5 ) then | ^^^^ help: write this as '==' warning: Routine `exit` is a non-standard function --> tests/exit1.f90:7:9 | 7 | call exit(1) | ^^^^^^^^^^^^ STOP 1 lfortran-0.64.0/tests/reference/asr-intrinsics15-76ae493.stderr0000664000175000017500000000032315227365530024265 0ustar alastairalastairsemantic error: Unexpected args, SetExponent expects (real, int) as arguments --> tests/errors/intrinsics15.f90:2:14 | 2 | print *, set_exponent([1, 2, 3], 2) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-global_scope2-970a26a.stdout0000664000175000017500000000144315227365530024457 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { x: (Variable 1 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [(Assignment (Var 1 x) (IntegerConstant 6 (Integer 4) Decimal) () .false. .false. )] ) lfortran-0.64.0/tests/reference/ast-modules_04-a8954ed.json0000664000175000017500000000075015227365530023442 0ustar alastairalastair{ "basename": "ast-modules_04-a8954ed", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_04.f90", "infile_hash": "b04f80d4de5baea50808e962f08564088751c24a464b3d1d7c0c316f", "outfile": null, "outfile_hash": null, "stdout": "ast-modules_04-a8954ed.stdout", "stdout_hash": "2a048504489acee359b2e0fa29789c76861df057ef9d081a8374ac6a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_no_prescan-no_prescan_include2-420be52.json0000664000175000017500000000102115227365530027502 0ustar alastairalastair{ "basename": "ast_no_prescan-no_prescan_include2-420be52", "cmd": "lfortran --no-prescan --show-ast --no-color {infile} -o {outfile}", "infile": "tests/no_prescan_include2.f90", "infile_hash": "68cbbaed9ac272ba7009bc7e89270e6e2a12fd0c540413dc2a0a96eb", "outfile": null, "outfile_hash": null, "stdout": "ast_no_prescan-no_prescan_include2-420be52.stdout", "stdout_hash": "6bcff69480fdc91d83ab9a9df0af32ed41d9a9f594cb553bd8ca2ee7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_58-475e064.stdout0000664000175000017500000000034615227365530023515 0ustar alastairalastairkind name sp dp ep kind: 4 8 8 epsilon: 1.19E-0007 2.22E-0016 2.22E-0016 tiny: 1.18E-0038 2.23E-0308 2.23E-0308 huge: 3.40E+0038 1.80E+0308 1.80E+0308 lfortran-0.64.0/tests/reference/asr-template_simple_01-964c12e.stdout0000664000175000017500000037151615227365530025447 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { template_simple_01: (Program (SymbolTable 18 { cast_r: (ExternalSymbol 18 cast_r 2 cast_r template_simple_01_m [] cast_r Public ), generic_sum: (ExternalSymbol 18 generic_sum 2 generic_sum template_simple_01_m [] generic_sum Public ), operator_r: (ExternalSymbol 18 operator_r 2 operator_r template_simple_01_m [] operator_r Public ), test_template: (ExternalSymbol 18 test_template 2 test_template template_simple_01_m [] test_template Public ) }) template_simple_01 [template_simple_01_m] [(SubroutineCall 18 test_template () [] () .false. )] ), template_simple_01_m: (Module (SymbolTable 2 { cast_integer: (Function (SymbolTable 7 { arg: (Variable 7 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 7 res [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_integer (FunctionType [(Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 7 arg)] [(Assignment (Var 7 res) (IntegerConstant 0 (Integer 4) Decimal) () .false. .false. )] (Var 7 res) Private .true. .true. () ), cast_r: (Requirement (SymbolTable 5 { cast: (Function (SymbolTable 6 { arg: (Variable 6 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 6 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast (FunctionType [(Integer 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 6 arg)] [] (Var 6 res) Private .true. .true. () ), t: (Variable 5 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_r [t cast] [] ), cast_real: (Function (SymbolTable 8 { arg: (Variable 8 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 8 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast_real (FunctionType [(Integer 4)] (Real 4) Source Implementation () .true. .true. .false. .false. .false. [] .false. ) [] [(Var 8 arg)] [(Assignment (Var 8 res) (RealConstant 0.000000 (Real 4) ) () .false. .false. )] (Var 8 res) Private .true. .true. () ), generic_sum: (Template (SymbolTable 9 { add: (Function (SymbolTable 10 { lhs: (Variable 10 lhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 10 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 10 rhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) add (FunctionType [(TypeParameter t ) (TypeParameter t )] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 10 lhs) (Var 10 rhs)] [] (Var 10 res) Private .true. .true. () ), cast: (Function (SymbolTable 11 { arg: (Variable 11 arg [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 11 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cast (FunctionType [(Integer 4)] (TypeParameter t ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 11 arg)] [] (Var 11 res) Private .true. .true. () ), generic_sum: (Function (SymbolTable 12 { arr: (Variable 12 arr [] In () () Default (Array (TypeParameter t ) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 12 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 12 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 12 res [] ReturnVar () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum (FunctionType [(Array (TypeParameter t ) [(() ())] DescriptorArray )] (TypeParameter t ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast add] [(Var 12 arr)] [(Assignment (Var 12 n) (ArraySize (Var 12 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 12 res) (FunctionCall 9 cast () [((IntegerConstant 0 (Integer 4) Decimal))] (TypeParameter t ) () () ) () .false. .false. ) (If () (IntegerCompare (Var 12 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 12 res) (ArrayItem (Var 12 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (TypeParameter t ) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 12 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 12 n) ()) [(Assignment (Var 12 res) (FunctionCall 9 add () [((Var 12 res)) ((ArrayItem (Var 12 arr) [(() (Var 12 i) ())] (TypeParameter t ) ColMajor () ))] (TypeParameter t ) () () ) () .false. .false. )] [] )] [] )] (Var 12 res) Public .true. .true. () ), t: (Variable 9 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum [t add cast] [(Require operator_r [t add] ) (Require cast_r [t cast] )] ), operator_r: (Requirement (SymbolTable 3 { binary_func: (Function (SymbolTable 4 { lhs: (Variable 4 lhs [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 4 res [] ReturnVar () () Default (TypeParameter v ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) binary_func (FunctionType [(TypeParameter t ) (TypeParameter u )] (TypeParameter v ) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 4 lhs) (Var 4 rhs)] [] (Var 4 res) Private .true. .true. () ), t: (Variable 3 t [] In () () Default (TypeParameter t ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), u: (Variable 3 u [] In () () Default (TypeParameter u ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), v: (Variable 3 v [] In () () Default (TypeParameter v ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) operator_r [t u v binary_func] [] ), test_template: (Function (SymbolTable 13 { a_i: (Variable 13 a_i [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), a_r: (Variable 13 a_r [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), generic_sum_integer: (Function (SymbolTable 15 { arr: (Variable 15 arr [] In () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 15 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 15 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 15 res [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum_integer (FunctionType [(Array (Integer 4) [(() ())] DescriptorArray )] (Integer 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast_integer ~add_intrinsic] [(Var 15 arr)] [(Assignment (Var 15 n) (ArraySize (Var 15 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 15 res) (FunctionCall 2 cast_integer () [((IntegerConstant 0 (Integer 4) Decimal))] (Integer 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 15 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 15 res) (ArrayItem (Var 15 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 15 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 15 n) ()) [(Assignment (Var 15 res) (FunctionCall 13 ~add_intrinsic () [((Var 15 res)) ((ArrayItem (Var 15 arr) [(() (Var 15 i) ())] (Integer 4) ColMajor () ))] (Integer 4) () () ) () .false. .false. )] [] )] [] )] (Var 15 res) Public .true. .true. () ), generic_sum_real: (Function (SymbolTable 17 { arr: (Variable 17 arr [] In () () Default (Array (Real 4) [(() ())] DescriptorArray ) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 17 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 17 n [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 17 res [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) generic_sum_real (FunctionType [(Array (Real 4) [(() ())] DescriptorArray )] (Real 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [cast_real ~add_intrinsic1] [(Var 17 arr)] [(Assignment (Var 17 n) (ArraySize (Var 17 arr) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 17 res) (FunctionCall 2 cast_real () [((IntegerConstant 0 (Integer 4) Decimal))] (Real 4) () () ) () .false. .false. ) (If () (IntegerCompare (Var 17 n) Gt (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) () ) [(Assignment (Var 17 res) (ArrayItem (Var 17 arr) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) () .false. .false. ) (DoLoop () ((Var 17 i) (IntegerConstant 2 (Integer 4) Decimal) (Var 17 n) ()) [(Assignment (Var 17 res) (FunctionCall 13 ~add_intrinsic1 () [((Var 17 res)) ((ArrayItem (Var 17 arr) [(() (Var 17 i) ())] (Real 4) ColMajor () ))] (Real 4) () () ) () .false. .false. )] [] )] [] )] (Var 17 res) Public .true. .true. () ), i: (Variable 13 i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s_i: (Variable 13 s_i [] Local () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), s_r: (Variable 13 s_r [] Local () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ~add: (CustomOperator 13 ~add [13 ~add_intrinsic 13 ~add_intrinsic1] Public ), ~add_intrinsic: (Function (SymbolTable 14 { arg0: (Variable 14 arg0 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 14 arg1 [] In () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 14 ret [] ReturnVar () () Default (Integer 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic (FunctionType [(Integer 4) (Integer 4)] (Integer 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 14 arg0) (Var 14 arg1)] [(Assignment (Var 14 ret) (IntegerBinOp (Var 14 arg0) Add (Var 14 arg1) (Integer 4) () ) () .false. .false. )] (Var 14 ret) Public .true. .true. () ), ~add_intrinsic1: (Function (SymbolTable 16 { arg0: (Variable 16 arg0 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), arg1: (Variable 16 arg1 [] In () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ), ret: (Variable 16 ret [] ReturnVar () () Default (Real 4) () Source Private Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ~add_intrinsic1 (FunctionType [(Real 4) (Real 4)] (Real 4) Source Implementation () .true. .true. .false. .false. .false. [] .true. ) [] [(Var 16 arg0) (Var 16 arg1)] [(Assignment (Var 16 ret) (RealBinOp (Var 16 arg0) Add (Var 16 arg1) (Real 4) () ) () .false. .false. )] (Var 16 ret) Public .true. .true. () ) }) test_template (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(DoLoop () ((Var 13 i) (IntegerConstant 1 (Integer 4) Decimal) (ArraySize (Var 13 a_i) () (Integer 4) (IntegerConstant 10 (Integer 4) Decimal) ) ()) [(Assignment (ArrayItem (Var 13 a_i) [(() (Var 13 i) ())] (Integer 4) ColMajor () ) (Var 13 i) () .false. .false. ) (Assignment (ArrayItem (Var 13 a_r) [(() (Var 13 i) ())] (Real 4) ColMajor () ) (Cast (Var 13 i) IntegerToReal (Real 4) () () ) () .false. .false. )] [] ) (Assignment (Var 13 s_i) (FunctionCall 13 generic_sum_integer () [((ArrayPhysicalCast (Var 13 a_i) FixedSizeArray DescriptorArray (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Integer 4) () () ) () .false. .false. ) (Assignment (Var 13 s_r) (FunctionCall 13 generic_sum_real () [((ArrayPhysicalCast (Var 13 a_r) FixedSizeArray DescriptorArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] DescriptorArray ) () ))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 13 s_i)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(Var 13 s_r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] () Public .false. .false. () ) }) template_simple_01_m () [template_simple_01_m] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-global_scope1-dd9aaaa.json0000664000175000017500000000073415227365530024404 0ustar alastairalastair{ "basename": "ast-global_scope1-dd9aaaa", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/global_scope1.f90", "infile_hash": "449b38487b6c79754deedb9991f1867bcf8c67d0d93019c2fe15854c", "outfile": null, "outfile_hash": null, "stdout": "ast-global_scope1-dd9aaaa.stdout", "stdout_hash": "6fa8960cf7f538bc4b28ffb155c8afa72da87b32edf0fb758faffd2e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-write4-f453580.json0000664000175000017500000000065715227365530022563 0ustar alastairalastair{ "basename": "run-write4-f453580", "cmd": "lfortran --no-color {infile}", "infile": "tests/write4.f90", "infile_hash": "3ea1b036446d9c3c9948c04d5b3bba170d5163d80d23e55ae2249956", "outfile": null, "outfile_hash": null, "stdout": "run-write4-f453580.stdout", "stdout_hash": "53a3d179203f266f36431d4b08c3759a60fd29395f9c14e7097066d7", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-statement1-60b7ed3.json0000664000175000017500000000072315227365530023541 0ustar alastairalastair{ "basename": "asr-statement1-60b7ed3", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/statement1.f90", "infile_hash": "3d828667fda659d080d10043c790e05aa1fa73d1f920b2c4e38fe751", "outfile": null, "outfile_hash": null, "stdout": "asr-statement1-60b7ed3.stdout", "stdout_hash": "37701641cf8c82edfe3aea990d46f66f5db88d390c9b57148936bd9f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format3-ee61b31.stdout0000664000175000017500000000014315227365530023407 0ustar alastairalastair 12.3457E+03 123.4568E-06 1.2346E+03 ********** ********** -1.2346E+03 -123.45679E-06 0.0000E+00 lfortran-0.64.0/tests/reference/ast-nested_02-68e8526.json0000664000175000017500000000074515227365530023122 0ustar alastairalastair{ "basename": "ast-nested_02-68e8526", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_02.f90", "infile_hash": "6ff700b8b837d9efad78b5ed4d8defc823333a19f8afa37c7da6899d", "outfile": null, "outfile_hash": null, "stdout": "ast-nested_02-68e8526.stdout", "stdout_hash": "d5993dd76c2694fb55579b390622320488c7a9f0ca5b6389020ee0b3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_indent-subroutine1-41f648b.json0000664000175000017500000000074415227365530025224 0ustar alastairalastair{ "basename": "asr_indent-subroutine1-41f648b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/subroutine1.f90", "infile_hash": "e209c22328b423e75d6801f3c0ef19bc120936196435dff2cb19df31", "outfile": null, "outfile_hash": null, "stdout": "asr_indent-subroutine1-41f648b.stdout", "stdout_hash": "3437cd5c62036b6bdd9f8d0c156923e3dc5abe8ab7f45354544a5fa2", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-auxiliary_IO_1-36af6ad.json0000664000175000017500000000076515227365530024362 0ustar alastairalastair{ "basename": "ast-auxiliary_IO_1-36af6ad", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/auxiliary_IO_1.f", "infile_hash": "6be10531c17bcd0a753784768cbd756393fcb08d05bae273201dbe30", "outfile": null, "outfile_hash": null, "stdout": "ast-auxiliary_IO_1-36af6ad.stdout", "stdout_hash": "11976ffa040614bba3d9fa046092e4b2a24f52a71271a9ae54b7f03d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_global_stmts-expr2-22f4149.stdout0000664000175000017500000000453615227365530025667 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { f: (Function (SymbolTable 2 { f1: (Variable 2 f1 [] ReturnVar () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [] (Integer 4) BindC Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 2 f1) (IntegerBinOp (IntegerConstant 5 (Integer 4) Decimal) Add (IntegerConstant 3 (Integer 4) Decimal) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) () .false. .false. )] (Var 2 f1) Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_23-a731033.json0000664000175000017500000000074515227365530023114 0ustar alastairalastair{ "basename": "asr-arrays_23-a731033", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_23.f90", "infile_hash": "c1df25817ea3eccb99df382b51ecfda76c3129aba44ff3492a1826d8", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_23-a731033.stdout", "stdout_hash": "81c838ca48067212811407ed4648c35f97c5debf141325ce35f3a0e4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do2-8eeb477.stdout0000664000175000017500000000070015227365530022521 0ustar alastairalastair(TranslationUnit [(Subroutine g [] [] () () [] [] [] [] [(DoLoop 0 () 1 i 1 2 () [(GoTo 0 () 1 [] () )] () () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr-complex_div_test-21dab13.stdout0000664000175000017500000001544415227365530025366 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { complex2: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) complex2 [] [(Assignment (Var 2 x) (ComplexConstructor (RealConstant 3.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.000000 4.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 x) (ComplexBinOp (Var 2 x) Div (Cast (RealConstant 4.000000 (Real 4) ) RealToComplex (Complex 4) (ComplexConstant 4.000000 0.000000 (Complex 4) ) () ) (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (ComplexBinOp (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 2.000000 0.000000 (Complex 4) ) () ) Div (Var 2 x) (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x) (ComplexBinOp (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 1.000000 0.000000 (Complex 4) ) () ) Div (ComplexBinOp (Var 2 x) Add (ComplexConstructor (RealConstant 0.000000 (Real 4) ) (RealConstant 3.000000 (Real 4) ) (Complex 4) (ComplexConstant 0.000000 3.000000 (Complex 4) ) ) (Complex 4) () ) (Complex 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-allow_implicit_interface3-7ef92cc.json0000664000175000017500000000102515227365530026653 0ustar alastairalastair{ "basename": "asr-allow_implicit_interface3-7ef92cc", "cmd": "lfortran --show-asr --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/allow_implicit_interface3.f90", "infile_hash": "5fcc5115d2a0075d81d764ef81ce63c8e8445a36670e6425bdec8ded", "outfile": null, "outfile_hash": null, "stdout": "asr-allow_implicit_interface3-7ef92cc.stdout", "stdout_hash": "a5c6c31a5c236cc9856ac714929771046d0663695f2d41416027ba94", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-do5-4355d03.stdout0000664000175000017500000000605215227365530022354 0ustar alastairalastair(TranslationUnit [(Program do5 () [] [(ImplicitNone [] () )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ()) (j [] [] () () None ()) (k [] [] () () None ()) (enddo [] [] () () None ())] () )] [(Assignment 0 j 0 () ) (DoLoop 0 () 15 i 1 5 () [(Assignment 15 j (+ j i) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 j 0 () ) (DoLoop 0 () 16 i 1 5 () [(Assignment 16 enddo 5 () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 j 0 () ) (DoLoop 0 () 20 i 1 6 2 [(Assignment 20 j (+ j i) () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Assignment 0 k 0 () ) (DoLoop 0 () 30 i 1 5 () [(DoLoop 0 () 35 j 1 5 () [(Continue 31 () ) (Assignment 35 k (+ k 1) () )] () () ) (Continue 33 () ) (Assignment 30 k (+ k 1) () )] () () ) (Continue 40 () )] [] )] ) lfortran-0.64.0/tests/reference/asr-submodule_04-987b68b.json0000664000175000017500000000075615227365530023723 0ustar alastairalastair{ "basename": "asr-submodule_04-987b68b", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/submodule_04.f90", "infile_hash": "642c924ba406c1301d4f17d3aa23330c0c88836827e2ccc9a223fe50", "outfile": null, "outfile_hash": null, "stdout": "asr-submodule_04-987b68b.stdout", "stdout_hash": "b7ac9c52a93ace152fa8372f96586d57b193e284f3bf3a0cc27e0398", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_23-fdedfdb.stdout0000664000175000017500000000137215227365530024145 0ustar alastairalastairBinary format for real(4): x1 (3.14): 1000000010010001111010111000011 x1 (3.14): ********** x1 (3.14): 1000000010010001111010111000011 y1 (-2.5): 11000000001000000000000000000000 y1 (-2.5): ********** y1 (-2.5): 11000000001000000000000000000000 z1 (0.0): 0 z1 (0.0): 0 Binary format for real(8): x8 (3.14): 100000000001001000111101011100001010001111010111000010100011111 x8 (3.14): ********** x8 (3.14): 100000000001001000111101011100001010001111010111000010100011111 y8 (-2.5): 1100000000000100000000000000000000000000000000000000000000000000 y8 (-2.5): ********** y8 (-2.5): 1100000000000100000000000000000000000000000000000000000000000000 z8 (0.0): 0 z8 (0.0): 0 lfortran-0.64.0/tests/reference/asr-derived_type1-c109ce6.json0000664000175000017500000000073415227365530024222 0ustar alastairalastair{ "basename": "asr-derived_type1-c109ce6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/derived_type1.f90", "infile_hash": "ed39e2004e29457f0f83e6a1badf6ecbee98749ca624594fc0160e52", "outfile": null, "outfile_hash": null, "stdout": "asr-derived_type1-c109ce6.stdout", "stdout_hash": "e77736c8108ab4715b993fa49c6d686e694931f9a23560803057c972", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-modules_11-1131557.json0000664000175000017500000000075015227365530023203 0ustar alastairalastair{ "basename": "ast-modules_11-1131557", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_11.f90", "infile_hash": "f19a5ba8d01ebaae3da78891afbae58462d711a364274aa3a5569fa1", "outfile": null, "outfile_hash": null, "stdout": "ast-modules_11-1131557.stdout", "stdout_hash": "55df6502cfe05f7264ab8085c1865fa46d218804e1865d03caff299a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-parameter_without_start_program-a99ac57.json0000664000175000017500000000103115227365530030166 0ustar alastairalastair{ "basename": "ast-parameter_without_start_program-a99ac57", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parser/parameter_without_start_program.f90", "infile_hash": "2e9169dd781045b7103a73b5edc20a422355169a278a6bf1f7f8323d", "outfile": null, "outfile_hash": null, "stdout": "ast-parameter_without_start_program-a99ac57.stdout", "stdout_hash": "5df73fd7386389919b5b62e9f0083173af9e8f6fd9efb263eba84599", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-format_22-e96df3d.json0000664000175000017500000000071515227365530023361 0ustar alastairalastair{ "basename": "run-format_22-e96df3d", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/format_22.f90", "infile_hash": "1dcaaa4dc928be3bf1cb4d6eb0c015f8a2f8b200f162c64edeb5d5ab", "outfile": null, "outfile_hash": null, "stdout": "run-format_22-e96df3d.stdout", "stdout_hash": "aaed5b96f9c6c47f2f0e9540ae90f1e75afcb8a8b0c66cfe9a278ed3", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-allocate_05-48fb994.stdout0000664000175000017500000001416415227365530024060 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { allocate_05: (Program (SymbolTable 2 { num: (Variable 2 num [] Local () () Default (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 2 string [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) allocate_05 [] [(Allocate [((Var 2 string) [] (IntegerConstant 3 (Integer 4) Decimal) () (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Assignment (Var 2 num) (StringConstant "abc" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) () .false. .false. ) (Assignment (Var 2 string) (Var 2 num) () .false. .false. ) (If () (StringCompare (Var 2 string) NotEq (StringConstant "abc" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (StringSection (Var 2 string) (IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 2 string) (Integer 4) () ) (IntegerConstant 1 (Integer 4) Decimal) (String 1 (IntegerBinOp (IntegerBinOp (StringLen (Var 2 string) (Integer 4) () ) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) ExpressionLength DescriptorString) () ) (Var 2 num) () .false. .false. ) (If () (StringCompare (Var 2 string) NotEq (StringConstant "abc" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/lookup_name-function_call1-c233951.json0000664000175000017500000000076215227365530025743 0ustar alastairalastair{ "basename": "lookup_name-function_call1-c233951", "cmd": "lfortran --lookup-name --no-color {infile} -o {outfile}", "infile": "tests/function_call1.f90", "infile_hash": "45acf463b1d977f1bdf3d9420205c7979fc03de58d60260cb37fd0bc", "outfile": null, "outfile_hash": null, "stdout": "lookup_name-function_call1-c233951.stdout", "stdout_hash": "be13f54e037b9595915fd749f61a34c9b319d2e2a8cc223684168ef8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-c_f_pointer_01-2d288d7.stderr0000664000175000017500000000033415227365530024523 0ustar alastairalastairsemantic error: shape argument specified in c_f_pointer even though fptr is not an array. --> tests/errors/c_f_pointer_01.f90:5:34 | 5 | call c_f_pointer(queries, x, [2]) | ^^^ lfortran-0.64.0/tests/reference/asr-kind_float_of_int-4b9cf53.json0000664000175000017500000000075715227365530025140 0ustar alastairalastair{ "basename": "asr-kind_float_of_int-4b9cf53", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/kind_float_of_int.f90", "infile_hash": "1162ce1a917f4ce2b50df7b8f496c081a1570e76122108e2108dc009", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-kind_float_of_int-4b9cf53.stderr", "stderr_hash": "cdacf7eb32e15977e7cac4f156b8c8608b50b11cc5506f0f564fd170", "returncode": 2 }././@LongLink0000644000000000000000000000015500000000000011604 Lustar rootrootlfortran-0.64.0/tests/reference/pass_array_struct_temporary_array_op-array_op_simplifier_test-bb5013f.stdoutlfortran-0.64.0/tests/reference/pass_array_struct_temporary_array_op-array_op_simplifier_test-bb50130000664000175000017500000005033215227365530034406 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { __libasr_index_0_: (Variable 2 __libasr_index_0_ [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_index_0_1: (Variable 2 __libasr_index_0_1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_index_0_2: (Variable 2 __libasr_index_0_2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_index_1_: (Variable 2 __libasr_index_1_ [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_index_1_1: (Variable 2 __libasr_index_1_1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), __libasr_index_1_2: (Variable 2 __libasr_index_1_2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Allocatable (Array (Real 4) [(() ()) (() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Allocate [((Var 2 d) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] () () ())] () () () ) (DebugCheckArrayBounds (Var 2 d) [(Var 2 a) (Var 2 b)] .false. ) (Assignment (Var 2 __libasr_index_1_1) (ArrayBound (Var 2 a) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) () .false. .false. ) (Assignment (Var 2 __libasr_index_1_2) (ArrayBound (Var 2 b) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) () .false. .false. ) (DoLoop () ((Var 2 __libasr_index_1_) (ArrayBound (Var 2 d) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 d) (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (Var 2 __libasr_index_0_1) (ArrayBound (Var 2 a) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) () .false. .false. ) (Assignment (Var 2 __libasr_index_0_2) (ArrayBound (Var 2 b) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) () .false. .false. ) (DoLoop () ((Var 2 __libasr_index_0_) (ArrayBound (Var 2 d) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) LBound () ) (ArrayBound (Var 2 d) (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) UBound () ) ()) [(Assignment (ArrayItem (Var 2 d) [(() (Var 2 __libasr_index_0_) ()) (() (Var 2 __libasr_index_1_) ())] (Real 4) ColMajor () ) (RealBinOp (RealBinOp (ArrayItem (Var 2 a) [(() (Var 2 __libasr_index_0_1) ()) (() (Var 2 __libasr_index_1_1) ())] (Real 4) ColMajor () ) Add (ArrayItem (Var 2 b) [(() (Var 2 __libasr_index_0_2) ()) (() (Var 2 __libasr_index_1_2) ())] (Real 4) ColMajor () ) (Real 4) () ) Add (Var 2 c) (Real 4) () ) () .false. .false. ) (Assignment (Var 2 __libasr_index_0_1) (IntegerBinOp (Var 2 __libasr_index_0_1) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 __libasr_index_0_2) (IntegerBinOp (Var 2 __libasr_index_0_2) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] [] ) (Assignment (Var 2 __libasr_index_1_1) (IntegerBinOp (Var 2 __libasr_index_1_1) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (Assignment (Var 2 __libasr_index_1_2) (IntegerBinOp (Var 2 __libasr_index_1_2) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-write1-170ef53.stdout0000664000175000017500000001073715227365530023170 0ustar alastairalastair(TranslationUnit [(Program write_01 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(Write 0 [(()) (())] [] [(String "a" ()) 2] () ) (Write 0 [(()) (())] [] [] () ) (Write 0 [(())] [] [a] () ) (Write 0 [(out_str) ((String "(\" Found index \", i9,\" but item is not in list.\")" ()))] [] [index] () ) (Write 0 [(out_string) (())] [] [(String "Scalar_in = " ()) scalar_in] () ) (Write 0 [(out_string) (10)] [] [int_src int_given int_expected] () ) (Write 0 [(string)] [(fmt (String "(f6.2)" ()))] [max_angle] () ) (Write 0 [(fmt) ((String "(\"(i\",i0,\".\",i0,\")\")" ()))] [] [n n] () ) (Write 0 [] [(unit ()) (fmt (String "(a)" ()))] [(StrOp (StrOp (FuncCallOrArray trim [] [(() prog () 0)] [] [] [] ) Concat (String ": " ()) ) Concat message )] () ) (Write 0 [] [(unit 0) (fmt (String "(a,i4.4)" ()))] [(StrOp (StrOp (String "Assertion failed at " ()) Concat file ) Concat (String ":" ()) ) line] () ) (Write 0 [(())] [(fmt (String "(a,l1)" ()))] [(String "exactly_conservative= " ()) exactly_conservative] () ) (Write 0 [] [(unit lun)] [vec] () ) (Write 0 [(()) ((String "(a,a)" ()))] [(advance (String "no" ()))] [(FuncCallOrArray trim [] [(() input_string () 0)] [] [] [] ) (String ": " ())] () ) (Write 0 [(ounit)] [(FMT 303) (ADVANCE (String "NO" ()))] [] () ) (Write 0 [(()) (201)] [] [(ImpliedDoLoop [star] i 1 80 () )] () ) (Write 0 [(()) ((String "(1X,A)" ()))] [] [(String "Success!" ())] () ) (Write 0 [(ounit) (())] [] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Print 0 () [(String "2" ())] () ) (Print 0 () [] () ) (Print 0 (String "(a, es22.14)" ()) [(String "Ekin: " ()) Ekin] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/cpp-array2-9a93c4d.json0000664000175000017500000000067215227365530022662 0ustar alastairalastair{ "basename": "cpp-array2-9a93c4d", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/array2.f90", "infile_hash": "ec67f153c5f506f6a12ef94b06d43c7e9e86b9fc33c9c196029183f0", "outfile": null, "outfile_hash": null, "stdout": "cpp-array2-9a93c4d.stdout", "stdout_hash": "7a8f06efc0b71df9d23c13d24415b8e1dcf6e05ab3e6ffd3d2e4606b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr_preprocess-preprocessor21-aded728.json0000664000175000017500000000077315227365530026703 0ustar alastairalastair{ "basename": "asr_preprocess-preprocessor21-aded728", "cmd": "lfortran --cpp --show-asr --no-color {infile} -o {outfile}", "infile": "tests/preprocessor21.f90", "infile_hash": "c56b907f2bb83ae0b8a1d585925a2f710a26f6252ca5e6a21bce4e16", "outfile": null, "outfile_hash": null, "stdout": "asr_preprocess-preprocessor21-aded728.stdout", "stdout_hash": "af102ef1d62b93c93996abd59428860a56209cb00364d6833cf92f84", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-doloop_08-cf3820d.json0000664000175000017500000000073015227365530023251 0ustar alastairalastair{ "basename": "cpp-doloop_08-cf3820d", "cmd": "lfortran --no-color --show-cpp {infile}", "infile": "tests/../integration_tests/doloop_08.f90", "infile_hash": "aa25755d672851ca060c0f7c42329e8ecb0444f7a037df60d525af51", "outfile": null, "outfile_hash": null, "stdout": "cpp-doloop_08-cf3820d.stdout", "stdout_hash": "e5f10e195d3811512cfb841d70331a7a897ff20972582e2f72b1aa03", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array3-a030743.json0000664000175000017500000000070715227365530022510 0ustar alastairalastair{ "basename": "ast-array3-a030743", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/array3.f90", "infile_hash": "047ac01d7e3df52429d6889258f37213048937dae8611af6cbd9ecae", "outfile": null, "outfile_hash": null, "stdout": "ast-array3-a030743.stdout", "stdout_hash": "cafa5a9c40c58eaa5ac75c6e901b6d75a9d9c33052274dd45be6c1ae", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-entry1-3075e81.stdout0000664000175000017500000003030715227365530023112 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { entry1: (Program (SymbolTable 2 { dummy: (Variable 2 dummy [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) entry1 [] [(Assignment (Var 2 dummy) (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 10.000000 (Real 4) ) () ) () .false. .false. ) (SubroutineCall 1 x () [((Var 2 dummy))] () .false. ) (SubroutineCall 1 y () [((Var 2 dummy))] () .false. )] ), x: (Function (SymbolTable 3 { dummy: (Variable 3 dummy [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) x (FunctionType [(Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [x_main__lcompilers] [(Var 3 dummy)] [(SubroutineCall 1 x_main__lcompilers 1 x_main__lcompilers [((IntegerConstant 1 (Integer 4) Decimal)) ((Var 3 dummy))] () .false. )] () Public .true. .true. () ), x_main__lcompilers: (Function (SymbolTable 5 { dummy: (Variable 5 dummy [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), entry__lcompilers: (Variable 5 entry__lcompilers [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) x_main__lcompilers (FunctionType [(Integer 4) (Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 entry__lcompilers) (Var 5 dummy)] [(If () (IntegerCompare (Var 5 entry__lcompilers) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 1 1 )] [] ) (If () (IntegerCompare (Var 5 entry__lcompilers) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 2 2 )] [] ) (GoToTarget 1 1 ) (Print (StringFormat () [(StringConstant "Printed using subroutine call: " (String 1 (IntegerConstant 31 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 dummy)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 5 dummy) (RealConstant 5.000000 (Real 4) ) () .false. .false. ) (Return) (GoToTarget 2 2 ) (Print (StringFormat () [(StringConstant "Printed using entry statement: " (String 1 (IntegerConstant 31 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 5 dummy)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Return)] () Public .true. .true. () ), y: (Function (SymbolTable 4 { dummy: (Variable 4 dummy [] Unspecified () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) y (FunctionType [(Real 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [x_main__lcompilers] [(Var 4 dummy)] [(SubroutineCall 1 x_main__lcompilers 1 x_main__lcompilers [((IntegerConstant 2 (Integer 4) Decimal)) ((Var 4 dummy))] () .false. )] () Public .true. .true. () ) }) [] ) lfortran-0.64.0/tests/reference/ast-subroutines_10-c3e0d28.json0000664000175000017500000000076415227365530024343 0ustar alastairalastair{ "basename": "ast-subroutines_10-c3e0d28", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/subroutines_10.f90", "infile_hash": "97868109f521b42642b328d8b79be02e7668b5819dc820880ec85da0", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutines_10-c3e0d28.stdout", "stdout_hash": "c085bcf41cf64ac470b7cbdd70cf531c7eaf2e5e4858c4e4e339303a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_error_05-85bce3c.json0000664000175000017500000000075715227365530025075 0ustar alastairalastair{ "basename": "asr-template_error_05-85bce3c", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/template_error_05.f90", "infile_hash": "d30f0b51c06d7edfa1071745f98110503353250d239694a17ffa3620", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-template_error_05-85bce3c.stderr", "stderr_hash": "348ee2447d9951d887bcc71ba1744ee9f44797c33a5b28ebd2d64bab", "returncode": 2 }lfortran-0.64.0/tests/reference/run-array_bounds_check_06-2986f6e.json0000664000175000017500000000074315227365530025566 0ustar alastairalastair{ "basename": "run-array_bounds_check_06-2986f6e", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_bounds_check_06.f90", "infile_hash": "8d6d28fe1c81ff7cba66afc6e853bd26e5b8716b40fd41942df789a8", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_bounds_check_06-2986f6e.stderr", "stderr_hash": "b709e6411ce7bd377609c4c8dcbf39aecc07cbaa46b5e9055efa7a67", "returncode": 1 }lfortran-0.64.0/tests/reference/asr-nested_05-00beea9.json0000664000175000017500000000074515227365530023321 0ustar alastairalastair{ "basename": "asr-nested_05-00beea9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/nested_05.f90", "infile_hash": "83b55ebf01581813bce973f49d745813499ef9e09fc0b0a2111f8386", "outfile": null, "outfile_hash": null, "stdout": "asr-nested_05-00beea9.stdout", "stdout_hash": "1d072cfd64e9ac31a375f78c0f429d99d7a852a800bddd5c576975b9", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-global_scope3-00a245c.json0000664000175000017500000000073715227365530024266 0ustar alastairalastair{ "basename": "llvm-global_scope3-00a245c", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/global_scope3.f90", "infile_hash": "60cea65abfbb2228d16f175ea192462ae2379d7a9da1601cb3de9f3a", "outfile": null, "outfile_hash": null, "stdout": "llvm-global_scope3-00a245c.stdout", "stdout_hash": "87ccc9c2503be3395fea204167eecb6aa9d6f58c616c4930a185f1bb", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-fixed_form_goto_select-6cc9882.json0000664000175000017500000000100215227365530026112 0ustar alastairalastair{ "basename": "ast-fixed_form_goto_select-6cc9882", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form_goto_select.f", "infile_hash": "acbe51b93b613a469a6a95e544f8bf2480ad5ea75d6f5e369dcceb9a", "outfile": null, "outfile_hash": null, "stdout": "ast-fixed_form_goto_select-6cc9882.stdout", "stdout_hash": "d00834b66632f8c590999e8a3530f48d7249c7620377336fb120918e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-multi_error1-6934f65.json0000664000175000017500000000073115227365530023755 0ustar alastairalastair{ "basename": "ast-multi_error1-6934f65", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/multi_error1.f90", "infile_hash": "aae363b17603b231b2a906564a03365ce9a53952c754ea31187f352c", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "ast-multi_error1-6934f65.stderr", "stderr_hash": "05f5d41863982b1d7e082112c53b5ee1dece91489f6857e77a3c2e4e", "returncode": 2 }lfortran-0.64.0/tests/reference/llvm-init_values-b1d5491.json0000664000175000017500000000075615227365530024110 0ustar alastairalastair{ "basename": "llvm-init_values-b1d5491", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/init_values.f90", "infile_hash": "1cafced706fa2754f92f2d460867d6c84638fd10447df12f124fd419", "outfile": null, "outfile_hash": null, "stdout": "llvm-init_values-b1d5491.stdout", "stdout_hash": "a34bab8b37c5031da78f323242b24989ba12ec0a436834d5d48ab90a", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-array3-a030743.stdout0000664000175000017500000000256215227365530023062 0ustar alastairalastair(TranslationUnit [(Program array3 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeReal [] () () None ) [(AttrDimension [(1 3 DimensionExpr)] )] [(a [] [] () () None ()) (b [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 a (ArrayInitializer () () [1 2 3] ) () ) (Assignment 0 b (ArrayInitializer () () [1 2 3] ) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/llvm-functions_14-f13c087.json0000664000175000017500000000076115227365530024100 0ustar alastairalastair{ "basename": "llvm-functions_14-f13c087", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/functions_14.f90", "infile_hash": "5ab87388a802f87070be6ddbb2f9d862b4ac4cf7c07c2eafff2287f1", "outfile": null, "outfile_hash": null, "stdout": "llvm-functions_14-f13c087.stdout", "stdout_hash": "95e4f6dd96236ef5b5b72b5526d44921bea3f812e11c629185112883", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutine4-22dcb28.stdout0000664000175000017500000000035615227365530024625 0ustar alastairalastairfunction triad(a::Array{Float32, 1}, b::Array{Float32, 1}, scalar::Float32, c::Array{Float32, 1}) local i::Int32 local n::Int32 n = length(a) Threads.@threads for i ∈ 1:n c[i] = a[i] + scalar * b[i] end end lfortran-0.64.0/tests/reference/asr-complex_07-71c3c47.stdout0000664000175000017500000014011015227365530023716 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { complex_07: (Program (SymbolTable 2 { c1: (Variable 2 c1 [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local (IntegerConstant 42 (Integer 4) Decimal) (IntegerConstant 42 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), img_part: (Variable 2 img_part [] Local (RealConstant 3.140000 (Real 4) ) (RealConstant 3.140000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_part: (Variable 2 real_part [] Local (IntegerConstant 42 (Integer 4) Decimal) (IntegerConstant 42 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 2 x [real_part] Local (IntrinsicElementalFunction Cmplx [(Var 2 real_part) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) (ComplexConstant 42.000000 0.000000 (Complex 4) ) ) (ComplexConstant 42.000000 0.000000 (Complex 4) ) Save (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x1: (Variable 2 x1 [] Local (RealConstant 3.140000 (Real 4) ) (RealConstant 3.140000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x2: (Variable 2 x2 [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 2 y [img_part] Local (IntrinsicElementalFunction Cmplx [(Var 2 img_part) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) (ComplexConstant 3.140000 0.000000 (Complex 4) ) ) (ComplexConstant 3.140000 0.000000 (Complex 4) ) Save (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y2: (Variable 2 y2 [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [real_part img_part] Local (IntrinsicElementalFunction Cmplx [(Var 2 real_part) (Var 2 img_part) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) (ComplexConstant 42.000000 3.140000 (Complex 4) ) ) (ComplexConstant 42.000000 3.140000 (Complex 4) ) Save (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z1: (Variable 2 z1 [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z2: (Variable 2 z2 [] Local () () Default (Complex 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) complex_07 [] [(Assignment (Var 2 z1) (IntrinsicElementalFunction Cmplx [(Var 2 i) (Var 2 x1) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Complex 4) () ) () .false. .false. ) (Assignment (Var 2 c1) (Cast (ComplexConstructor (IntegerConstant 12 (Integer 4) Decimal) (IntegerConstant 24 (Integer 4) Decimal) (Complex 4) (ComplexConstant 12.000000 24.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 12.000000 24.000000 (Complex 8) ) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 c1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 x2) (IntrinsicElementalFunction Cmplx [(Var 2 real_part) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) (ComplexConstant 42.000000 0.000000 (Complex 8) ) ) () .false. .false. ) (Assignment (Var 2 y2) (IntrinsicElementalFunction Cmplx [(Var 2 img_part) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) (ComplexConstant 3.140000 0.000000 (Complex 8) ) ) () .false. .false. ) (Assignment (Var 2 z2) (IntrinsicElementalFunction Cmplx [(Var 2 real_part) (Var 2 img_part) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) (ComplexConstant 42.000000 3.140000 (Complex 8) ) ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 x) Sub (ComplexConstructor (Var 2 real_part) (IntegerConstant 0 (Integer 4) Decimal) (Complex 4) (ComplexConstant 42.000000 0.000000 (Complex 4) ) ) (Complex 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 y) Sub (ComplexConstructor (Var 2 img_part) (IntegerConstant 0 (Integer 4) Decimal) (Complex 4) (ComplexConstant 3.140000 0.000000 (Complex 4) ) ) (Complex 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 z) Sub (ComplexConstructor (Var 2 real_part) (Var 2 img_part) (Complex 4) (ComplexConstant 42.000000 3.140000 (Complex 4) ) ) (Complex 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 x2) Sub (Cast (ComplexConstructor (Var 2 real_part) (IntegerConstant 0 (Integer 4) Decimal) (Complex 4) (ComplexConstant 42.000000 0.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 42.000000 0.000000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 y2) Sub (Cast (ComplexConstructor (Var 2 img_part) (IntegerConstant 0 (Integer 4) Decimal) (Complex 4) (ComplexConstant 3.140000 0.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 3.140000 0.000000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (Var 2 z2) Sub (Cast (ComplexConstructor (Var 2 real_part) (Var 2 img_part) (Complex 4) (ComplexConstant 42.000000 3.140000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 42.000000 3.140000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(IntrinsicElementalFunction Cmplx [(Var 2 i) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (IntrinsicElementalFunction Cmplx [(Var 2 i) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () ) Sub (Cast (ComplexConstructor (RealConstant 42.000000 (Real 4) ) (RealConstant 0.000000 (Real 4) ) (Complex 4) (ComplexConstant 42.000000 0.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 42.000000 0.000000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(IntrinsicElementalFunction Cmplx [(Var 2 x1) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (IntrinsicElementalFunction Cmplx [(Var 2 x1) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () ) Sub (Cast (ComplexConstructor (RealConstant 3.140000 (Real 4) ) (RealConstant 0.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.140000 0.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 3.140000 0.000000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(IntrinsicElementalFunction Cmplx [(Var 2 z1) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (IntrinsicElementalFunction Cmplx [(Var 2 z1) (RealConstant 0.000000 (Real 4) ) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () ) Sub (Cast (ComplexConstructor (RealConstant 42.000000 (Real 4) ) (RealConstant 3.140000 (Real 4) ) (Complex 4) (ComplexConstant 42.000000 3.140000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 42.000000 3.140000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(IntrinsicElementalFunction Cmplx [(Var 2 x1) (Var 2 i) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(ComplexBinOp (IntrinsicElementalFunction Cmplx [(Var 2 x1) (Var 2 i) (IntegerConstant 8 (Integer 4) Decimal)] 0 (Complex 8) () ) Sub (Cast (ComplexConstructor (RealConstant 3.140000 (Real 4) ) (RealConstant 42.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.140000 42.000000 (Complex 4) ) ) ComplexToComplex (Complex 8) (ComplexConstant 3.140000 42.000000 (Complex 8) ) () ) (Complex 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000010 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000010 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Print (StringFormat () [(Var 2 x) (Var 2 y) (Var 2 z)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_01_complex-2513a51.stdout0000664000175000017500000011022215227365530025200 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { arrays_01_complex: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Complex 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) arrays_01_complex [] [(DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Complex 4) ColMajor () ) (Cast (IntegerBinOp (Var 2 i) Add (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) IntegerToComplex (Complex 4) () () ) () .false. .false. )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 11.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 12.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 13.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 11 (Integer 4) Decimal) (IntegerConstant 14 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (IntegerBinOp (Var 2 i) Sub (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) ())] (Complex 4) ColMajor () ) (Cast (Var 2 i) IntegerToComplex (Complex 4) () () ) () .false. .false. )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 11.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 12.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 13.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 14 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 14.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 b) [(() (Var 2 i) ())] (Complex 4) ColMajor () ) (ComplexBinOp (ArrayItem (Var 2 a) [(() (Var 2 i) ())] (Complex 4) ColMajor () ) Sub (Cast (IntegerConstant 10 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 10.000000 0.000000 (Complex 4) ) () ) (Complex 4) () ) () .false. .false. )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 1 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 1.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 2.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 3 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 3.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) (ComplexBinOp (ComplexBinOp (ComplexBinOp (ArrayItem (Var 2 b) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) Add (ArrayItem (Var 2 b) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) (Complex 4) () ) Add (ArrayItem (Var 2 b) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) (Complex 4) () ) Add (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) (Complex 4) () ) () .false. .false. ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 17 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 17.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (Assignment (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) () .false. .false. ) (If () (ComplexCompare (ArrayItem (Var 2 b) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 11 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 11.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(DoLoop () ((Var 2 j) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) ()) [(Assignment (ArrayItem (Var 2 c) [(() (Var 2 i) ()) (() (Var 2 j) ())] (Complex 4) ColMajor () ) (Cast (IntegerBinOp (IntegerBinOp (Var 2 i) Add (Var 2 j) (Integer 4) () ) Add (IntegerConstant 10 (Integer 4) Decimal) (Integer 4) () ) IntegerToComplex (Complex 4) () () ) () .false. .false. )] [] )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 12 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 12.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 1 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 13.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 1 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 13 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 13.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (ComplexCompare (ArrayItem (Var 2 c) [(() (IntegerConstant 2 (Integer 4) Decimal) ()) (() (IntegerConstant 2 (Integer 4) Decimal) ())] (Complex 4) ColMajor () ) NotEq (Cast (IntegerConstant 14 (Integer 4) Decimal) IntegerToComplex (Complex 4) (ComplexConstant 14.000000 0.000000 (Complex 4) ) () ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-array_size_05-bc7d72f.stderr0000664000175000017500000000037115227365530024545 0ustar alastairalastairsemantic error: Only Integer literals or expressions which reduce to constant Integer are accepted as kind parameters. --> tests/errors/array_size_05.f90:6:27 | 6 | size_a = size(a, kind=kindvar, dim=1) | ^^^^^^^ lfortran-0.64.0/tests/reference/julia-subroutines_02-8f01adf.json0000664000175000017500000000075515227365530024742 0ustar alastairalastair{ "basename": "julia-subroutines_02-8f01adf", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/subroutines_02.f90", "infile_hash": "0da20d4528bff96e6ec7497805bf54f1744384b5ab8de197c3e75432", "outfile": null, "outfile_hash": null, "stdout": "julia-subroutines_02-8f01adf.stdout", "stdout_hash": "8567773fe3abad3c9bdd0b49f8168d14a0f3f8dd89860ecacf65e7bf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-complex_01-f07fa9a.json0000664000175000017500000000075015227365530023510 0ustar alastairalastair{ "basename": "ast-complex_01-f07fa9a", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_01.f90", "infile_hash": "e94aebc987a1655b49e1e31229a6c24ccdbed83af0ebf6a0fb4684f2", "outfile": null, "outfile_hash": null, "stdout": "ast-complex_01-f07fa9a.stdout", "stdout_hash": "8fb68c50009aae86bea9902acccea31dd75f9372e349cfcc5986c104", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/tokens-array3-72b5447.json0000664000175000017500000000072015227365530023234 0ustar alastairalastair{ "basename": "tokens-array3-72b5447", "cmd": "lfortran --no-color --show-tokens {infile} -o {outfile}", "infile": "tests/array3.f90", "infile_hash": "047ac01d7e3df52429d6889258f37213048937dae8611af6cbd9ecae", "outfile": null, "outfile_hash": null, "stdout": "tokens-array3-72b5447.stdout", "stdout_hash": "850337689a6aff3dec0ad753b22b2ceb473efa75d4fee2587d579474", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-abort_01-7212a3d.json0000664000175000017500000000106515227365530023161 0ustar alastairalastair{ "basename": "llvm-abort_01-7212a3d", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/abort_01.f90", "infile_hash": "9b8982942d302b8eddf9045a7946fa1e69ed2f05b494320cef4823c2", "outfile": null, "outfile_hash": null, "stdout": "llvm-abort_01-7212a3d.stdout", "stdout_hash": "af197c3f92b3558b7df838df81d7def4c701eb5db5cace0c1c2b1daa", "stderr": "llvm-abort_01-7212a3d.stderr", "stderr_hash": "132e12d6d59905849ec72f4c5e5303920f043e68e199519ab136643f", "returncode": 0 }lfortran-0.64.0/tests/reference/asr-dependency_test_03-86dce2a.json0000664000175000017500000000075315227365530025220 0ustar alastairalastair{ "basename": "asr-dependency_test_03-86dce2a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/dependency_test_03.f90", "infile_hash": "390ea7aa4152460550f66c9d9bab3621da4cb1b7c17e27f7efa9f0df", "outfile": null, "outfile_hash": null, "stdout": "asr-dependency_test_03-86dce2a.stdout", "stdout_hash": "97177b8727d9227a6ed146acf4a293312f4de8f48a356a80864b966c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-case_05-8f778ac.json0000664000175000017500000000073715227365530022715 0ustar alastairalastair{ "basename": "asr-case_05-8f778ac", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/case_05.f90", "infile_hash": "914477f4a376baf0341e522d2109b6108238cd1d9dfecf969283ab79", "outfile": null, "outfile_hash": null, "stdout": "asr-case_05-8f778ac.stdout", "stdout_hash": "ae2750ce4c0b68a7e6dca8813bfd70fcb3d4e09eb41f7cd10211a325", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-interactive_parse_without_program_line-f2c0aaa.stdout0000664000175000017500000001123315227365530032200 0ustar alastairalastair(TranslationUnit [(Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrAllocatable )] [(a [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrPointer )] [(p [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (FuncCallOrArray allocate [] [(() (FuncCallOrArray a [] [(() 10 () 0)] [] [] [] ) () 0)] [] [] [] ) (FuncCallOrArray deallocate [] [(() a () 0)] [] [] [] ) (FuncCallOrArray open [] [] [(unit 10) (file (String "test.txt" ())) (status (String "old" ()))] [] [] ) (FuncCallOrArray flush [] [(() 10 () 0)] [] [] [] ) (FuncCallOrArray close [] [] [(unit 10)] [] [] ) (FuncCallOrArray nullify [] [(() p () 0)] [] [] [] ) exit cycle return continue (Print 0 () [exit] () ) (Print 0 () [cycle] () ) (Print 0 () [return] () ) (Print 0 () [continue] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (SubroutineCall 0 exit [] [] [] [] () ) (SubroutineCall 0 cycle [] [] [] [] () ) (SubroutineCall 0 return [] [] [] [] () ) (SubroutineCall 0 continue [] [] [] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) contains (Subroutine sub [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(DoLoop 0 () 0 i 1 10 () [(Print 0 () [i] () ) (If 0 () (== i 5) [(Exit 0 () () )] [] () () () ) (If 0 () (== i 7) [(Cycle 0 () () )] [] () () () ) (If 0 () (== i 9) [(Return 0 () () )] [] () () () ) (If 0 () (== i 2) [(Continue 0 () )] [] () () () )] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] ) end program] ) lfortran-0.64.0/tests/reference/asr-case_05-8f778ac.stdout0000664000175000017500000001332715227365530023265 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { case_05: (Program (SymbolTable 2 { grade: (Variable 2 grade [] Local (StringConstant "B" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "B" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) case_05 [] [(Select () (Var 2 grade) [(CaseStmt [(StringConstant "A" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] [(Print (StringConstant "Excellent!" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. ) (CaseStmt [(StringConstant "B" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] [] .false. ) (CaseStmt [(StringConstant "C" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] [(Print (StringConstant "Well done" (String 1 (IntegerConstant 9 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. ) (CaseStmt [(StringConstant "D" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] [(Print (StringConstant "You passed" (String 1 (IntegerConstant 10 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. ) (CaseStmt [(StringConstant "F" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] [(Print (StringConstant "Better try again" (String 1 (IntegerConstant 16 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. )] [(Print (StringConstant "Invalid grade" (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. ) (Print (StringFormat () [(StringConstant "Your grade is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 grade)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-arrays_op_10-19bd9d9.json0000664000175000017500000000075615227365530023774 0ustar alastairalastair{ "basename": "asr-arrays_op_10-19bd9d9", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_op_10.f90", "infile_hash": "b9f29a5f12342cf162fe90d308dfb51ffdf3b181b06f27fe34d52d26", "outfile": null, "outfile_hash": null, "stdout": "asr-arrays_op_10-19bd9d9.stdout", "stdout_hash": "e5adbe9dd0196bc6bf75d3cd615d615e60586a4215923055c6f35dc6", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-modules_05-c35e0ac.json0000664000175000017500000000075015227365530023503 0ustar alastairalastair{ "basename": "ast-modules_05-c35e0ac", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_05.f90", "infile_hash": "eaea53640868ce2121656fd7b87e06fe464e05c8e9a0cf731a7a1dd9", "outfile": null, "outfile_hash": null, "stdout": "ast-modules_05-c35e0ac.stdout", "stdout_hash": "97a5d5fb477a65d5a96f3c9783f24c971e560937d0f6940b317646f8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_12-744ab27.stdout0000664000175000017500000000717615227365530023730 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { module_12: (Module (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) module_12 () [] .false. .false. .false. ), prog_module_12: (Program (SymbolTable 3 { a: (ExternalSymbol 3 a 2 a module_12 [] a Public ) }) prog_module_12 [module_12] [(Assignment (ArrayItem (Var 3 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (If () (IntegerCompare (ArrayItem (Var 3 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Integer 4) ColMajor () ) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-derived_type_04-0a4f388.stderr0000664000175000017500000000044715227365530024722 0ustar alastairalastairsemantic error: Passed object dummy argument my_object not found in function arguments --> tests/errors/derived_type_04.f90:7:9 | 7 | procedure(testing_interface), deferred, pass(my_object) :: testing | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-expr_06-2de4136.stdout0000664000175000017500000000410315227365530023222 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { expr_06: (Program (SymbolTable 2 { x: (Variable 2 x [] Local (IntegerBinOp (IntegerConstant 3 (Integer 4) Decimal) Add (IntegerConstant 6 (Integer 4) Decimal) (Integer 4) (IntegerConstant 9 (Integer 4) Decimal) ) (IntegerConstant 9 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) expr_06 [] [(Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-sin_03-8490135.stdout0000664000175000017500000000553015227365530022704 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { iso_fortran_env: (IntrinsicModule lfortran_intrinsic_iso_fortran_env), sin_03: (Program (SymbolTable 2 { dp: (ExternalSymbol 2 dp 4 real64 lfortran_intrinsic_iso_fortran_env [] real64 Public ), x: (Variable 2 x [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sin_03 [iso_fortran_env] [(Assignment (Var 2 x) (IntrinsicElementalFunction Sin [(RealConstant 1.500000 (Real 8) )] 0 (Real 8) (RealConstant 0.997495 (Real 8) ) ) () .false. .false. ) (Print (StringFormat () [(Var 2 x)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-functions_13-3345127.stdout0000664000175000017500000005631515227365530024126 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { test_scan_module: (Module (SymbolTable 2 { test_scan_intrinsic: (Function (SymbolTable 3 { }) test_scan_intrinsic (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(If () (IntegerCompare (IntrinsicElementalFunction StringFindSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "ao" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 2 (Integer 4) Decimal) ) NotEq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringFindSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "ao" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .true. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 6 (Integer 4) Decimal) ) NotEq (IntegerConstant 6 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringFindSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "c++" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 0 (Integer 4) Decimal) ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] )] () Public .true. .true. () ) }) test_scan_module () [] .false. .false. .false. ), test_scan_verify: (Program (SymbolTable 4 { test_scan_intrinsic: (ExternalSymbol 4 test_scan_intrinsic 2 test_scan_intrinsic test_scan_module [] test_scan_intrinsic Public ), test_verify_intrinsic: (Function (SymbolTable 5 { r: (Variable 5 r [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) test_verify_intrinsic (FunctionType [] (Logical 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(If () (IntegerCompare (IntrinsicElementalFunction StringContainsSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "ao" (String 1 (IntegerConstant 2 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringContainsSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "foo" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 3 (Integer 4) Decimal) ) NotEq (IntegerConstant 3 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringContainsSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "c++" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 1 (Integer 4) Decimal) ) NotEq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringContainsSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "c++" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .true. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 7 (Integer 4) Decimal) ) NotEq (IntegerConstant 7 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (If () (IntegerCompare (IntrinsicElementalFunction StringContainsSet [(StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "fortran" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (LogicalConstant .false. (Logical 4) ) (IntegerConstant 4 (Integer 4) Decimal)] 0 (Integer 4) (IntegerConstant 0 (Integer 4) Decimal) ) NotEq (IntegerConstant 0 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop () )] [] ) (Assignment (Var 5 r) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] (Var 5 r) Public .true. .true. () ) }) test_scan_verify [test_scan_module] [(SubroutineCall 4 test_scan_intrinsic () [] () .false. ) (Print (StringFormat () [(FunctionCall 4 test_verify_intrinsic () [] (Logical 4) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/asr-global_scope2-970a26a.json0000664000175000017500000000073415227365530024110 0ustar alastairalastair{ "basename": "asr-global_scope2-970a26a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope2.f90", "infile_hash": "e511f118b9a040b5e7a3ff2ad75cd7942dee08d3a21bd4ca5cd668b3", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope2-970a26a.stdout", "stdout_hash": "ac34b712d04fb7f1faf27f776abbcf7430747c26cf67fbaf3c668877", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_45-c69c75f.stdout0000664000175000017500000030117615227365530024027 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_45: (Program (SymbolTable 7 { compiler_name: (Variable 7 compiler_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flag: (ExternalSymbol 7 file_scope_flag 2 file_scope_flag modules_45_fpm_manifest_profile [] file_scope_flag Public ), get_flags: (ExternalSymbol 7 get_flags 2 get_flags modules_45_fpm_manifest_profile [] get_flags Public ), new_profile: (ExternalSymbol 7 new_profile 2 new_profile modules_45_fpm_manifest_profile [] new_profile Public ), os_type: (Variable 7 os_type [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_valid: (Variable 7 os_valid [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_config_t: (ExternalSymbol 7 profile_config_t 2 profile_config_t modules_45_fpm_manifest_profile [] profile_config_t Public ), profile_name: (Variable 7 profile_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profiles: (Variable 7 profiles [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 7 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profindex: (Variable 7 profindex [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) modules_45 [modules_45_fpm_manifest_profile] [(Allocate [((Var 7 profile_name) [] (IntegerConstant 40 (Integer 4) Decimal) () (String 1 (IntegerConstant 40 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Allocate [((Var 7 compiler_name) [] (IntegerConstant 40 (Integer 4) Decimal) () (String 1 (IntegerConstant 40 (Integer 4) Decimal) ExpressionLength DescriptorString))] () () () ) (Allocate [((Var 7 profiles) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] () () ())] () () () ) (SubroutineCall 7 get_flags () [((Var 7 profile_name)) ((Var 7 compiler_name)) ((Var 7 os_type)) ((Var 7 profiles)) ((Var 7 profindex)) ((Var 7 os_valid))] () .false. )] ), modules_45_fpm_manifest_profile: (Module (SymbolTable 2 { file_scope_flag: (Struct (SymbolTable 3 { }) file_scope_flag (StructType [] [] .true. .false. ) [] [] [] Source Public .false. .false. .false. [] () () [] ), get_flags: (Function (SymbolTable 6 { c_flags: (Variable 6 c_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), compiler_name: (Variable 6 compiler_name [] In () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 6 cxx_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), err_message: (Variable 6 err_message [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_flags: (Variable 6 file_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_name: (Variable 6 file_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 6 file_scope_flags [] Local () () Default (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 6 flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ifile: (Variable 6 ifile [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ikey: (Variable 6 ikey [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), is_valid: (Variable 6 is_valid [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), key_name: (Variable 6 key_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 6 link_time_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 6 os_type [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_valid: (Variable 6 os_valid [] In () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 6 profile_name [] In () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profiles: (Variable 6 profiles [] InOut () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profindex: (Variable 6 profindex [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), stat: (Variable 6 stat [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) get_flags (FunctionType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Integer 4) (Logical 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [new_profile] [(Var 6 profile_name) (Var 6 compiler_name) (Var 6 os_type) (Var 6 profiles) (Var 6 profindex) (Var 6 os_valid)] [(Assignment (ArrayItem (Var 6 profiles) [(() (Var 6 profindex) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) ColMajor () ) (FunctionCall 2 new_profile () [((Var 6 profile_name)) ((Var 6 compiler_name)) ((Var 6 os_type)) ((Var 6 flags)) ((Var 6 c_flags)) ((Var 6 cxx_flags)) ((Var 6 link_time_flags)) ((Var 6 file_scope_flags)) (())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) () () ) () .false. .false. ) (Assignment (Var 6 profindex) (IntegerBinOp (Var 6 profindex) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ), new_profile: (Function (SymbolTable 5 { c_flags: (Variable 5 c_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), compiler: (Variable 5 compiler [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 5 cxx_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 5 file_scope_flags [] In () () Default (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) 2 file_scope_flag Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 5 flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), is_built_in: (Variable 5 is_built_in [] In () () Default (Logical 4) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 5 link_time_flags [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 5 os_type [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile: (Variable 5 profile [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) 2 profile_config_t Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 5 profile_name [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) new_profile (FunctionType [(String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (Integer 4) (String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (String 1 () AssumedLength DescriptorString) (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) (Logical 4)] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 profile_name) (Var 5 compiler) (Var 5 os_type) (Var 5 flags) (Var 5 c_flags) (Var 5 cxx_flags) (Var 5 link_time_flags) (Var 5 file_scope_flags) (Var 5 is_built_in)] [] (Var 5 profile) Public .true. .true. () ), profile_config_t: (Struct (SymbolTable 4 { c_flags: (Variable 4 c_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), compiler: (Variable 4 compiler [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cxx_flags: (Variable 4 cxx_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), file_scope_flags: (Variable 4 file_scope_flags [] Local () () Default (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 file_scope_flag Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), flags: (Variable 4 flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), is_built_in: (Variable 4 is_built_in [] Local () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), link_time_flags: (Variable 4 link_time_flags [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), os_type: (Variable 4 os_type [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), profile_name: (Variable 4 profile_name [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) profile_config_t (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Integer 4) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (String 1 () DeferredLength DescriptorString) ) (Allocatable (Array (StructType [] [] .true. .false. ) [(() ())] DescriptorArray ) ) (Logical 4)] [] .true. .false. ) [] [profile_name compiler os_type flags c_flags cxx_flags link_time_flags file_scope_flags is_built_in] [] Source Public .false. .false. .false. [] () () [] ) }) modules_45_fpm_manifest_profile () [modules_45_fpm_manifest_profile] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-functions_06-83a7aca.stdout0000664000175000017500000007010115227365530024414 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_06: (Program (SymbolTable 6 { int_return: (ExternalSymbol 6 int_return 2 int_return functions_06_m [] int_return Public ), real_return: (ExternalSymbol 6 real_return 2 real_return functions_06_m [] real_return Public ), string: (Variable 6 string [] Local (StringConstant " abc" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant " abc" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Save (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), trim_wrapper: (ExternalSymbol 6 trim_wrapper 2 trim_wrapper functions_06_m [] trim_wrapper Public ) }) functions_06 [functions_06_m] [(Print (FunctionCall 6 trim_wrapper () [((Var 6 string))] (String 1 (StringLen (Var 6 string) (Integer 4) () ) ExpressionLength DescriptorString) () () ) ) (Print (StringFormat () [(FunctionCall 6 int_return () [((Var 6 string))] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 6 string) (Integer 4) () ))] PointerArray ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringFormat () [(FunctionCall 6 real_return () [((Var 6 string))] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 6 string) (Integer 4) () ))] PointerArray ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ), functions_06_m: (Module (SymbolTable 2 { int_return: (Function (SymbolTable 4 { i: (Variable 4 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 4 r [s] ReturnVar () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 4 s) (Integer 4) () ))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 4 s [] Unspecified () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) int_return (FunctionType [(String 1 () AssumedLength DescriptorString)] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 s)] [(DoLoop () ((Var 4 i) (IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 4 s) (Integer 4) () ) ()) [(Assignment (ArrayItem (Var 4 r) [(() (Var 4 i) ())] (Integer 4) ColMajor () ) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. )] [] )] (Var 4 r) Public .true. .true. () ), real_return: (Function (SymbolTable 5 { i: (Variable 5 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 5 r [s] ReturnVar () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 5 s) (Integer 4) () ))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 5 s [] Unspecified () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) real_return (FunctionType [(String 1 () AssumedLength DescriptorString)] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 5 s)] [(DoLoop () ((Var 5 i) (IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 5 s) (Integer 4) () ) ()) [(Assignment (ArrayItem (Var 5 r) [(() (Var 5 i) ())] (Real 4) ColMajor () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. )] [] )] (Var 5 r) Public .true. .true. () ), trim_wrapper: (Function (SymbolTable 3 { r: (Variable 3 r [s] ReturnVar () () Default (String 1 (StringLen (Var 3 s) (Integer 4) () ) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), s: (Variable 3 s [] Unspecified () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) trim_wrapper (FunctionType [(String 1 () AssumedLength DescriptorString)] (String 1 (StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ) ExpressionLength DescriptorString) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 s)] [(Assignment (Var 3 r) (IntrinsicElementalFunction StringTrim [(Var 3 s)] 0 (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) () .false. .false. )] (Var 3 r) Public .true. .true. () ) }) functions_06_m () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-array_bounds_check_08-7f7acdd.stderr0000664000175000017500000000062315227365530026325 0ustar alastairalastairruntime error: Array shape mismatch in subroutine 'ff'. Tried to match size 5 of dimension 1 of argument number 1, but expected size is 100000 --> tests/errors/array_bounds_check_08.f90:4:3 | 4 | arr = ff() | ^^^ | 8 | function ff() result(res) | ~~ Here | 9 | integer :: res(100000) | ~~~~~~ Parameter is size 100000, argument is size 5 lfortran-0.64.0/tests/reference/ast-close1-d682580.stdout0000664000175000017500000000141615227365530023063 0ustar alastairalastair(TranslationUnit [(Program close1 (TriviaNode [(EndOfLine) (Comment "! Tests for syntax (AST) only:" )] [] ) [] [] [] [(Close 0 [u] [] () ) (Close 0 [] [(unit gmv_lun)] () ) (Close 0 [] [(unit dunit [(dxf [])]) (status (String "delete" ()))] () ) (Close 0 [] [(UNIT funit) (IOSTAT ierr)] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-dim_float_01-74fa3d6.json0000664000175000017500000000074015227365530023715 0ustar alastairalastair{ "basename": "asr-dim_float_01-74fa3d6", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/dim_float_01.f90", "infile_hash": "b15ce785e0460bd8d3f111cc981afdabd70523ce10af75df7bed27d4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-dim_float_01-74fa3d6.stderr", "stderr_hash": "f25e863cdd6617b222af5350e7cbc6422596e85cf3f9e51a79d4ea67", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-intrinsics7-d1c02a1.json0000664000175000017500000000073515227365530023714 0ustar alastairalastair{ "basename": "asr-intrinsics7-d1c02a1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/intrinsics7.f90", "infile_hash": "3f4b8cbb7596de01d44dd95ec9e60be72c020b5be99fd530216fa5ce", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-intrinsics7-d1c02a1.stderr", "stderr_hash": "ae7776abd2eb47ff8471f0be1ae6313d7daa9ae535410aad2da3d7ff", "returncode": 2 }lfortran-0.64.0/tests/reference/pass_inline_function_calls-functions_08-49d8a27.stdout0000664000175000017500000005750215227365530031105 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { function_08_a: (Module (SymbolTable 2 { }) function_08_a () [] .false. .false. .false. ), functions_08: (Program (SymbolTable 3 { a: (Variable 3 a [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 3 b [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 3 c [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Function (SymbolTable 4 { a: (Variable 4 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 4 b [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 4 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [f_real] [(Var 4 a)] [(Assignment (Var 4 x) (Cast (IntegerConstant 2 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 2.000000 (Real 4) ) () ) () .false. .false. ) (Assignment (Var 4 b) (RealBinOp (Var 4 a) Add (FunctionCall 3 f_real () [((RealConstant 0.000000 (Real 4) ))] (Real 4) () () ) (Real 4) () ) () .false. .false. )] (Var 4 b) Public .true. .true. () ), f_real: (Function (SymbolTable 5 { a: (Variable 5 a [] In () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 5 b [] ReturnVar () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) f_real (FunctionType [(Real 4)] (Real 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [f] [(Var 5 a)] [(If () (RealCompare (Var 5 a) Eq (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(Assignment (Var 5 b) (RealConstant 2.000000 (Real 4) ) () .false. .false. )] [(Assignment (Var 5 b) (RealBinOp (Var 5 a) Add (FunctionCall 3 f () [((RealConstant 1.000000 (Real 4) ))] (Real 4) () () ) (Real 4) () ) () .false. .false. )] )] (Var 5 b) Public .true. .true. () ), p: (Variable 3 p [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), q: (Variable 3 q [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), x: (Variable 3 x [] Local (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (RealConstant 5.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), y: (Variable 3 y [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) functions_08 [] [(Assignment (Var 3 y) (FunctionCall 3 f () [((Var 3 x))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 3 y)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 3 q) (FunctionCall 3 f_real () [((Var 3 p))] (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 3 q)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/wat-expr_09-fa1b124.stdout0000664000175000017500000001520515227365530023310 0ustar alastairalastair(module (type (;0;) (func (param i32) (result))) (type (;1;) (func (param i32 i32 i32 i32) (result i32))) (type (;2;) (func (param) (result))) (type (;3;) (func (param i64) (result))) (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0))) (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) (global $2 (mut i32) (i32.const 0)) (global $3 (mut i64) (i64.const 0)) (global $4 (mut i64) (i64.const 0)) (global $5 (mut f32) (f32.const 0.000000)) (global $6 (mut f32) (f32.const 0.000000)) (global $7 (mut f64) (f64.const 0.000000)) (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local i32 i64 i32 i64) i32.const 5 local.set 2 local.get 2 i32.const 2 drop local.get 2 i32.mul local.set 0 local.get 2 i64.extend_i32_s call 3 i32.const 1 i32.const 4 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.extend_i32_s call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop local.get 0 i32.const 25 i32.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end i64.const 5 local.set 3 local.get 3 i64.const 2 drop local.get 3 i64.mul local.set 1 local.get 3 call 3 i32.const 1 i32.const 4 i32.const 1 i32.const 0 call 1 drop local.get 1 call 3 i32.const 1 i32.const 16 i32.const 1 i32.const 0 call 1 drop local.get 1 i64.const 25 i64.ne if i32.const 1 i32.const 208 i32.const 1 i32.const 0 call 1 drop i32.const 1 call 0 unreachable else end i32.const 0 call 0 return ) (func $3 (type 3) (param i64) (result) (local i64 i64 i64 i64) local.get 0 i64.const 0 i64.eq if i32.const 1 i32.const 88 i32.const 1 i32.const 0 call 1 drop return else end local.get 0 i64.const 0 i64.lt_s if i32.const 1 i32.const 28 i32.const 1 i32.const 0 call 1 drop local.get 0 i64.const -1 i64.mul local.set 0 else end local.get 0 local.set 4 i64.const 0 local.set 1 loop local.get 0 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.add local.set 1 local.get 0 i64.const 10 i64.div_s local.set 0 br 1 else end end loop local.get 1 i64.const 0 i64.gt_s if local.get 1 i64.const 1 i64.sub local.set 1 i64.const 1 local.set 2 i64.const 0 local.set 3 loop local.get 3 local.get 1 i64.lt_s if local.get 3 i64.const 1 i64.add local.set 3 local.get 2 i64.const 10 i64.mul local.set 2 br 1 else end end local.get 4 local.get 2 i64.div_s i64.const 10 i64.rem_s i64.const 12 i64.mul i64.const 88 i64.add local.set 0 i32.const 1 local.get 0 i32.wrap_i64 i32.const 1 i32.const 0 call 1 drop br 1 else end end return ) (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (export "print_i64" (func 3)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") (data (;1;) (i32.const 12) " ") (data (;2;) (i32.const 16) "\18\00\00\00\01\00\00\00") (data (;3;) (i32.const 24) "\n ") (data (;4;) (i32.const 28) "\24\00\00\00\01\00\00\00") (data (;5;) (i32.const 36) "- ") (data (;6;) (i32.const 40) "\30\00\00\00\01\00\00\00") (data (;7;) (i32.const 48) ". ") (data (;8;) (i32.const 52) "\3c\00\00\00\01\00\00\00") (data (;9;) (i32.const 60) "( ") (data (;10;) (i32.const 64) "\48\00\00\00\01\00\00\00") (data (;11;) (i32.const 72) ") ") (data (;12;) (i32.const 76) "\54\00\00\00\01\00\00\00") (data (;13;) (i32.const 84) ", ") (data (;14;) (i32.const 88) "\60\00\00\00\01\00\00\00") (data (;15;) (i32.const 96) "0 ") (data (;16;) (i32.const 100) "\6c\00\00\00\01\00\00\00") (data (;17;) (i32.const 108) "1 ") (data (;18;) (i32.const 112) "\78\00\00\00\01\00\00\00") (data (;19;) (i32.const 120) "2 ") (data (;20;) (i32.const 124) "\84\00\00\00\01\00\00\00") (data (;21;) (i32.const 132) "3 ") (data (;22;) (i32.const 136) "\90\00\00\00\01\00\00\00") (data (;23;) (i32.const 144) "4 ") (data (;24;) (i32.const 148) "\9c\00\00\00\01\00\00\00") (data (;25;) (i32.const 156) "5 ") (data (;26;) (i32.const 160) "\a8\00\00\00\01\00\00\00") (data (;27;) (i32.const 168) "6 ") (data (;28;) (i32.const 172) "\b4\00\00\00\01\00\00\00") (data (;29;) (i32.const 180) "7 ") (data (;30;) (i32.const 184) "\c0\00\00\00\01\00\00\00") (data (;31;) (i32.const 192) "8 ") (data (;32;) (i32.const 196) "\cc\00\00\00\01\00\00\00") (data (;33;) (i32.const 204) "9 ") (data (;34;) (i32.const 208) "\d8\00\00\00\0b\00\00\00") (data (;35;) (i32.const 216) "ERROR STOP\n ") ) lfortran-0.64.0/tests/reference/run-read_error_01-fe36a73.stderr0000664000175000017500000000003515227365530024451 0ustar alastairalastairError: Failed to read input. lfortran-0.64.0/tests/reference/asr-array_op_simplifier_test-ba92920.json0000664000175000017500000000077515227365530026477 0ustar alastairalastair{ "basename": "asr-array_op_simplifier_test-ba92920", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/array_op_simplifier_test.f90", "infile_hash": "c0b02cecb6f724cd809c6ed591f08c805e9d87dc0635842a5eca99be", "outfile": null, "outfile_hash": null, "stdout": "asr-array_op_simplifier_test-ba92920.stdout", "stdout_hash": "fba5ac51c6eaa620c564f35d382e1619eae1bb617d907a4fcab4baec", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-modules_01-3535389.stdout0000664000175000017500000000555515227365530023576 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { modules_01: (Program (SymbolTable 4 { b: (ExternalSymbol 4 b 2 b modules_01_a [] b Public ) }) modules_01 [modules_01_a] [(SubroutineCall 4 b () [] () .false. )] ), modules_01_a: (Module (SymbolTable 2 { b: (Function (SymbolTable 3 { }) b (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Print (StringConstant "b()" (String 1 (IntegerConstant 3 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] () Public .false. .false. () ) }) modules_01_a () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast_f90-derived_types_02-2a5b79b.stdout0000664000175000017500000000212415227365530025652 0ustar alastairalastairmodule a implicit none integer, parameter :: r8 = kind(0.d0) type :: B end type B type :: C end type C type, extends(B), public :: X private real(r8) :: r1 type(C), pointer :: cc => null() real(r8), pointer :: r2(:) => null(), r3(:) => null() contains private procedure, private :: p1 procedure(something), private :: p1b procedure, pass(self) :: p2 procedure :: proc_1, proc_2 generic :: operator(/=) => p5, p6 generic :: operator(+) => p8 generic :: operator(.in.) => p7 generic :: operator(.dot.) => p10 generic :: operator(/) => p11 generic :: assignment(=) => p9 generic, public :: calcCoeffs => calcCoeffsReal, calcCoeffsKPoint generic, private :: name => sample generic :: p1 => p2; generic, public :: write(formatted) => t_write generic :: read(unformatted) => t_read final :: y end type X type :: matrix(k, b) integer, kind :: k = 4 integer(8), len :: b real(k) :: element(b,b) end type matrix contains subroutine p1(this) class(X), intent(out) :: this end subroutine p1 subroutine p2(this) class(X), intent(inout) :: this end subroutine p2 end module a lfortran-0.64.0/tests/reference/asr-functions_16-3e10090.stdout0000664000175000017500000026337415227365530024207 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { functions_16: (Program (SymbolTable 9 { }) functions_16 [] [(Print (StringConstant "running functions_16 program" (String 1 (IntegerConstant 28 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ), tomlf_utils_sort: (Module (SymbolTable 2 { compare_keys_less: (Function (SymbolTable 8 { 1_toml_key_key: (ExternalSymbol 8 1_toml_key_key 3 key tomlf_utils_sort [toml_key] key Public ), less: (Variable 8 less [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lhs: (Variable 8 lhs [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 8 rhs [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compare_keys_less (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 8 lhs) (Var 8 rhs)] [(Assignment (Var 8 less) (StringCompare (StructInstanceMember (Var 8 lhs) 8 1_toml_key_key (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) Lt (StructInstanceMember (Var 8 rhs) 8 1_toml_key_key (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) (Logical 4) () ) () .false. .false. )] (Var 8 less) Public .true. .true. () ), compare_less: (Function (SymbolTable 4 { less: (Variable 4 less [] ReturnVar () () Default (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), lhs: (Variable 4 lhs [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 4 rhs [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compare_less (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Interface () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 4 lhs) (Var 4 rhs)] [] (Var 4 less) Public .false. .true. () ), quicksort: (Function (SymbolTable 6 { high: (Variable 6 high [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 6 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), idx: (Variable 6 idx [] InOut () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), last: (Variable 6 last [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), less: (Variable 6 less [] Unspecified () () Default (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Interface () .false. .true. .false. .false. .false. [] .false. ) 2 compare_less Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), list: (Variable 6 list [] InOut () () Default (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 6 low [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pivot: (Variable 6 pivot [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) quicksort (FunctionType [(Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) (Array (Integer 4) [(() ())] DescriptorArray ) (Integer 4) (Integer 4) (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Interface () .false. .true. .false. .false. .false. [] .false. )] () Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [swap quicksort] [(Var 6 list) (Var 6 idx) (Var 6 low) (Var 6 high) (Var 6 less)] [(If () (IntegerCompare (Var 6 low) Lt (Var 6 high) (Logical 4) () ) [(SubroutineCall 2 swap () [((ArrayItem (Var 6 idx) [(() (Var 6 low) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 6 idx) [(() (IntegerBinOp (IntegerBinOp (Var 6 low) Add (Var 6 high) (Integer 4) () ) Div (IntegerConstant 2 (Integer 4) Decimal) (Integer 4) () ) ())] (Integer 4) ColMajor () ))] () .false. ) (Assignment (Var 6 last) (Var 6 low) () .false. .false. ) (DoLoop () ((Var 6 i) (IntegerBinOp (Var 6 low) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) (Var 6 high) ()) [(If () (FunctionCall 6 less () [((ArrayItem (Var 6 list) [(() (ArrayItem (Var 6 idx) [(() (Var 6 i) ())] (Integer 4) ColMajor () ) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ColMajor () )) ((ArrayItem (Var 6 list) [(() (ArrayItem (Var 6 idx) [(() (Var 6 low) ())] (Integer 4) ColMajor () ) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ColMajor () ))] (Logical 4) () () ) [(Assignment (Var 6 last) (IntegerBinOp (Var 6 last) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. ) (SubroutineCall 2 swap () [((ArrayItem (Var 6 idx) [(() (Var 6 last) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 6 idx) [(() (Var 6 i) ())] (Integer 4) ColMajor () ))] () .false. )] [] )] [] ) (SubroutineCall 2 swap () [((ArrayItem (Var 6 idx) [(() (Var 6 low) ())] (Integer 4) ColMajor () )) ((ArrayItem (Var 6 idx) [(() (Var 6 last) ())] (Integer 4) ColMajor () ))] () .false. ) (Assignment (Var 6 pivot) (Var 6 last) () .false. .false. ) (SubroutineCall 2 quicksort () [((ArrayPhysicalCast (Var 6 list) DescriptorArray DescriptorArray (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 6 idx) DescriptorArray DescriptorArray (Array (Integer 4) [(() ())] DescriptorArray ) () )) ((Var 6 low)) ((IntegerBinOp (Var 6 pivot) Sub (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((Var 6 less))] () .false. ) (SubroutineCall 2 quicksort () [((ArrayPhysicalCast (Var 6 list) DescriptorArray DescriptorArray (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) () )) ((ArrayPhysicalCast (Var 6 idx) DescriptorArray DescriptorArray (Array (Integer 4) [(() ())] DescriptorArray ) () )) ((IntegerBinOp (Var 6 pivot) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () )) ((Var 6 high)) ((Var 6 less))] () .false. )] [] )] () Public .true. .true. () ), sort: (GenericProcedure 2 sort [2 sort_keys] Public ), sort_keys: (Function (SymbolTable 5 { compare: (Variable 5 compare [] Unspecified () () Default (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Interface () .false. .true. .false. .false. .false. [] .false. ) 2 compare_less Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), high: (Variable 5 high [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 5 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), idx: (Variable 5 idx [] Out () () Default (Array (Integer 4) [(() ())] DescriptorArray ) () Source Public Optional .false. .false. .false. () .false. .false. NotMethod () [] ), indexarray: (Variable 5 indexarray [] Local () () Default (Allocatable (Array (Integer 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), list: (Variable 5 list [] InOut () () Default (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), low: (Variable 5 low [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sorted: (Variable 5 sorted [] Local () () Default (Allocatable (Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) ) 2 toml_key Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sort_keys (FunctionType [(Array (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [(() ())] DescriptorArray ) (Array (Integer 4) [(() ())] DescriptorArray ) (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Logical 4) Source Interface () .false. .true. .false. .false. .false. [] .false. )] () Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [quicksort] [(Var 5 list) (Var 5 idx) (Var 5 compare)] [(Assignment (Var 5 low) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 5 high) (ArraySize (Var 5 list) () (Integer 4) () ) () .false. .false. ) (Assignment (Var 5 sorted) (Var 5 list) () .false. .false. ) (Allocate [((Var 5 indexarray) [((IntegerConstant 1 (Integer 4) Decimal) (Var 5 high))] () () ())] () () (ArrayConstructor [(ImpliedDoLoop [(Var 5 i)] (Var 5 i) (Var 5 low) (Var 5 high) () (Integer 4) () )] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) ())] DescriptorArray ) () ColMajor () ) ) (Assignment (Var 5 indexarray) (ArrayConstructor [(ImpliedDoLoop [(Var 5 i)] (Var 5 i) (Var 5 low) (Var 5 high) () (Integer 4) () )] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) ())] DescriptorArray ) () ColMajor () ) () .false. .false. ) (If () (IntrinsicElementalFunction Present [(Var 5 compare)] 0 (Logical 4) () ) [(SubroutineCall 2 quicksort () [((Var 5 sorted)) ((Var 5 indexarray)) ((Var 5 low)) ((Var 5 high)) ((Var 5 compare))] () .false. )] [(SubroutineCall 2 quicksort () [((Var 5 sorted)) ((Var 5 indexarray)) ((Var 5 low)) ((Var 5 high)) ((Var 2 compare_keys_less))] () .false. )] ) (DoLoop () ((Var 5 i) (Var 5 low) (Var 5 high) ()) [(Assignment (ArrayItem (Var 5 list) [(() (Var 5 i) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ColMajor () ) (ArrayItem (Var 5 sorted) [(() (ArrayItem (Var 5 indexarray) [(() (Var 5 i) ())] (Integer 4) ColMajor () ) ())] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) ColMajor () ) () .false. .false. )] [] ) (If () (IntrinsicElementalFunction Present [(Var 5 idx)] 0 (Logical 4) () ) [(Assignment (Var 5 idx) (Var 5 indexarray) () .false. .false. )] [] )] () Public .true. .true. () ), swap: (Function (SymbolTable 7 { lhs: (Variable 7 lhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), rhs: (Variable 7 rhs [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), tmp: (Variable 7 tmp [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) swap (FunctionType [(Integer 4) (Integer 4)] () Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 7 lhs) (Var 7 rhs)] [(Assignment (Var 7 tmp) (Var 7 lhs) () .false. .false. ) (Assignment (Var 7 lhs) (Var 7 rhs) () .false. .false. ) (Assignment (Var 7 rhs) (Var 7 tmp) () .false. .false. )] () Public .true. .true. () ), toml_key: (Struct (SymbolTable 3 { key: (Variable 3 key [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) toml_key (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [key] [] Source Public .false. .false. .false. [] () () [] ) }) tomlf_utils_sort () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/ast-doconcurrentloop_02-b8757f0.json0000664000175000017500000000100315227365530025276 0ustar alastairalastair{ "basename": "ast-doconcurrentloop_02-b8757f0", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doconcurrentloop_02.f90", "infile_hash": "972a21c452523a0a3060e6b1a0c75e868f5dd660ea5763358ccade86", "outfile": null, "outfile_hash": null, "stdout": "ast-doconcurrentloop_02-b8757f0.stdout", "stdout_hash": "2f1e9ad63d2a5b1fe9860ede4ac2c6c0f70b801b5cd7587718042857", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_error_07c-901677a.json0000664000175000017500000000076215227365530025020 0ustar alastairalastair{ "basename": "asr-template_error_07c-901677a", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/template_error_07c.f90", "infile_hash": "5a4d161fc22863d78263e4a5e4a34a63e5f5a73e4c894b4ac91ea35b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-template_error_07c-901677a.stderr", "stderr_hash": "26d480e92127e294998ca7f559ccb8d78bc7b057256d7baf17483da4", "returncode": 2 }lfortran-0.64.0/tests/reference/asr_clojure-subroutine1-be16026.stdout0000664000175000017500000000274415227365530025750 0ustar alastairalastair(TranslationUnit (SymbolTable 1 {:g (Function (SymbolTable 2 {:i (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :x (Variable 2 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [])}) g (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 2 x) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false.) (DoLoop () ((Var 2 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (Var 2 x) (IntegerBinOp (Var 2 x) Mul (Var 2 i) (Integer 4) ()) () .false. .false.)] [])] () Public .true. .true. ()), :h (Function (SymbolTable 3 {:i (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () []), :x (Variable 3 x [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [])}) h (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false.) [] [] [(Assignment (Var 3 x) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false.) (DoLoop () ((Var 3 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(Assignment (Var 3 x) (IntegerBinOp (Var 3 i) Mul (Var 3 x) (Integer 4) ()) () .false. .false.)] [])] () Public .true. .true. ())}) []) lfortran-0.64.0/tests/reference/julia-block_03-cf8537e.stdout0000664000175000017500000000062515227365530023753 0ustar alastairalastairfunction square(b::Int32) local result::Int32 result = b * b if result ≠ 100 println(Base.stderr, "ERROR STOP") exit(1) end println(result) end function main() local a::Int32 a = 10 @label label_1 let b::Int32 a = a + 5 if a == 15 @goto label_1 end b = a ÷ 2 square(b) end end main() lfortran-0.64.0/tests/reference/asr-template_commutative-45a3ac0.json0000664000175000017500000000100615227365530025665 0ustar alastairalastair{ "basename": "asr-template_commutative-45a3ac0", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/template_commutative.f90", "infile_hash": "17b44264286a23c913bfa477f02febff7dcd4db7d04cf26d8cf3c413", "outfile": null, "outfile_hash": null, "stdout": "asr-template_commutative-45a3ac0.stdout", "stdout_hash": "848b8ebb427a133ecb49dc29636f6e2cdb9b7b6466d43c8a3eb3c4d0", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/cpp-case_03-5c7be5c.stdout0000664000175000017500000000226215227365530023322 0ustar alastairalastair#include #include #include #include #include #include #include #include template Kokkos::View from_std_vector(const std::vector &v) { Kokkos::View r("r", v.size()); for (size_t i=0; i < v.size(); i++) { r(i) = v[i]; } return r; } // Forward declarations namespace { } // Implementations namespace { void main2() { int32_t a=1; int32_t b=2; int32_t marks; marks = 94; if (marks >= 40 + b) { std::cout<< "Pass!"<= 40 + b) { std::cout<< "Pass!"< co_array) ! segment 1 end team form team(2 - mod(this_image(), 2), odd_even) change team(odd_even) ! segment 2 end team end program team1 lfortran-0.64.0/tests/reference/asr-data_implied_do_01-737a2b1.stdout0000664000175000017500000003327415227365530025346 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { data_implied_do_01: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) data_implied_do_01 [] [(Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 2.000000 (Real 4) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 0.000000 (Real 4) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 0.000000 (Real 4) ) () .false. .false. ) (Assignment (ArrayItem (Var 2 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) (RealConstant 0.000000 (Real 4) ) () .false. .false. ) (Print (StringFormat () [(Var 2 a)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 1 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 1.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 2 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 2.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 3 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 0.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 4 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 0.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 2 a) [(() (IntegerConstant 5 (Integer 4) Decimal) ())] (Real 4) ColMajor () ) Sub (RealConstant 0.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-parameter1-e3995e7.json0000664000175000017500000000072315227365530023457 0ustar alastairalastair{ "basename": "ast-parameter1-e3995e7", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/parameter1.f90", "infile_hash": "89e627eefd928ded810c79f57685b062a029d924767fffd996a7552d", "outfile": null, "outfile_hash": null, "stdout": "ast-parameter1-e3995e7.stdout", "stdout_hash": "cc8e9ed0aa3ba9688a32f03206cef43fa33a3c5f2d2d60121b541ffc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-template_error_07a-fa85c7e.stderr0000664000175000017500000000035515227365530025572 0ustar alastairalastairsemantic error: Symbol combine is not declared in semigroup's parameters --> tests/errors/template_error_07a.f90:6:5 - 13:1 | 6 | requirement semigroup(t) | ^^^^^^^^^^^^^^^^^^^^^^^^... ... | 13 | | ...^ lfortran-0.64.0/tests/reference/asr-modulo_01-b82bee9.stderr0000664000175000017500000000023415227365530023670 0ustar alastairalastairsemantic error: Second argument of modulo cannot be 0 --> tests/errors/modulo_01.f90:2:14 | 2 | print *, modulo(1, 0) | ^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-fixed_form_simple_continue-dbefb27.stdout0000664000175000017500000000027415227365530027570 0ustar alastairalastair(TranslationUnit [(Program implicit_program_lfortran () [] [] [] [(Continue 0 () )] [] )] ) lfortran-0.64.0/tests/reference/fortran-int_to_complex_cast_in_comparison-2b60771.f900000664000175000017500000000051215227365530030576 0ustar alastairalastairprogram expr2 implicit none integer(4), parameter :: dp = Kind(0.0000000000000000e+00_8) contains elemental complex(8) function dabs(x) result(r) complex(8), intent(in) :: x if (x /= cmplx(0, 0.0, kind=8)) then r = x else r = cmplx(0, 0.0, kind=8) - x end if end function dabs end program expr2 lfortran-0.64.0/tests/reference/ast-assign_to1-09e061a.stdout0000664000175000017500000000105315227365530024006 0ustar alastairalastair(TranslationUnit [(Program main () [] [] [] [(If 1000 () (< 0 1) [(Assign 0 15 k () )] [] () () () ) (GoTo 100 k () [] () ) (Print 15 () [(String "run" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/tokens-esub1-3e8b16d.stdout0000664000175000017500000000042515227365530023563 0ustar alastairalastair(KEYWORD "subroutine") (TOKEN "identifier" g) (TOKEN "(") (TOKEN ")") (TOKEN "identifier" r) (NEWLINE) (KEYWORD "integer") (TOKEN "::") (TOKEN "identifier" x) (NEWLINE) (TOKEN "identifier" x) (TOKEN "=") (TOKEN "integer" 1) (NEWLINE) (KEYWORD "end subroutine") (NEWLINE) (EOF) lfortran-0.64.0/tests/reference/julia-subroutine1-87ec3af.stdout0000664000175000017500000000033615227365530024712 0ustar alastairalastairfunction g() local i::Int32 local x::Int32 x = 1 for i ∈ 1:10 x = x * i end end function h() local i::Int32 local x::Int32 x = 1 for i ∈ 1:10 x = i * x end end lfortran-0.64.0/tests/reference/asr-nested_call_filter_01-2b1295b.stdout0000664000175000017500000002533115227365530026065 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { nested_call_filter_01: (Program (SymbolTable 4 { modproc: (ExternalSymbol 4 modproc 2 modproc nested_call_filter_mod [] modproc Public ), outer: (Function (SymbolTable 5 { a: (Variable 5 a [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), inner: (Function (SymbolTable 6 { }) inner (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 5 a) (IntegerBinOp (Var 5 a) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ) }) outer (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 5 a) (IntegerConstant 1 (Integer 4) Decimal) () .false. .false. ) (SubroutineCall 5 inner () [] () .false. ) (SubroutineCall 4 modproc () [((Var 5 a))] () .false. )] () Public .true. .true. () ) }) nested_call_filter_01 [nested_call_filter_mod] [(SubroutineCall 4 outer () [] () .false. )] ), nested_call_filter_mod: (Module (SymbolTable 2 { modproc: (Function (SymbolTable 3 { y: (Variable 3 y [] InOut () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) modproc (FunctionType [(Integer 4)] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 y)] [(Assignment (Var 3 y) (IntegerBinOp (Var 3 y) Add (IntegerConstant 1 (Integer 4) Decimal) (Integer 4) () ) () .false. .false. )] () Public .true. .true. () ) }) nested_call_filter_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/run-read_40-72baf22.json0000664000175000017500000000070715227365530022706 0ustar alastairalastair{ "basename": "run-read_40-72baf22", "cmd": "lfortran --no-color {infile}", "infile": "tests/../integration_tests/read_40.f90", "infile_hash": "7e90dbd67eed6f847bc0f1bf39c5843a10df9b0dad28ea30c4119148", "outfile": null, "outfile_hash": null, "stdout": "run-read_40-72baf22.stdout", "stdout_hash": "cdde590c8ded40f768566f8fefa15e60f9573b153ea0fe4374d26240", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_typing4-c338b90.stderr0000664000175000017500000000027515227365530025221 0ustar alastairalastairstyle suggestion: Use complex(8) instead of complex*16 --> tests/implicit_typing4.f90:7:21 | 7 | IMPLICIT COMPLEX*16 (C,Z) | ^ help: write this as 'complex(8)' lfortran-0.64.0/tests/reference/asr-nested_namelist_01-7fc4952.stdout0000664000175000017500000002631115227365530025435 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { nested_namelist_01: (Program (SymbolTable 5 { outer: (ExternalSymbol 5 outer 2 outer nested_namelist_01_mod [] outer Public ) }) nested_namelist_01 [nested_namelist_01_mod] [(SubroutineCall 5 outer () [] () .false. )] ), nested_namelist_01_mod: (Module (SymbolTable 2 { outer: (Function (SymbolTable 3 { i: (Variable 3 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), inner: (Function (SymbolTable 4 { lfortran_iomsg: (Variable 4 lfortran_iomsg [] Local () () Default (String 1 (IntegerConstant 0 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) inner (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(FileWrite 0 (IntegerConstant 6 (Integer 4) Decimal) (Var 4 lfortran_iomsg) () () [] () () () .false. 3 nml () () () )] () Public .true. .true. () ), nml: (Namelist 3 nml [3 i 3 x] ), x: (Variable 3 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) outer (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(Assignment (Var 3 i) (IntegerConstant 2 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 3 x) (RealConstant 3.000000 (Real 4) ) () .false. .false. ) (SubroutineCall 3 inner () [] () .false. )] () Public .true. .true. () ) }) nested_namelist_01_mod () [] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/llvm-array_bound_1-6741f43.stdout0000664000175000017500000003671415227365530024614 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [9 x i8] c"I4,I4,I4\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.1 = private unnamed_addr constant [9 x i8] c"I4,I4,I4\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.2 = private unnamed_addr constant [12 x i8] c"I4,I4,I4,I4\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.3 = private unnamed_addr constant [12 x i8] c"I4,I4,I4,I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @8 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.4 = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @9 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @10 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.5 = private unnamed_addr constant [6 x i8] c"I4,I4\00", align 1 @11 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @12 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.6 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @13 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @14 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info.7 = private unnamed_addr constant [3 x i8] c"I4\00", align 1 @15 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc19 = alloca %string_descriptor, align 8 %stringFormat_desc16 = alloca %string_descriptor, align 8 %stringFormat_desc13 = alloca %string_descriptor, align 8 %stringFormat_desc10 = alloca %string_descriptor, align 8 %stringFormat_desc7 = alloca %string_descriptor, align 8 %stringFormat_desc4 = alloca %string_descriptor, align 8 %stringFormat_desc1 = alloca %string_descriptor, align 8 %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %a = alloca [196 x i32], align 4 %b = alloca [96 x i32], align 4 %c = alloca [35 x i32], align 4 %d = alloca [4 x i32], align 4 %3 = alloca i64, align 8 %4 = alloca i32, align 4 store i32 2, i32* %4, align 4 %5 = alloca i32, align 4 store i32 3, i32* %5, align 4 %6 = alloca i32, align 4 store i32 1, i32* %6, align 4 %7 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %4, i32* %5, i32* %6) %8 = load i64, i64* %3, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %7, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %8, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %14 = load i64, i64* %13, align 8 %15 = trunc i64 %14 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %12, i32 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) %16 = icmp eq i8* %7, null br i1 %16, label %free_done, label %free_nonnull free_nonnull: ; preds = %.entry call void @_lfortran_free_alloc(i8* %2, i8* %7) br label %free_done free_done: ; preds = %free_nonnull, %.entry %17 = alloca i64, align 8 %18 = alloca i32, align 4 store i32 5, i32* %18, align 4 %19 = alloca i32, align 4 store i32 9, i32* %19, align 4 %20 = alloca i32, align 4 store i32 7, i32* %20, align 4 %21 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info.1, i32 0, i32 0), i64* %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %18, i32* %19, i32* %20) %22 = load i64, i64* %17, align 8 %23 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 store i8* %21, i8** %23, align 8 %24 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 store i64 %22, i64* %24, align 8 %25 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 0 %26 = load i8*, i8** %25, align 8 %27 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc1, i32 0, i32 1 %28 = load i64, i64* %27, align 8 %29 = trunc i64 %28 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* %26, i32 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0), i32 1) %30 = icmp eq i8* %21, null br i1 %30, label %free_done3, label %free_nonnull2 free_nonnull2: ; preds = %free_done call void @_lfortran_free_alloc(i8* %2, i8* %21) br label %free_done3 free_done3: ; preds = %free_nonnull2, %free_done %31 = alloca i64, align 8 %32 = alloca i32, align 4 store i32 1, i32* %32, align 4 %33 = alloca i32, align 4 store i32 2, i32* %33, align 4 %34 = alloca i32, align 4 store i32 3, i32* %34, align 4 %35 = alloca i32, align 4 store i32 4, i32* %35, align 4 %36 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.2, i32 0, i32 0), i64* %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %32, i32* %33, i32* %34, i32* %35) %37 = load i64, i64* %31, align 8 %38 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 store i8* %36, i8** %38, align 8 %39 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 store i64 %37, i64* %39, align 8 %40 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 0 %41 = load i8*, i8** %40, align 8 %42 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc4, i32 0, i32 1 %43 = load i64, i64* %42, align 8 %44 = trunc i64 %43 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* %41, i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0), i32 1) %45 = icmp eq i8* %36, null br i1 %45, label %free_done6, label %free_nonnull5 free_nonnull5: ; preds = %free_done3 call void @_lfortran_free_alloc(i8* %2, i8* %36) br label %free_done6 free_done6: ; preds = %free_nonnull5, %free_done3 %46 = alloca i64, align 8 %47 = alloca i32, align 4 store i32 2, i32* %47, align 4 %48 = alloca i32, align 4 store i32 4, i32* %48, align 4 %49 = alloca i32, align 4 store i32 6, i32* %49, align 4 %50 = alloca i32, align 4 store i32 7, i32* %50, align 4 %51 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @serialization_info.3, i32 0, i32 0), i64* %46, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %47, i32* %48, i32* %49, i32* %50) %52 = load i64, i64* %46, align 8 %53 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 store i8* %51, i8** %53, align 8 %54 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 store i64 %52, i64* %54, align 8 %55 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 0 %56 = load i8*, i8** %55, align 8 %57 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc7, i32 0, i32 1 %58 = load i64, i64* %57, align 8 %59 = trunc i64 %58 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %56, i32 %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %60 = icmp eq i8* %51, null br i1 %60, label %free_done9, label %free_nonnull8 free_nonnull8: ; preds = %free_done6 call void @_lfortran_free_alloc(i8* %2, i8* %51) br label %free_done9 free_done9: ; preds = %free_nonnull8, %free_done6 %61 = alloca i64, align 8 %62 = alloca i32, align 4 store i32 6, i32* %62, align 4 %63 = alloca i32, align 4 store i32 1, i32* %63, align 4 %64 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info.4, i32 0, i32 0), i64* %61, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %62, i32* %63) %65 = load i64, i64* %61, align 8 %66 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 store i8* %64, i8** %66, align 8 %67 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 store i64 %65, i64* %67, align 8 %68 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 0 %69 = load i8*, i8** %68, align 8 %70 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc10, i32 0, i32 1 %71 = load i64, i64* %70, align 8 %72 = trunc i64 %71 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @9, i32 0, i32 0), i8* %69, i32 %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @8, i32 0, i32 0), i32 1) %73 = icmp eq i8* %64, null br i1 %73, label %free_done12, label %free_nonnull11 free_nonnull11: ; preds = %free_done9 call void @_lfortran_free_alloc(i8* %2, i8* %64) br label %free_done12 free_done12: ; preds = %free_nonnull11, %free_done9 %74 = alloca i64, align 8 %75 = alloca i32, align 4 store i32 10, i32* %75, align 4 %76 = alloca i32, align 4 store i32 7, i32* %76, align 4 %77 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @serialization_info.5, i32 0, i32 0), i64* %74, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %75, i32* %76) %78 = load i64, i64* %74, align 8 %79 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 store i8* %77, i8** %79, align 8 %80 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 store i64 %78, i64* %80, align 8 %81 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 0 %82 = load i8*, i8** %81, align 8 %83 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc13, i32 0, i32 1 %84 = load i64, i64* %83, align 8 %85 = trunc i64 %84 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @11, i32 0, i32 0), i8* %82, i32 %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @10, i32 0, i32 0), i32 1) %86 = icmp eq i8* %77, null br i1 %86, label %free_done15, label %free_nonnull14 free_nonnull14: ; preds = %free_done12 call void @_lfortran_free_alloc(i8* %2, i8* %77) br label %free_done15 free_done15: ; preds = %free_nonnull14, %free_done12 %87 = alloca i64, align 8 %88 = alloca i32, align 4 store i32 1, i32* %88, align 4 %89 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.6, i32 0, i32 0), i64* %87, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %88) %90 = load i64, i64* %87, align 8 %91 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 store i8* %89, i8** %91, align 8 %92 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 store i64 %90, i64* %92, align 8 %93 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 0 %94 = load i8*, i8** %93, align 8 %95 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc16, i32 0, i32 1 %96 = load i64, i64* %95, align 8 %97 = trunc i64 %96 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @13, i32 0, i32 0), i8* %94, i32 %97, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @12, i32 0, i32 0), i32 1) %98 = icmp eq i8* %89, null br i1 %98, label %free_done18, label %free_nonnull17 free_nonnull17: ; preds = %free_done15 call void @_lfortran_free_alloc(i8* %2, i8* %89) br label %free_done18 free_done18: ; preds = %free_nonnull17, %free_done15 %99 = alloca i64, align 8 %100 = alloca i32, align 4 store i32 4, i32* %100, align 4 %101 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info.7, i32 0, i32 0), i64* %99, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %100) %102 = load i64, i64* %99, align 8 %103 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 store i8* %101, i8** %103, align 8 %104 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 store i64 %102, i64* %104, align 8 %105 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 0 %106 = load i8*, i8** %105, align 8 %107 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc19, i32 0, i32 1 %108 = load i64, i64* %107, align 8 %109 = trunc i64 %108 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @15, i32 0, i32 0), i8* %106, i32 %109, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @14, i32 0, i32 0), i32 1) %110 = icmp eq i8* %101, null br i1 %110, label %free_done21, label %free_nonnull20 free_nonnull20: ; preds = %free_done18 call void @_lfortran_free_alloc(i8* %2, i8* %101) br label %free_done21 free_done21: ; preds = %free_nonnull20, %free_done18 br label %return return: ; preds = %free_done21 br label %FINALIZE_SYMTABLE_array_bound_1 FINALIZE_SYMTABLE_array_bound_1: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-recursion_02-76da7b3.json0000664000175000017500000000076115227365530024160 0ustar alastairalastair{ "basename": "llvm-recursion_02-76da7b3", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/recursion_02.f90", "infile_hash": "2935948fa13844b5a3b169f1d6df99e22cd1329310ef7c6d0f152583", "outfile": null, "outfile_hash": null, "stdout": "llvm-recursion_02-76da7b3.stdout", "stdout_hash": "9232fab42cb620824631803cac16762b2cddf28d140333101ce1e435", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-do_concurrent_reduce3-fc55bd2.json0000664000175000017500000000077715227365530026503 0ustar alastairalastair{ "basename": "ast_f90-do_concurrent_reduce3-fc55bd2", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/do_concurrent_reduce3.f90", "infile_hash": "68244c7ec55a2abd3a98afa53cf637130918461cb0264902730a72b3", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-do_concurrent_reduce3-fc55bd2.stdout", "stdout_hash": "ae638a94e59deec730a46c79af33d86ef2e155e208be9b1a81b43f8c", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-case_05-0476e14.json0000664000175000017500000000075215227365530023215 0ustar alastairalastair{ "basename": "ast_f90-case_05-0476e14", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/case_05.f90", "infile_hash": "914477f4a376baf0341e522d2109b6108238cd1d9dfecf969283ab79", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-case_05-0476e14.stdout", "stdout_hash": "ce09baab9a9372905328040da2ec2d35d9c2521bacbd3ed6ea3752fe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run_dbg-runtime_stacktrace_01-c6f5e06.json0000664000175000017500000000075615227365530026510 0ustar alastairalastair{ "basename": "run_dbg-runtime_stacktrace_01-c6f5e06", "cmd": "lfortran {infile} -g --no-color", "infile": "tests/errors/runtime_stacktrace_01.f90", "infile_hash": "3e65758e10744eea8d101be6437af3724c0ec32c832e29da968fc22d", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run_dbg-runtime_stacktrace_01-c6f5e06.stderr", "stderr_hash": "eb3c044e48ac8bbaa776077b6c9cef2ef164ade8cddef1d6a7f06792", "returncode": 1 }lfortran-0.64.0/tests/reference/ast-array4-3d07222.stdout0000664000175000017500000000164515227365530023066 0ustar alastairalastair(TranslationUnit [(Program array4 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Assignment 0 i a [(some_array [(() 5 () 0)])] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-select_type_01-204dfa1.json0000664000175000017500000000076415227365530024270 0ustar alastairalastair{ "basename": "asr-select_type_01-204dfa1", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/select_type_01.f90", "infile_hash": "4981b936f0ddf008f38b82c5717fa34093538455199276653661a08f", "outfile": null, "outfile_hash": null, "stdout": "asr-select_type_01-204dfa1.stdout", "stdout_hash": "928659b1182a1a5a453600de689bdb6c885ef4eb63b1ad88ab3b03b4", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-interface2-98c9adf.stdout0000664000175000017500000000552115227365530024147 0ustar alastairalastair(TranslationUnit [(Module interface2 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [(Interface (AbstractInterfaceHeader) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceProc (Subroutine read_params [(this) (params)] [] () () [] [(Import [] ImportDefault () )] [] [(Declaration (AttrType TypeClass [] () porous_drag_model None ) [(AttrIntent InOut )] [(this [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () parameter_list None ) [(SimpleAttribute AttrPointer ) (AttrIntent In )] [(params [] [] () () None ())] () )] [] [] [] ) )] ) (Interface (InterfaceHeaderAssignment) (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [(InterfaceModuleProcedure [SomeProc] [(SimpleAttribute AttrModule )] () ) (InterfaceModuleProcedure [SomeProc2] [] () ) (InterfaceModuleProcedure [SomeProc3] [] () )] )] [] [] )] ) lfortran-0.64.0/tests/reference/ast-case_02-cf1eb8d.stdout0000664000175000017500000003101715227365530023405 0ustar alastairalastair(TranslationUnit [(Program case_02 () [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! local variable declaration" )] ) )] [(Declaration (AttrType TypeInteger [] () () None ) [] [(marks [] [] () () None ()) (out [] [] () () None ())] () )] [(Assignment 0 marks 81 (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (Select 0 () marks [(CaseStmt [(CaseCondRange 91 100 )] () [(Assignment 0 out 0 () ) (Print 0 () [(String "Excellent!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 81 90 )] () [(Assignment 0 out 1 () ) (Print 0 () [(String "Very good!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 71 80 )] () [(Assignment 0 out 2 () ) (Print 0 () [(String "Well done!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 61 70 )] () [(Assignment 0 out 3 () ) (Print 0 () [(String "Not bad!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 41 60 )] () [(Assignment 0 out 4 () ) (Print 0 () [(String "You passed!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange () 40 )] () [(Assignment 0 out 5 () ) (Print 0 () [(String "Better try again!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt_Default () [(Assignment 0 out 6 () ) (Print 0 () [(String "Invalid marks" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) () ) (Print 0 () [(String "Your marks are " ()) marks] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) ) (If 0 () (/= out 1) [(ErrorStop 0 () () () )] [] () () (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! case default at the top" )] ) ) (Select 0 () marks [(CaseStmt_Default () [(Print 0 () [(String "Invalid marks" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 91 100 )] () [(Print 0 () [(String "Excellent!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 81 90 )] () [(Print 0 () [(String "Very good!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 71 80 )] () [(Print 0 () [(String "Well done!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 61 70 )] () [(Print 0 () [(String "Not bad!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 41 60 )] () [(Print 0 () [(String "You passed!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange () 40 )] () [(Print 0 () [(String "Better try again!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) () ) (Print 0 () [(String "Your marks are " ()) marks] (TriviaNode [] [(EndOfLine) (EndOfLine) (Comment "! case default in the middle" )] ) ) (Select 0 () marks [(CaseStmt [(CaseCondRange 91 100 )] () [(Print 0 () [(String "Excellent!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 81 90 )] () [(Print 0 () [(String "Very good!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt_Default () [(Print 0 () [(String "Invalid marks" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 71 80 )] () [(Print 0 () [(String "Well done!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 61 70 )] () [(Print 0 () [(String "Not bad!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange 41 60 )] () [(Print 0 () [(String "You passed!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] ) (CaseStmt [(CaseCondRange () 40 )] () [(Print 0 () [(String "Better try again!" ())] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] )] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) () ) (Print 0 () [(String "Your marks are " ()) marks] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/ast-arrays_09-5096a19.json0000664000175000017500000000074515227365530023137 0ustar alastairalastair{ "basename": "ast-arrays_09-5096a19", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/arrays_09.f90", "infile_hash": "4807239e4f9ca8eaee4604e98cad28c2a760cf3900a1e2018d304838", "outfile": null, "outfile_hash": null, "stdout": "ast-arrays_09-5096a19.stdout", "stdout_hash": "15dcb38cd14eb4bbf06cc6090201752843d2f94986b6054ac0500d45", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics13-349f6ac.stderr0000664000175000017500000000025415227365530024343 0ustar alastairalastairsemantic error: All arguments to min0 must be of the same type --> tests/errors/intrinsics13.f90:2:14 | 2 | print *, min(12, 13.94) | ^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-fixed_form_implicit2-f584754.stdout0000664000175000017500000000215515227365530026002 0ustar alastairalastair(TranslationUnit [(Program main () [] [(Implicit [(ImplicitSpec (AttrType TypeComplex [] () () None ) [(LetterSpec () a ) (LetterSpec () b ) (LetterSpec () c )] )] () ) (Implicit [(ImplicitSpec (AttrType TypeCharacter [(() 4 Value)] () () None ) [(LetterSpec () k ) (LetterSpec () l )] )] () )] [] [] [] )] ) lfortran-0.64.0/tests/reference/cpp-program4-1796cb6.stderr0000664000175000017500000000040215227365530023457 0ustar alastairalastairwarning: Assuming implicit save attribute for variable declaration --> tests/program4.f90:30:13 | 30 | real :: saved1 = 2.0 | ^^^^^^^^^^^^ help: add explicit save attribute or parameter attribute or initialize in a separate statement lfortran-0.64.0/tests/reference/asr-merge_bits_comp-23a3e67.json0000664000175000017500000000075115227365530024533 0ustar alastairalastair{ "basename": "asr-merge_bits_comp-23a3e67", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/merge_bits_comp.f90", "infile_hash": "07da68f4c47a0ded636941ace875a8d1c0c31abec944e32405b95162", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-merge_bits_comp-23a3e67.stderr", "stderr_hash": "583538d100bab0c4acff69876d8d57ddbdacde57ef9ece7b963d4365", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-matrix_02_matmul-d389302.json0000664000175000017500000000077215227365530024506 0ustar alastairalastair{ "basename": "asr-matrix_02_matmul-d389302", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/matrix_02_matmul.f90", "infile_hash": "d02f8fde32ffc602a3915e12a9e9cd79453989c6edcbe310a8dd7d76", "outfile": null, "outfile_hash": null, "stdout": "asr-matrix_02_matmul-d389302.stdout", "stdout_hash": "9af3297d88ae61e7b939a267e36cadd0fdb905b929a29e4d107bbc3d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bindc1-6cc9005.json0000664000175000017500000000073415227365530022535 0ustar alastairalastair{ "basename": "asr-bindc1-6cc9005", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc1.f90", "infile_hash": "b894bae3cff84c3540cc34d38c5e3e6c46197db6d93d5f0b48013a06", "outfile": null, "outfile_hash": null, "stdout": "asr-bindc1-6cc9005.stdout", "stdout_hash": "eff70f124a57dc0f5d34383dad02fab082d4dee39287442537611fcc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-string_01-9625208.json0000664000175000017500000000074515227365530023055 0ustar alastairalastair{ "basename": "ast-string_01-9625208", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/string_01.f90", "infile_hash": "e7d4974d8a9b9704bf0c02d7943d916b40c591de3c9e89d30de28d7d", "outfile": null, "outfile_hash": null, "stdout": "ast-string_01-9625208.stdout", "stdout_hash": "0653853f1250c414f1009951e98da3be4d35f7a22a47fe599dc34198", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/llvm-program_cmake_01-caf8f48.stdout0000664000175000017500000000241715227365530025414 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @string_const_data = private constant [5 x i8] c"Hello" @string_const = private global %string_descriptor <{ i8* getelementptr inbounds ([5 x i8], [5 x i8]* @string_const_data, i32 0, i32 0), i64 5 }> @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: call void @_lpython_call_initial_functions(i32 %0, i8** %1) %2 = load i8*, i8** getelementptr inbounds (%string_descriptor, %string_descriptor* @string_const, i32 0, i32 0), align 8 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %2, i32 5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1) br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE_testfortran FINALIZE_SYMTABLE_testfortran: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_internal_alloc_finalize() lfortran-0.64.0/tests/reference/llvm-string_13-8952a13.stdout0000664000175000017500000001237215227365530023670 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." %string_descriptor = type <{ i8*, i64 }> @"ERROR STOP" = private unnamed_addr constant [11 x i8] c"ERROR STOP\00", align 1 @0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @2 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @3 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @4 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @5 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 @6 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @serialization_info = private unnamed_addr constant [9 x i8] c"I4,I4,I4\00", align 1 @7 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 define i32 @main(i32 %0, i8** %1) { .entry: %stringFormat_desc = alloca %string_descriptor, align 8 %2 = call i8* @_lfortran_get_default_allocator() call void @_lpython_call_initial_functions(i32 %0, i8** %1) %ia0 = alloca i32, align 4 store i32 48, i32* %ia0, align 4 %ia5 = alloca i32, align 4 store i32 53, i32* %ia5, align 4 %ia9 = alloca i32, align 4 store i32 57, i32* %ia9, align 4 br i1 false, label %then, label %else then: ; preds = %.entry call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont else: ; preds = %.entry br label %ifcont ifcont: ; preds = %else, %then br i1 false, label %then1, label %else2 then1: ; preds = %ifcont call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @3, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @2, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont3 else2: ; preds = %ifcont br label %ifcont3 ifcont3: ; preds = %else2, %then1 br i1 false, label %then4, label %else5 then4: ; preds = %ifcont3 call void (i8*, ...) @_lcompilers_print_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @5, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @"ERROR STOP", i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @4, i32 0, i32 0)) call void @_lfortran_internal_alloc_finalize() call void @exit(i32 1) br label %ifcont6 else5: ; preds = %ifcont3 br label %ifcont6 ifcont6: ; preds = %else5, %then4 %3 = alloca i64, align 8 %4 = alloca i32, align 4 store i32 48, i32* %4, align 4 %5 = alloca i32, align 4 store i32 53, i32* %5, align 4 %6 = alloca i32, align 4 store i32 57, i32* %6, align 4 %7 = call i8* (i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) @_lcompilers_string_format_fortran(i8* %2, i8* null, i64 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @serialization_info, i32 0, i32 0), i64* %3, i32 0, i32 0, i32 0, i32 0, i32 0, i32* %4, i32* %5, i32* %6) %8 = load i64, i64* %3, align 8 %9 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 store i8* %7, i8** %9, align 8 %10 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 store i64 %8, i64* %10, align 8 %11 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0 %12 = load i8*, i8** %11, align 8 %13 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1 %14 = load i64, i64* %13, align 8 %15 = trunc i64 %14 to i32 call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @7, i32 0, i32 0), i8* %12, i32 %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @6, i32 0, i32 0), i32 1) %16 = icmp eq i8* %7, null br i1 %16, label %free_done, label %free_nonnull free_nonnull: ; preds = %ifcont6 call void @_lfortran_free_alloc(i8* %2, i8* %7) br label %free_done free_done: ; preds = %free_nonnull, %ifcont6 br label %return return: ; preds = %free_done br label %FINALIZE_SYMTABLE_string_13 FINALIZE_SYMTABLE_string_13: ; preds = %return call void @_lfortran_internal_alloc_finalize() ret i32 0 } declare void @_lpython_call_initial_functions(i32, i8**) declare void @_lcompilers_print_error(i8*, ...) declare void @_lfortran_internal_alloc_finalize() declare void @exit(i32) declare i8* @_lcompilers_string_format_fortran(i8*, i8*, i64, i8*, i64*, i32, i32, i32, i32, i32, ...) declare i8* @_lfortran_get_default_allocator() declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) declare void @_lfortran_free_alloc(i8*, i8*) lfortran-0.64.0/tests/reference/ast-loop_test2-c76adc4.stdout0000664000175000017500000002341015227365530024200 0ustar alastairalastair(TranslationUnit [(Subroutine f [] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(nq [] [] () () None ()) (m [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(wrk5 [(1 5 DimensionExpr)] [] () () None ()) (v [(1 3 DimensionExpr) (1 4 DimensionExpr) (1 5 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(ve [(1 3 DimensionExpr) (1 4 DimensionExpr) (1 5 DimensionExpr)] [] () () None ()) (vev [(1 3 DimensionExpr) (1 4 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(zero [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(l1 [] [] () () None ()) (j [] [] () () None ()) (l2 [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(indx [] [] () () None ())] () )] [(DoLoop 0 () 140 l1 1 nq () [(DoLoop 0 () 110 j 1 m () [(Assignment 0 (FuncCallOrArray wrk5 [] [(() j () 0)] [] [] [] ) (FuncCallOrArray v [] [(() indx () 0) (() j () 0) (() l1 () 0)] [] [] [] ) () )] () () ) (DoLoop 0 () 120 j 1 m () [(Assignment 0 (FuncCallOrArray ve [] [(() indx () 0) (() l1 () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray wrk5 [] [(() j () 0)] [] [] [] ) () )] () () )] () () ) (Assignment 0 indx 1 () ) (Assignment 0 zero (Real "0.0d00") () ) (DoLoop 0 () 230 l1 1 nq () [(DoLoop 0 () 220 l2 1 l1 () [(Assignment 0 (FuncCallOrArray vev [] [(() l1 () 0) (() l2 () 0)] [] [] [] ) zero () ) (DoLoop 0 () 210 j 1 m () [(Assignment 0 (FuncCallOrArray vev [] [(() l1 () 0) (() l2 () 0)] [] [] [] ) (+ (FuncCallOrArray vev [] [(() l1 () 0) (() l2 () 0)] [] [] [] ) (* (FuncCallOrArray ve [] [(() indx () 0) (() l1 () 0) (() j () 0)] [] [] [] ) (FuncCallOrArray ve [] [(() indx () 0) (() l2 () 0) (() j () 0)] [] [] [] ))) () )] () () ) (Assignment 0 (FuncCallOrArray vev [] [(() l2 () 0) (() l1 () 0)] [] [] [] ) (FuncCallOrArray vev [] [(() l1 () 0) (() l2 () 0)] [] [] [] ) () )] () () )] () () ) (Return 0 () () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast-attributes1-9309f25.stdout0000664000175000017500000002176515227365530024156 0ustar alastairalastair(TranslationUnit [(Program attributes1 (TriviaNode [(EndOfLine) (Comment "! test for AST(to fmt) only" )] [] ) [] [] [(Declaration (AttrType TypeCharacter [(len 4 Value)] () () None ) [] [(a [] [] () () None ()) (b [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [] () () None ) [(AttrIntent In )] [(str [] [] () () DoubleAsterisk ())] () ) (Declaration (AttrType TypeCharacter [(len 1 Value) (kind c_char Value)] () () None ) [(SimpleAttribute AttrTarget ) (AttrBind (Bind [C] [(name (String "_binary_fclKernels_cl_start" ()))] ) )] [(fclKernelStart [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(len 3 Value)] () () None ) [] [(c [(1 2 DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(SimpleAttribute AttrVolatile )] [(d [] [] () () None ()) (e [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [(SimpleAttribute AttrExternal )] [(g [] [] () () None ())] () ) (Declaration () [(AttrEquivalence [([a (FuncCallOrArray c [] [(() 1 () 0)] [] [] [] )]) ([b (FuncCallOrArray c [] [(() 2 () 0)] [] [] [] )])] )] [] () ) (DerivedType details [] () [] [(Declaration () [(SimpleAttribute AttrSequence )] [] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(age [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(() 50 Value)] () () None ) [] [(name [] [] () () None ())] () )] [(DerivedTypeProc () [(AttrPass () )] [(UseSymbol sample name )] () )] ) (Declaration () [(SimpleAttribute AttrIntrinsic )] [(sin [] [] () () None ()) (cos [] [] () () None ())] () ) (Declaration (AttrType TypeDoublePrecision [] () () None ) [(AttrIntent In )] [(x [(() () AssumedRank)] [] () () None ())] () ) (Declaration (AttrType TypeType [] (AttrType TypeReal [(kind 4 Value)] () () None ) () None ) [(SimpleAttribute AttrAllocatable )] [(x [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeType [] (AttrType TypeInteger [(kind 4 Value)] () () None ) () None ) [(SimpleAttribute AttrAllocatable )] [(x [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeType [] (AttrType TypeCharacter [(len 4 Value)] () () None ) () None ) [(SimpleAttribute AttrAllocatable )] [(x [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeType [] (AttrType TypeLogical [(kind 4 Value)] () () None ) () None ) [(SimpleAttribute AttrAllocatable )] [(x [(() () DimensionExpr)] [] () () None ())] () ) (Declaration (AttrType TypeType [] (AttrType TypeComplex [(kind 4 Value)] () () None ) () None ) [(SimpleAttribute AttrAllocatable )] [(x [(() () DimensionExpr)] [] () () None ())] () ) (Declaration () [(SimpleAttribute AttrSave )] [(zzrayc [] [] () () Slash ())] () )] [] [] )] ) lfortran-0.64.0/tests/reference/asr_openmp-openmp1-3056a3e.json0000664000175000017500000000074115227365530024325 0ustar alastairalastair{ "basename": "asr_openmp-openmp1-3056a3e", "cmd": "lfortran --show-asr --no-color --openmp {infile} -o {outfile}", "infile": "tests/openmp1.f90", "infile_hash": "646c17ebbdf68dc9e0ba68a1a56c2ffb73c029a9537622d13ca068b8", "outfile": null, "outfile_hash": null, "stdout": "asr_openmp-openmp1-3056a3e.stdout", "stdout_hash": "a0c6f7c7c61f6ac499ee42f35a5991300a83549919f5706fe0086801", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array2-e7997a8.stdout0000664000175000017500000003453715227365530023202 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array2: (Program (SymbolTable 2 { a: (Variable 2 a [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), e: (Variable 2 e [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), f: (Variable 2 f [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), g: (Variable 2 g [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), h: (Variable 2 h [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), i: (Variable 2 i [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 4 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 3 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), j: (Variable 2 j [] Local () () Default (Array (Logical 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 5 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array2 [] [] ) }) [] ) lfortran-0.64.0/tests/reference/asr-cmd_01-e172099.json0000664000175000017500000000073415227365530022367 0ustar alastairalastair{ "basename": "asr-cmd_01-e172099", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/cmd_01.f90", "infile_hash": "11c7006f168f19f99bdf735051e716724b244773d6aff7c50eb77a7f", "outfile": null, "outfile_hash": null, "stdout": "asr-cmd_01-e172099.stdout", "stdout_hash": "fac358f769901a060a34e79a2d9defa2d3b2fca28c118b7bb31990cc", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_04-5864f91.json0000664000175000017500000000072415227365530022752 0ustar alastairalastair{ "basename": "asr-array_04-5864f91", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_04.f90", "infile_hash": "49fb2152950af75eb4ccb7c32e09995c2b0a0d7139d2f3d795407d9b", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_04-5864f91.stderr", "stderr_hash": "0b0d34dadf8e658122e619ddd91c15de32b84d034604dd745defbf69", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-global_scope9-f638dd0.stdout0000664000175000017500000000170515227365530024554 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { x: (Variable 1 x [] Local () () Default (Integer 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) [(Assignment (Var 1 x) (Cast (IntegerConstant 6 (Integer 4) Decimal) IntegerToInteger (Integer 8) (IntegerConstant 6 (Integer 8) Decimal) () ) () .false. .false. ) (Var 1 x)] ) lfortran-0.64.0/tests/reference/asr-derived_type_04-0a4f388.json0000664000175000017500000000075115227365530024366 0ustar alastairalastair{ "basename": "asr-derived_type_04-0a4f388", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/derived_type_04.f90", "infile_hash": "54474d4d6ab8c7341f0bb594bc870769d53b24e5791a5f3dd8c26b57", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-derived_type_04-0a4f388.stderr", "stderr_hash": "89c06240e5acb5da3de35257174ab3f698788c40948fffdc135a39e0", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-incorrect_type_where_02-1746f84.json0000664000175000017500000000100115227365530026037 0ustar alastairalastair{ "basename": "asr-incorrect_type_where_02-1746f84", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/incorrect_type_where_02.f90", "infile_hash": "4fbb3a440309d31eb008cd3fffcf541729477e6ac4fc23854bfa1f00", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-incorrect_type_where_02-1746f84.stderr", "stderr_hash": "d8b1d8a2cb5740cc5f7d42b71949ed0ad6091a1b44477a4ddf915fde", "returncode": 2 }lfortran-0.64.0/tests/reference/ast-fixedform_module-3f800f0.stdout0000664000175000017500000000041215227365530025266 0ustar alastairalastair(TranslationUnit [(Module e () [] [] [] [] [] ) (Program main () [] [(ImplicitNone [] () )] [] [] [] )] ) lfortran-0.64.0/tests/reference/asr-program1-17e5471.json0000664000175000017500000000071515227365530023050 0ustar alastairalastair{ "basename": "asr-program1-17e5471", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/program1.f90", "infile_hash": "ec4ccdfed01d45648718ca57a9ceb3e5aa82e55e57d8906636902e7b", "outfile": null, "outfile_hash": null, "stdout": "asr-program1-17e5471.stdout", "stdout_hash": "4f3905e87fcd6674e918250e696626a669bbaeee4d87ba2096809fbe", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-contains1-58ed60a.stdout0000664000175000017500000002077515227365530023741 0ustar alastairalastair(TranslationUnit [(Program test23stars () [] [] [(Declaration (AttrType TypeCharacter [] () () None ) [] [(b [] [] () () None ()) (c [] [] () () None ()) (d [] [] () (String "?" ()) Equal ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(j [] [] () () None ()) (k [] [] () () None ()) (n [(1 2 DimensionExpr)] [] () () None ())] () )] [(DataStmt 0 [(DataStmtSet [j k] [0 0] )] () ) (SubroutineCall 0 input [] [(() n () 0) (() (String "2*4" ()) () 0) (() b () 0) (() c () 0) (() d () 0) (() 666 () 0)] [] [] () ) (Write 0 [(()) ((String "(2i2,1x,a)" ()))] [] [(* (FuncCallOrArray n [] [(() 1 () 0)] [] [] [] ) j) (** (FuncCallOrArray n [] [(() 2 () 0)] [] [] [] ) k) b] () ) (Stop 0 () () () ) (Print 666 (String "(a)" ()) [(String " * error in n" ())] () ) (Print 0 (String "(*(i4))" ()) [n] () )] [(Subroutine input [(n) (a) (b) (c) (d) (r)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent Out )] [(n [(() () DimensionStar)] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [] () () None ) [(AttrIntent In )] [(a [] [] () () DoubleAsterisk ())] () ) (Declaration (AttrType TypeCharacter [] () () DoubleAsterisk ) [(AttrIntent Out )] [(b [] [] () () None ())] () ) (Declaration (AttrType TypeType [] () () Asterisk ) [(AttrIntent In )] [(c [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [(() 1 Value)] () () None ) [(AttrIntent In )] [(d [(() () AssumedRank)] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [] [(i [] [] () () None ())] () ) (Declaration (AttrType TypeCharacter [] () () None ) [] [(ch [] [] () () None ())] () ) (Declaration (AttrType TypeClass [] () () Asterisk ) [(SimpleAttribute AttrAllocatable )] [(e [(() () DimensionExpr)] [] () () None ())] () )] [(SelectRank 0 () () d [(RankStar () [(Print 0 (String "(a)" ()) [(String "This should not be printed!" ())] () )] )] () () ) (Read 0 () [(a) (())] [(iostat i)] [(FuncCallOrArray n [] [(() 1 () 0)] [] [] [] ) (FuncCallOrArray n [] [(() 2 () 0)] [] [] [] )] () ) (If 0 () (/= i 0) [(Return 0 1 () )] [] () () () ) (Print 0 (String "(a)" ()) [(String "Enter anything to continue." ())] () ) (Read 0 () [(()) ((String "(a)" ()))] [(iostat i)] [ch] () ) (Write 0 [(b) ((String "(i1)" ()))] [(iostat i)] [666] () )] [] [] )] )] ) lfortran-0.64.0/tests/reference/ast-subroutine7-27bdbfe.stdout0000664000175000017500000000206515227365530024457 0ustar alastairalastair(TranslationUnit [(Subroutine f [(a) (b)] [] () () [] [] [] [(Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent InOut )] [(a [] [] () () None ())] () ) (Declaration (AttrType TypeInteger [] () () None ) [(AttrIntent InOut )] [(b [] [] () () None ())] () )] [(Assignment 0 a (+ b 1) () ) (Assignment 0 b (+ a 1) () )] [] [] )] ) lfortran-0.64.0/tests/reference/ast_fixed_form-doloop_19-e430eca.json0000664000175000017500000000101015227365530025525 0ustar alastairalastair{ "basename": "ast_fixed_form-doloop_19-e430eca", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/doloop_19.f90", "infile_hash": "780ed4dd8cdb1d585c739619b6e0d88136ec21fc7c9ac78574421b23", "outfile": null, "outfile_hash": null, "stdout": "ast_fixed_form-doloop_19-e430eca.stdout", "stdout_hash": "a6a61516677b2fbaf156ea6d4fd2bd48a4d5f355b182f58ca7c95583", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/run-array_bounds_check_12-4cdd01e.stderr0000664000175000017500000000045415227365530026227 0ustar alastairalastairruntime error: Array shape mismatch in subroutine 'f_integer____0'. Tried to match size 3 of dimension 1 of argument number 3, but expected size is 2 --> tests/errors/array_bounds_check_12.f90:8:5 | 8 | e = f(a) | ^ | 8 | e = f(a) | ~ Parameter is size 2, argument is size 3 lfortran-0.64.0/tests/reference/llvm-codegen_function_polymorphic-834d4d1.json0000664000175000017500000000101415227365530027512 0ustar alastairalastair{ "basename": "llvm-codegen_function_polymorphic-834d4d1", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/codegen_function_polymorphic.f90", "infile_hash": "e8a86676ac666387de5e3e9d38e5dffa7c2c79a5d045b662cb990fc8", "outfile": null, "outfile_hash": null, "stdout": "llvm-codegen_function_polymorphic-834d4d1.stdout", "stdout_hash": "6f5fb1e8ee314b319ba6c82623c2832261542cd206c22254c09ba570", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-conv_complex2real-0c17eca.stdout0000664000175000017500000001145515227365530025524 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { conv_complex2real: (Program (SymbolTable 2 { x: (Variable 2 x [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), z: (Variable 2 z [] Local () () Default (Complex 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) conv_complex2real [] [(Assignment (Var 2 z) (ComplexConstructor (RealConstant 3.000000 (Real 4) ) (RealConstant 4.000000 (Real 4) ) (Complex 4) (ComplexConstant 3.000000 4.000000 (Complex 4) ) ) () .false. .false. ) (Assignment (Var 2 x) (Cast (Cast (Var 2 z) ComplexToReal (Real 8) () () ) RealToReal (Real 4) () () ) () .false. .false. ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 x) Sub (RealConstant 3.000000 (Real 4) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000010 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/wat-types_15-abe4006.json0000664000175000017500000000072515227365530023124 0ustar alastairalastair{ "basename": "wat-types_15-abe4006", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/types_15.f90", "infile_hash": "f21a7fe2af97a1bb6a0750efddbb764348cdbf7a6c1c1b3354c96cf0", "outfile": null, "outfile_hash": null, "stdout": "wat-types_15-abe4006.stdout", "stdout_hash": "212f309195060625e637ed1db1c6b4bf9724038db7c3982c246d1a7e", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_interface4-034a306.json0000664000175000017500000000102515227365530025214 0ustar alastairalastair{ "basename": "asr-implicit_interface4-034a306", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/implicit_interface4.f90", "infile_hash": "7cba05cff5b1be9768a73e4d33292b6af23b036642973fcef29a7069", "outfile": null, "outfile_hash": null, "stdout": "asr-implicit_interface4-034a306.stdout", "stdout_hash": "6ec5db252bf372fe0ee02242009c56f31e8dc37b51acc6e16570c906", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-goto_01-bab3e60.stdout0000664000175000017500000000013215227365530024017 0ustar alastairalastairprogram goto_01 implicit none integer :: a a = 5 go to 1 1 print *, a end program goto_01 lfortran-0.64.0/tests/reference/asr-entry_05-f368f0e.stdout0000664000175000017500000011315015227365530023500 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { dstzr: (Function (SymbolTable 3 { abstol: (Variable 3 abstol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ftol: (Variable 3 ftol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 3 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 3 r [] Local () () Default (Pointer (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reltol: (Variable 3 reltol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zx: (Variable 3 zx [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dstzr (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [dzror_main__lcompilers] [] [(SubroutineCall 1 dzror_main__lcompilers 1 dzror_main__lcompilers [((IntegerConstant 2 (Integer 4) Decimal)) ((IntegerConstant 0 (Integer 4) Decimal)) ((ArrayPhysicalCast (Var 3 r) DescriptorArray PointerArray (Pointer (Array (Real 4) [(() ())] PointerArray ) ) () ))] () .false. )] () Public .true. .true. () ), dzror: (Function (SymbolTable 2 { abstol: (Variable 2 abstol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ftol: (Variable 2 ftol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 2 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 2 r [n] Unspecified () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 2 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reltol: (Variable 2 reltol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zx: (Variable 2 zx [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dzror (FunctionType [(Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 0 (Integer 4) () ))] PointerArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [dzror_main__lcompilers] [(Var 2 n) (Var 2 r)] [(SubroutineCall 1 dzror_main__lcompilers 1 dzror_main__lcompilers [((IntegerConstant 1 (Integer 4) Decimal)) ((Var 2 n)) ((Var 2 r))] () .false. )] () Public .true. .true. () ), dzror_main__lcompilers: (Function (SymbolTable 4 { abstol: (Variable 4 abstol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), entry__lcompilers: (Variable 4 entry__lcompilers [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ftol: (Function (SymbolTable 6 { ftol_return_var_name: (Variable 6 ftol_return_var_name [] ReturnVar () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zx: (Variable 6 zx [] In () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) ftol (FunctionType [(Real 8)] (Real 8) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 6 zx)] [(Assignment (Var 6 ftol_return_var_name) (RealBinOp (RealConstant 0.500000 (Real 8) ) Mul (IntrinsicElementalFunction Max [(Var 4 abstol) (RealBinOp (Var 4 reltol) Mul (IntrinsicElementalFunction Abs [(Var 6 zx)] 0 (Real 8) () ) (Real 8) () )] 0 (Real 8) () ) (Real 8) () ) () .false. .false. )] (Var 6 ftol_return_var_name) Public .false. .true. () ), n: (Variable 4 n [] Unspecified () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 4 r [n] Unspecified () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 4 n))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), reltol: (Variable 4 reltol [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), zx: (Variable 4 zx [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) dzror_main__lcompilers (FunctionType [(Integer 4) (Integer 4) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (FunctionParam 1 (Integer 4) () ))] PointerArray )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 entry__lcompilers) (Var 4 n) (Var 4 r)] [(If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 1 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 1 1 )] [] ) (If () (IntegerCompare (Var 4 entry__lcompilers) Eq (IntegerConstant 2 (Integer 4) Decimal) (Logical 4) () ) [(GoTo 2 2 )] [] ) (GoToTarget 1 1 ) (Assignment (Var 4 r) (ArrayBroadcast (RealUnaryMinus (RealConstant 83.029999 (Real 4) ) (Real 4) (RealConstant -83.029999 (Real 4) ) ) (IntrinsicArrayFunction Shape [(Var 4 r)] 0 (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) () ) (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (Var 4 n))] PointerArray ) () ) () .false. .false. ) (Return) (GoToTarget 2 2 ) (Return)] () Public .true. .true. () ), entry_05: (Program (SymbolTable 5 { i: (Variable 5 i [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r: (Variable 5 r [] Local () () Default (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) entry_05 [] [(SubroutineCall 1 dzror () [((IntegerConstant 10 (Integer 4) Decimal)) ((ArrayPhysicalCast (Var 5 r) FixedSizeArray PointerArray (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal))] PointerArray ) () ))] () .false. ) (DoLoop () ((Var 5 i) (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 10 (Integer 4) Decimal) ()) [(If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (ArrayItem (Var 5 r) [(() (Var 5 i) ())] (Real 4) ColMajor () ) Sub (RealUnaryMinus (RealConstant 83.029999 (Real 4) ) (Real 4) (RealConstant -83.029999 (Real 4) ) ) (Real 4) () )] 0 (Real 4) () ) Gt (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] )] [] ) (Print (StringFormat () [(Var 5 r)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/llvm-complex_mul_test-5a74811.json0000664000175000017500000000077515227365530025073 0ustar alastairalastair{ "basename": "llvm-complex_mul_test-5a74811", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/complex_mul_test.f90", "infile_hash": "908ba75c567d6ff4ba0e42cba3e974999d00e5d24710f4649ac212d6", "outfile": null, "outfile_hash": null, "stdout": "llvm-complex_mul_test-5a74811.stdout", "stdout_hash": "44d5dec9dc4da918de8df62ee311317c599c472c0c2978d0b672a464", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-intrinsics10-ccd6322.stderr0000664000175000017500000000026615227365530024332 0ustar alastairalastairsemantic error: Type and kind of the relevant arguments of Ieor must be the same --> tests/errors/intrinsics10.f90:4:14 | 4 | print *, ieor(x, y) | ^^^^^^^^^^ lfortran-0.64.0/tests/reference/julia-doloop_03-6b5d1e0.json0000664000175000017500000000073615227365530023571 0ustar alastairalastair{ "basename": "julia-doloop_03-6b5d1e0", "cmd": "lfortran --no-color --show-julia {infile}", "infile": "tests/../integration_tests/doloop_03.f90", "infile_hash": "eafcb3d9dca52d81012b124f360aa148c946ed2e7ed8de07041aba1d", "outfile": null, "outfile_hash": null, "stdout": "julia-doloop_03-6b5d1e0.stdout", "stdout_hash": "e5049a78686d8d34f28e845132e890ad2753d82aad418e8bb64f7314", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_call_02-00d0664.stderr0000664000175000017500000000030615227365530024742 0ustar alastairalastairsemantic error: Type mismatch in argument `x`: expected `integer(4)[:]` but got `integer(8)[:]` --> tests/errors/implicit_call_02.f90:9:19 | 9 | call test_sub(arr) | ^^^ lfortran-0.64.0/tests/reference/asr-implicit10-23a5156.stderr0000664000175000017500000000071715227365530023620 0ustar alastairalastairstyle suggestion: Use real(8) instead of real*8 --> tests/implicit10.f90:6:1 | 6 | real*8 :: g, h, i | ^^^^^^ help: write this as 'real(8)' style suggestion: Use complex(4) instead of complex*8 --> tests/implicit10.f90:8:1 | 8 | complex*8 :: l, m | ^^^^^^^^^ help: write this as 'complex(4)' style suggestion: Use complex(8) instead of complex*16 --> tests/implicit10.f90:9:1 | 9 | complex *16 :: n | ^^^^^^^^^^^ help: write this as 'complex(8)' lfortran-0.64.0/tests/reference/asr-derived_type_02-3e6510f.stderr0000664000175000017500000000037415227365530024713 0ustar alastairalastairsemantic error: Passed object dummy argument does not match function argument --> tests/errors/derived_type_02.f90:7:9 | 7 | procedure(testing_interface), deferred :: testing | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast_f90-block_02-bdd6766.stdout0000664000175000017500000000044515227365530024111 0ustar alastairalastairprogram Block_02 integer :: A A = 10 1 loop: block integer :: B A = A + 5 if (A == 15) then go to 1 end if B = A/2 call Square(B) end block loop end program Block_02 subroutine Square(B) integer :: B, Result Result = B*B print *, Result end subroutine Square lfortran-0.64.0/tests/reference/ast-nested_02-68e8526.stdout0000664000175000017500000000365215227365530023473 0ustar alastairalastair(TranslationUnit [(Module nested_02_a (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] [(Subroutine b [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Print 0 () [(String "b()" ())] () ) (SubroutineCall 0 c [] [] [] [] () )] [(Subroutine c [] [] () () [] [] [] [] [(Print 0 () [5] () )] [] [] )] [] )] ) (Program nested_02 () [(Use [] nested_02_a [(UseSymbol b () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(SubroutineCall 0 b [] [] [] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/ast-program_without_line_02-250a492.stdout0000664000175000017500000000032715227365530026425 0ustar alastairalastair(TranslationUnit [(Program __xx_main () [] [] [] [(Print 0 () [(String "OK" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/asr-min_01-aa661b0.stdout0000664000175000017500000012171315227365530023101 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { min_min: (Program (SymbolTable 2 { int_inp1: (Variable 2 int_inp1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), int_inp2: (Variable 2 int_inp2 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_amin0: (Variable 2 output_amin0 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_amin1: (Variable 2 output_amin1 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_dmin1: (Variable 2 output_dmin1 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_min: (Variable 2 output_min [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_min0: (Variable 2 output_min0 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_min1: (Variable 2 output_min1 [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), output_min_different_kinds: (Variable 2 output_min_different_kinds [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp1: (Variable 2 real_inp1 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp2: (Variable 2 real_inp2 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp3: (Variable 2 real_inp3 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp4: (Variable 2 real_inp4 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp5: (Variable 2 real_inp5 [] Local () () Default (Real 8) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), real_inp6: (Variable 2 real_inp6 [] Local () () Default (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) min_min [] [(Assignment (Var 2 real_inp1) (RealConstant 5.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 real_inp2) (RealConstant 10.000000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 real_inp3) (RealConstant 5.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 real_inp4) (RealConstant 10.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 int_inp1) (IntegerConstant 5 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 int_inp2) (IntegerConstant 10 (Integer 4) Decimal) () .false. .false. ) (Assignment (Var 2 real_inp5) (RealConstant 5.200000 (Real 8) ) () .false. .false. ) (Assignment (Var 2 real_inp6) (RealConstant 9.000000 (Real 4) ) () .false. .false. ) (Assignment (Var 2 output_min) (IntrinsicElementalFunction Min [(Var 2 real_inp1) (Var 2 real_inp2)] 0 (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_min)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 output_min) Sub (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 5.000000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) GtE (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Real 8) (Var 2 output_min) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_min0) (IntrinsicElementalFunction Min [(Var 2 int_inp1) (Var 2 int_inp2)] 0 (Integer 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_min0)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 output_min0) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Integer 4) (Var 2 output_min0) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_amin0) (Cast (IntrinsicElementalFunction Min [(Var 2 int_inp1) (Var 2 int_inp2)] 0 (Integer 4) () ) IntegerToReal (Real 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_amin0)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 output_amin0) Sub (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (Real 4) () )] 0 (Real 4) () ) GtE (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Real 4) (Var 2 output_amin0) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_min1) (Cast (IntrinsicElementalFunction Min [(Var 2 real_inp3) (Var 2 real_inp4)] 0 (Real 4) () ) RealToInteger (Integer 4) () () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_min1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (IntegerCompare (Var 2 output_min1) NotEq (IntegerConstant 5 (Integer 4) Decimal) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Integer 4) (Var 2 output_min1) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_amin1) (IntrinsicElementalFunction Min [(Var 2 real_inp3) (Var 2 real_inp4)] 0 (Real 4) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_amin1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 output_amin1) Sub (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 4) (RealConstant 5.000000 (Real 4) ) () ) (Real 4) () )] 0 (Real 4) () ) GtE (RealConstant 0.000000 (Real 4) ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Real 4) (Var 2 output_amin1) (Integer 4) (IntegerConstant 4 (Integer 4) Decimal) ) NotEq (IntegerConstant 4 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_dmin1) (IntrinsicElementalFunction Min [(Var 2 real_inp1) (Var 2 real_inp1)] 0 (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_dmin1)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 output_dmin1) Sub (Cast (IntegerConstant 5 (Integer 4) Decimal) IntegerToReal (Real 8) (RealConstant 5.000000 (Real 8) ) () ) (Real 8) () )] 0 (Real 8) () ) GtE (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Real 8) (Var 2 output_dmin1) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] ) (Assignment (Var 2 output_min_different_kinds) (IntrinsicElementalFunction Min [(Var 2 real_inp5) (Cast (Var 2 real_inp6) RealToReal (Real 8) () () )] 0 (Real 8) () ) () .false. .false. ) (Print (StringFormat () [(Var 2 output_min_different_kinds)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (If () (RealCompare (IntrinsicElementalFunction Abs [(RealBinOp (Var 2 output_min_different_kinds) Sub (RealConstant 5.200000 (Real 8) ) (Real 8) () )] 0 (Real 8) () ) Gt (Cast (RealConstant 0.000000 (Real 4) ) RealToReal (Real 8) (RealConstant 0.000000 (Real 8) ) () ) (Logical 4) () ) [(ErrorStop () )] [] ) (If () (IntegerCompare (TypeInquiry Kind (Real 8) (Var 2 output_min_different_kinds) (Integer 4) (IntegerConstant 8 (Integer 4) Decimal) ) NotEq (IntegerConstant 8 (Integer 4) Decimal) (Logical 4) (LogicalConstant .false. (Logical 4) ) ) [(ErrorStop (StringConstant "Incorrect kind for min" (String 1 (IntegerConstant 22 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/wat-doloop_03-e0c63db.json0000664000175000017500000000073015227365530023332 0ustar alastairalastair{ "basename": "wat-doloop_03-e0c63db", "cmd": "lfortran --no-color --show-wat {infile}", "infile": "tests/../integration_tests/doloop_03.f90", "infile_hash": "eafcb3d9dca52d81012b124f360aa148c946ed2e7ed8de07041aba1d", "outfile": null, "outfile_hash": null, "stdout": "wat-doloop_03-e0c63db.stdout", "stdout_hash": "162a4ee496e349a909153844aebdce1115a94616b57e3229d1f0e894", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-statement_03-99c9cd3.json0000664000175000017500000000102515227365530023773 0ustar alastairalastair{ "basename": "asr-statement_03-99c9cd3", "cmd": "lfortran --show-asr --implicit-typing --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/statement_03.f90", "infile_hash": "e697fc36c92b65627b5c34f4d10ea67c06141eba507c2700b01e24b8", "outfile": null, "outfile_hash": null, "stdout": "asr-statement_03-99c9cd3.stdout", "stdout_hash": "1cfc644093f4c32e94c300464ffd35396b42d23bfa972c7a32fe2902", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-kind_star_of_logical-8df9344.stderr0000664000175000017500000000023015227365530026066 0ustar alastairalastairsemantic error: Expected initialization expression for kind --> tests/errors/kind_star_of_logical.f90:3:13 | 3 | logical(*) a | ^ lfortran-0.64.0/tests/reference/ast_f90-parameter_01-c88a516.json0000664000175000017500000000077115227365530024344 0ustar alastairalastair{ "basename": "ast_f90-parameter_01-c88a516", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/../integration_tests/parameter_01.f90", "infile_hash": "3488de8c55d194f309a915223114321d8596fba6f63399b39ac1ad68", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-parameter_01-c88a516.stdout", "stdout_hash": "e4d94bf2282323117c969d5a2af64550a874845922eb0dbb64ad48aa", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-open_invalid_kwarg1-6af4cc2.stderr0000664000175000017500000000027515227365530026011 0ustar alastairalastairsemantic error: Invalid argument `hello` supplied --> tests/errors/open_invalid_kwarg1.f90:4:5 | 4 | OPEN(file="numbers", hello="world") | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/ast-subroutine5-d00e190.json0000664000175000017500000000072615227365530023655 0ustar alastairalastair{ "basename": "ast-subroutine5-d00e190", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/subroutine5.f90", "infile_hash": "88c62ffd8f005d7a511511e43da68f25e8fe795a75fec462baa25885", "outfile": null, "outfile_hash": null, "stdout": "ast-subroutine5-d00e190.stdout", "stdout_hash": "38c6bd29d447610e449fb3b1ff443b85a7bcda7848256da55a01262d", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-bindc2-62a702e.json0000664000175000017500000000073415227365530022533 0ustar alastairalastair{ "basename": "asr-bindc2-62a702e", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/bindc2.f90", "infile_hash": "ac42ec8ae9572d40e2a2cff1d0f164d298724aaf2d6bc3644495919c", "outfile": null, "outfile_hash": null, "stdout": "asr-bindc2-62a702e.stdout", "stdout_hash": "faa754881b255792bd884b55ebdd63229629772639b9bfdd87e190cf", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_02_transfer-1bcc806.stdout0000664000175000017500000000721115227365530025343 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { array_02_transfer: (Program (SymbolTable 2 { m: (Variable 2 m [] Local () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) array_02_transfer [] [(Assignment (Var 2 m) (ArrayConstant 28 [1, 0, 0, ...., 5, 0, 0] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () .false. .false. ) (Print (StringFormat () [(BitCast (Var 2 m) (ArrayConstant 4 [1.00000000e+00] (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal))] FixedSizeArray ) ColMajor ) () (Array (Real 4) [((IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 7 (Integer 4) Decimal))] FixedSizeArray ) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-data1-4f93542.json0000664000175000017500000000073215227365530022316 0ustar alastairalastair{ "basename": "ast-data1-4f93542", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/fixed_form/data1.f", "infile_hash": "1a4213099115ddfd47a4963a5aab51f70510f79ee1fa80eafa71d2ae", "outfile": null, "outfile_hash": null, "stdout": "ast-data1-4f93542.stdout", "stdout_hash": "5f8adfc0472681b6fd6fcad8969c7963f1a2e86b7a9974c9ae35c65b", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-array_size_03-2036e61.json0000664000175000017500000000074315227365530023764 0ustar alastairalastair{ "basename": "asr-array_size_03-2036e61", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/array_size_03.f90", "infile_hash": "c8aac4225eeacbe1b0711e3af2f53ef4624804ff72cf20a07779f4bc", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-array_size_03-2036e61.stderr", "stderr_hash": "fc87c40d48513d8d37fa98067ac320488d5263a4a66ff6c16723f484", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-string_19-d880475.stdout0000664000175000017500000025725215227365530023530 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { stdlib_strings_use: (Program (SymbolTable 14 { char: (ExternalSymbol 14 char 2 char string_19_stdlib_string_type [] char Public ), char_string: (ExternalSymbol 14 char_string 2 char_string string_19_stdlib_string_type [] char_string Public ), compute_lps: (ExternalSymbol 14 compute_lps 6 compute_lps string_19_stdlib_strings [] compute_lps Public ), compute_lps_use: (ExternalSymbol 14 compute_lps_use 6 compute_lps_use string_19_stdlib_strings [] compute_lps_use Public ), compute_lps_use1: (ExternalSymbol 14 compute_lps_use1 6 compute_lps_use1 string_19_stdlib_strings [] compute_lps_use1 Public ), len: (ExternalSymbol 14 len 2 len string_19_stdlib_string_type [] len Public ), len_string: (ExternalSymbol 14 len_string 2 len_string string_19_stdlib_string_type [] len_string Public ), padl: (ExternalSymbol 14 padl 6 padl string_19_stdlib_strings [] padl Public ), padl_char_default: (ExternalSymbol 14 padl_char_default 6 padl_char_default string_19_stdlib_strings [] padl_char_default Public ), padl_char_pad_with: (ExternalSymbol 14 padl_char_pad_with 6 padl_char_pad_with string_19_stdlib_strings [] padl_char_pad_with Public ), padl_string_default: (ExternalSymbol 14 padl_string_default 6 padl_string_default string_19_stdlib_strings [] padl_string_default Public ), padl_string_pad_with: (ExternalSymbol 14 padl_string_pad_with 6 padl_string_pad_with string_19_stdlib_strings [] padl_string_pad_with Public ), string_type: (ExternalSymbol 14 string_type 2 string_type string_19_stdlib_string_type [] string_type Public ) }) stdlib_strings_use [string_19_stdlib_strings string_19_stdlib_string_type] [] ), string_19_stdlib_string_type: (Module (SymbolTable 2 { char: (GenericProcedure 2 char [2 char_string] Public ), char_string: (Function (SymbolTable 5 { character_string: (Variable 5 character_string [len_string string] ReturnVar () () Default (String 1 (FunctionCall 2 len_string 2 len [((Var 5 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 5 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) char_string (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (String 1 (FunctionCall 2 len_string 2 len [((FunctionParam 0 (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () ))] (Integer 4) () () ) ExpressionLength DescriptorString) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [len_string] [(Var 5 string)] [] (Var 5 character_string) Public .true. .true. () ), len: (GenericProcedure 2 len [2 len_string] Public ), len_string: (Function (SymbolTable 4 { length: (Variable 4 length [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 4 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 2 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) len_string (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Integer 4) Source Implementation () .true. .false. .false. .false. .false. [] .false. ) [] [(Var 4 string)] [] (Var 4 length) Public .true. .true. () ), string_type: (Struct (SymbolTable 3 { raw: (Variable 3 raw [] Local () () Default (Allocatable (String 1 () DeferredLength DescriptorString) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) string_type (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) [] [raw] [] Source Public .false. .false. .true. [] () () [] ) }) string_19_stdlib_string_type () [] .false. .false. .false. ), string_19_stdlib_strings: (Module (SymbolTable 6 { char: (ExternalSymbol 6 char 2 char string_19_stdlib_string_type [] char Public ), char_string: (ExternalSymbol 6 char_string 2 char_string string_19_stdlib_string_type [] char_string Public ), compute_lps: (Function (SymbolTable 7 { lps_array: (Variable 7 lps_array [string] ReturnVar () () Default (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 7 string) (Integer 4) () ))] PointerArray ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 7 string [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compute_lps (FunctionType [(String 1 () AssumedLength DescriptorString)] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ))] PointerArray ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 7 string)] [] (Var 7 lps_array) Public .true. .true. () ), compute_lps_use: (Function (SymbolTable 8 { l: (Variable 8 l [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 8 string [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compute_lps_use (FunctionType [(String 1 () AssumedLength DescriptorString)] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [compute_lps] [(Var 8 string)] [(Print (StringFormat () [(FunctionCall 6 compute_lps () [((Var 8 string))] (Array (Integer 4) [((IntegerConstant 1 (Integer 4) Decimal) (StringLen (Var 8 string) (Integer 4) () ))] PointerArray ) () () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] (Var 8 l) Public .false. .false. () ), compute_lps_use1: (Function (SymbolTable 9 { char@char_string: (ExternalSymbol 9 char@char_string 2 char_string string_19_stdlib_string_type [] char_string Private ), l: (Variable 9 l [] ReturnVar () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), len_string: (ExternalSymbol 9 len_string 2 len_string string_19_stdlib_string_type [] len_string Private ), string: (Variable 9 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) compute_lps_use1 (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. )] (Integer 4) Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 9 string)] [(Print (FunctionCall 9 char@char_string 6 char [((Var 9 string))] (String 1 (FunctionCall 9 len_string 6 len [((Var 9 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () () ) )] (Var 9 l) Public .false. .false. () ), len: (ExternalSymbol 6 len 2 len string_19_stdlib_string_type [] len Public ), len_string: (ExternalSymbol 6 len_string 2 len_string string_19_stdlib_string_type [] len_string Public ), padl: (GenericProcedure 6 padl [6 padl_char_default 6 padl_char_pad_with] Public ), padl_char_default: (Function (SymbolTable 12 { output_length: (Variable 12 output_length [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 12 res [string] ReturnVar () () Default (String 1 (StringLen (Var 12 string) (Integer 4) () ) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 12 string [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) padl_char_default (FunctionType [(String 1 () AssumedLength DescriptorString) (Integer 4)] (String 1 (StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ) ExpressionLength DescriptorString) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [padl_char_pad_with] [(Var 12 string) (Var 12 output_length)] [(Assignment (Var 12 res) (FunctionCall 6 padl_char_pad_with 6 padl [((Var 12 string)) ((Var 12 output_length)) ((StringConstant " " (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ))] (String 1 (IntrinsicElementalFunction Max [(StringLen (Var 12 string) (Integer 4) () ) (Var 12 output_length)] 0 (Integer 4) () ) ExpressionLength DescriptorString) () () ) () .false. .false. )] (Var 12 res) Public .true. .true. () ), padl_char_pad_with: (Function (SymbolTable 13 { output_length: (Variable 13 output_length [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pad_with: (Variable 13 pad_with [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 13 res [string output_length] ReturnVar () () Default (String 1 (IntrinsicElementalFunction Max [(StringLen (Var 13 string) (Integer 4) () ) (Var 13 output_length)] 0 (Integer 4) () ) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 13 string [] In () () Default (String 1 () AssumedLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string_length: (Variable 13 string_length [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) padl_char_pad_with (FunctionType [(String 1 () AssumedLength DescriptorString) (Integer 4) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] (String 1 (IntrinsicElementalFunction Max [(StringLen (FunctionParam 0 (String 1 () AssumedLength DescriptorString) () ) (Integer 4) () ) (FunctionParam 1 (Integer 4) () )] 0 (Integer 4) () ) ExpressionLength DescriptorString) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [] [(Var 13 string) (Var 13 output_length) (Var 13 pad_with)] [] (Var 13 res) Public .true. .true. () ), padl_string_default: (Function (SymbolTable 10 { char@char_string: (ExternalSymbol 10 char@char_string 2 char_string string_19_stdlib_string_type [] char_string Private ), len_string: (ExternalSymbol 10 len_string 2 len_string string_19_stdlib_string_type [] len_string Private ), output_length: (Variable 10 output_length [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 10 res [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 10 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) padl_string_default (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Integer 4)] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [padl_char_pad_with] [(Var 10 string) (Var 10 output_length)] [(Assignment (Var 10 res) (StructConstructor 6 string_type [((FunctionCall 6 padl_char_pad_with 6 padl [((FunctionCall 10 char@char_string 6 char [((Var 10 string))] (String 1 (FunctionCall 10 len_string 6 len [((Var 10 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () () )) ((Var 10 output_length)) ((StringConstant " " (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ))] (String 1 (IntrinsicElementalFunction Max [(StringLen (FunctionCall 10 char@char_string 6 char [((Var 10 string))] (String 1 (FunctionCall 10 len_string 6 len [((Var 10 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () () ) (Integer 4) () ) (Var 10 output_length)] 0 (Integer 4) () ) ExpressionLength DescriptorString) () () ))] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () ) () .false. .false. )] (Var 10 res) Public .true. .true. () ), padl_string_pad_with: (Function (SymbolTable 11 { char@char_string: (ExternalSymbol 11 char@char_string 2 char_string string_19_stdlib_string_type [] char_string Private ), len_string: (ExternalSymbol 11 len_string 2 len_string string_19_stdlib_string_type [] len_string Private ), output_length: (Variable 11 output_length [] In () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), pad_with: (Variable 11 pad_with [] In () () Default (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), res: (Variable 11 res [] ReturnVar () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), string: (Variable 11 string [] In () () Default (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) 6 string_type Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) padl_string_pad_with (FunctionType [(StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) (Integer 4) (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) Source Implementation () .false. .true. .false. .false. .false. [] .false. ) [padl_char_pad_with] [(Var 11 string) (Var 11 output_length) (Var 11 pad_with)] [(Assignment (Var 11 res) (StructConstructor 6 string_type [((FunctionCall 6 padl_char_pad_with 6 padl [((FunctionCall 11 char@char_string 6 char [((Var 11 string))] (String 1 (FunctionCall 11 len_string 6 len [((Var 11 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () () )) ((Var 11 output_length)) ((Var 11 pad_with))] (String 1 (IntrinsicElementalFunction Max [(StringLen (FunctionCall 11 char@char_string 6 char [((Var 11 string))] (String 1 (FunctionCall 11 len_string 6 len [((Var 11 string))] (Integer 4) () () ) ExpressionLength DescriptorString) () () ) (Integer 4) () ) (Var 11 output_length)] 0 (Integer 4) () ) ExpressionLength DescriptorString) () () ))] (StructType [(Allocatable (String 1 () DeferredLength DescriptorString) )] [] .true. .false. ) () ) () .false. .false. )] (Var 11 res) Public .true. .true. () ), string_type: (ExternalSymbol 6 string_type 2 string_type string_19_stdlib_string_type [] string_type Public ) }) string_19_stdlib_strings () [string_19_stdlib_string_type string_19_stdlib_strings] .false. .false. .false. ) }) [] ) lfortran-0.64.0/tests/reference/asr-modules_32-ca5fb91.json0000664000175000017500000000075015227365530023510 0ustar alastairalastair{ "basename": "asr-modules_32-ca5fb91", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/modules_32.f90", "infile_hash": "221fc91ff53022d8a5c646c4a5ffa56eca2b1cbdf7a1f1474bbd3d18", "outfile": null, "outfile_hash": null, "stdout": "asr-modules_32-ca5fb91.stdout", "stdout_hash": "b202a7cfa841f7327520ba3cd174a12ba798d276122e4119703d0137", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-coarrays_01-2b1221b.json0000664000175000017500000000072615227365530023505 0ustar alastairalastair{ "basename": "ast-coarrays_01-2b1221b", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/coarrays_01.f90", "infile_hash": "933ef6b85aed33b834bb7b03ae1f635e2b6e4fd18eb8ec999593251f", "outfile": null, "outfile_hash": null, "stdout": "ast-coarrays_01-2b1221b.stdout", "stdout_hash": "b2b13730276747e55d35e91410f84c6cf5852e03a309ab14642bf85f", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/julia-subroutines_03-dde7b37.stdout0000664000175000017500000000160315227365530025313 0ustar alastairalastairfunction f(a::Int32, b::Base.RefValue{Int32}, c::Int32, d::Int32) b[] = a + 1 + c + d end function main() local i::Int32 local j::Int32 local k::Int32 local l::Int32 i = 1 j = 1 k = 1 l = 1 __j_ref__= Ref(j) f(i, __j_ref__, k, l) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(i, __j_ref__, k, l) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(i, __j_ref__, k, l) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end __j_ref__= Ref(j) f(i, __j_ref__, k, l) j = __j_ref__[] println(j) if j ≠ 4 println(Base.stderr, "ERROR STOP") exit(1) end end main() lfortran-0.64.0/tests/reference/pass_class_constructor-multiple_objects_args-2d1007e.stdout0000664000175000017500000004044315227365530032333 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { main: (Program (SymbolTable 2 { 1_circle_radius: (ExternalSymbol 2 1_circle_radius 3 radius circle [] radius Public ), circle: (Struct (SymbolTable 3 { radius: (Variable 3 radius [] Local (RealConstant 1.000000 (Real 4) ) (RealConstant 1.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) circle (StructType [(Real 4)] [] .true. .false. ) [] [radius] [] Source Public .false. .false. .false. [] () () [] ), print_radius: (Function (SymbolTable 4 { 1_circle_radius: (ExternalSymbol 4 1_circle_radius 3 radius circle [] radius Public ), m: (Variable 4 m [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 2 circle Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), n: (Variable 4 n [] In () () Default (StructType [(Real 4)] [] .true. .false. ) 2 circle Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) print_radius (FunctionType [(StructType [(Real 4)] [] .true. .false. ) (StructType [(Real 4)] [] .true. .false. )] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 m) (Var 4 n)] [(Print (StringFormat () [(StructInstanceMember (Var 4 m) 4 1_circle_radius (Real 4) () ) (StructInstanceMember (Var 4 n) 4 1_circle_radius (Real 4) () )] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 was_called) (LogicalConstant .true. (Logical 4) ) () .false. .false. )] () Public .false. .false. () ), temp_struct_var__: (Variable 2 temp_struct_var__ [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 2 circle Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), temp_struct_var__1: (Variable 2 temp_struct_var__1 [] Local () () Default (StructType [(Real 4)] [] .true. .false. ) 2 circle Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), was_called: (Variable 2 was_called [] Local (LogicalConstant .false. (Logical 4) ) (LogicalConstant .false. (Logical 4) ) Save (Logical 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) main [] [(Assignment (StructInstanceMember (Var 2 temp_struct_var__) 2 1_circle_radius (Real 4) () ) (RealConstant 1.500000 (Real 4) ) () .false. .false. ) (Assignment (StructInstanceMember (Var 2 temp_struct_var__1) 2 1_circle_radius (Real 4) () ) (RealConstant 1.000000 (Real 4) ) () .false. .false. ) (SubroutineCall 2 print_radius () [((Var 2 temp_struct_var__)) ((Var 2 temp_struct_var__1))] () .false. ) (If () (LogicalNot (Var 2 was_called) (Logical 4) () ) [(ErrorStop () )] [] )] ) }) [] ) lfortran-0.64.0/tests/reference/ast-dimension_attr-12e0f2a.json0000664000175000017500000000075215227365530024465 0ustar alastairalastair{ "basename": "ast-dimension_attr-12e0f2a", "cmd": "lfortran --fixed-form --show-ast --no-color {infile} -o {outfile}", "infile": "tests/dimension_attr.f", "infile_hash": "94df0a120cc268f419253b89bd601cc62c0c40b1ff86e8eb05849b4b", "outfile": null, "outfile_hash": null, "stdout": "ast-dimension_attr-12e0f2a.stdout", "stdout_hash": "50d574deca5876e963df776cd6c716b9a6a7283d8ab2d9528e4004ec", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-program_cmake_01-4e6752a.stdout0000664000175000017500000000033415227365530025057 0ustar alastairalastair(TranslationUnit [(Program TESTFortran () [] [] [] [(Print 0 () [(String "Hello" ())] () )] [] )] ) lfortran-0.64.0/tests/reference/llvm-bits_02-925bde2.json0000664000175000017500000000074215227365530023106 0ustar alastairalastair{ "basename": "llvm-bits_02-925bde2", "cmd": "lfortran --no-color --show-llvm {infile} -o {outfile}", "infile": "tests/../integration_tests/bits_02.f90", "infile_hash": "326043189040d63a64dac0f62cb9504336196a58ad139ffe70eeb884", "outfile": null, "outfile_hash": null, "stdout": "llvm-bits_02-925bde2.stdout", "stdout_hash": "0493419a432257b0ee42df53b0d406a7960b36f2306a5e49db58e867", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/pass_dead_code_removal-case_06-e7f007f.stdout0000664000175000017500000004536115227365530027135 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { cond_03: (Program (SymbolTable 2 { a: (Variable 2 a [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), ap: (Variable 2 ap [] Local (IntegerConstant 1 (Integer 4) Decimal) (IntegerConstant 1 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), b: (Variable 2 b [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Save (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), bp: (Variable 2 bp [] Local (IntegerConstant 2 (Integer 4) Decimal) (IntegerConstant 2 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), c: (Variable 2 c [] Local (RealConstant 1.000000 (Real 4) ) (RealConstant 1.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), cp: (Variable 2 cp [] Local (RealConstant 1.000000 (Real 4) ) (RealConstant 1.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), d: (Variable 2 d [] Local (RealConstant 2.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) Save (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), dp: (Variable 2 dp [] Local (RealConstant 2.000000 (Real 4) ) (RealConstant 2.000000 (Real 4) ) Parameter (Real 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), grade_fixed: (Variable 2 grade_fixed [] Local (StringConstant "B" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (StringConstant "B" (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) ) Parameter (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), marks: (Variable 2 marks [] Local () () Default (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), marks_fixed: (Variable 2 marks_fixed [] Local (IntegerConstant 94 (Integer 4) Decimal) (IntegerConstant 94 (Integer 4) Decimal) Parameter (Integer 4) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) cond_03 [] [(If () (IntegerCompare (Var 2 a) Eq (Var 2 b) (Logical 4) () ) [(Print (StringConstant "a == b" (String 1 (IntegerConstant 6 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "ap /= bp" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] [(Print (StringConstant "ap == cp" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringConstant "cp /= dp" (String 1 (IntegerConstant 8 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) (Print (StringFormat () [(StringConstant "Your grade is " (String 1 (IntegerConstant 14 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 grade_fixed)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Assignment (Var 2 marks) (IntegerConstant 94 (Integer 4) Decimal) () .false. .false. ) (Select () (Var 2 marks) [(CaseStmt_Range (IntegerBinOp (IntegerConstant 40 (Integer 4) Decimal) Add (Var 2 bp) (Integer 4) (IntegerConstant 42 (Integer 4) Decimal) ) () [(Print (StringConstant "Pass!" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] ) (CaseStmt_Range () (IntegerBinOp (IntegerConstant 39 (Integer 4) Decimal) Sub (Var 2 ap) (Integer 4) (IntegerConstant 38 (Integer 4) Decimal) ) [(Print (StringConstant "Failed!" (String 1 (IntegerConstant 7 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] )] [(Print (StringConstant "Invalid marks" (String 1 (IntegerConstant 13 (Integer 4) Decimal) ExpressionLength DescriptorString) ) )] .false. ) (Print (StringFormat () [(StringConstant "Your marks are " (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 marks)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) ) (Print (StringConstant "Pass!" (String 1 (IntegerConstant 5 (Integer 4) Decimal) ExpressionLength DescriptorString) ) ) (Print (StringFormat () [(StringConstant "Your marks are " (String 1 (IntegerConstant 15 (Integer 4) Decimal) ExpressionLength DescriptorString) ) (Var 2 marks)] FormatFortran (Allocatable (String 1 () DeferredLength DescriptorString) ) () ) )] ) }) [] ) lfortran-0.64.0/tests/reference/pass_global_stmts-expr4-eea496b.json0000664000175000017500000000076415227365530025543 0ustar alastairalastair{ "basename": "pass_global_stmts-expr4-eea496b", "cmd": "lfortran --pass=global_stmts --show-asr --no-color {infile} -o {outfile}", "infile": "tests/expr4.f90", "infile_hash": "104847f7b62623d6e9d6d752ab2c6c58a31b70bc70a9cae0b5809241", "outfile": null, "outfile_hash": null, "stdout": "pass_global_stmts-expr4-eea496b.stdout", "stdout_hash": "1c22346dc4610a12f44a8fcb558d3347d6c2b4e7c7ab7040998ccb78", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast-modules_01-da63075.stdout0000664000175000017500000000262015227365530023714 0ustar alastairalastair(TranslationUnit [(Module modules_01_a (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [] [(Subroutine b [] [] () (TriviaNode [] [(EndOfLine) (EndOfLine)] ) [] [] [] [] [(Print 0 () [(String "b()" ())] () )] [] [] )] ) (Program modules_01 () [(Use [] modules_01_a [(UseSymbol b () )] .true. () )] [(ImplicitNone [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] [(SubroutineCall 0 b [] [] [] [] (TriviaNode [] [(EndOfLine) (EndOfLine)] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-array_constructor_with_different_types-bffc811.stderr0000664000175000017500000000027715227365530032162 0ustar alastairalastairsemantic error: Element in `integer(4)` array constructor is `real(4)` --> tests/errors/array_constructor_with_different_types.f90:2:18 | 2 | print *, [1, 2.] | ^^ lfortran-0.64.0/tests/reference/ast-types_09-e7605c9.json0000664000175000017500000000074215227365530023063 0ustar alastairalastair{ "basename": "ast-types_09-e7605c9", "cmd": "lfortran --show-ast --no-color {infile} -o {outfile}", "infile": "tests/../integration_tests/types_09.f90", "infile_hash": "57d771f754443897c504c6507554917133b64bfc0c8c352317f63b2f", "outfile": null, "outfile_hash": null, "stdout": "ast-types_09-e7605c9.stdout", "stdout_hash": "a16eb108929c270be04a6362936aab1e8cca962e95fcea40035ba618", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_call_02-acc6d43.json0000664000175000017500000000100115227365530024625 0ustar alastairalastair{ "basename": "asr-implicit_call_02-acc6d43", "cmd": "lfortran --show-asr --implicit-interface --no-color {infile} -o {outfile}", "infile": "tests/errors/implicit_call_02.f90", "infile_hash": "24e50b64e17b6d3a7a46f02ffb24d18897a171a4e81a77686a72a5d4", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-implicit_call_02-acc6d43.stderr", "stderr_hash": "87fac225c2b103ecdb9cbd2fc4001bcdedd8065e39e4fbf48073b9c2", "returncode": 2 }lfortran-0.64.0/tests/reference/asr-derived_type_03-a9e3c15.json0000664000175000017500000000075115227365530024442 0ustar alastairalastair{ "basename": "asr-derived_type_03-a9e3c15", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/errors/derived_type_03.f90", "infile_hash": "f6dd480af400f08cea170112f8ab92301acab80856807fb65b5cf387", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "asr-derived_type_03-a9e3c15.stderr", "stderr_hash": "909ba5fc73d1e33bd4e352e590aff0bb2c6fcc0deb2d33eff3fbe2f0", "returncode": 2 }lfortran-0.64.0/tests/reference/run-array_shape_06-53f4e72.json0000664000175000017500000000071615227365530024225 0ustar alastairalastair{ "basename": "run-array_shape_06-53f4e72", "cmd": "lfortran --no-color {infile}", "infile": "tests/errors/array_shape_06.f90", "infile_hash": "d4490ff091dac24964ae48c22563cdc2a4f76a0de8b1e175b9ade57a", "outfile": null, "outfile_hash": null, "stdout": null, "stdout_hash": null, "stderr": "run-array_shape_06-53f4e72.stderr", "stderr_hash": "baf3202926a50bbbe272c4e0982b225f26b7405d17c04f7cd76c2e1b", "returncode": 1 }lfortran-0.64.0/tests/reference/llvm-class_02-82c2f9c.stderr0000664000175000017500000000035015227365530023603 0ustar alastairalastairwarning: Change of value in conversion from 'real(8)' to 'real(4)' --> tests/../integration_tests/class_02.f90:5:16 | 5 | real :: pi = 3.1415926535897931d0 ! Class-wide private constant | ^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/asr-implicit_interface_allocatable_array-38d4afe.stdout0000664000175000017500000003444015227365530031467 0ustar alastairalastair(TranslationUnit (SymbolTable 1 { implicit_interface_allocatable_array: (Function (SymbolTable 2 { r_g: (Variable 2 r_g [] Local () () Default (Allocatable (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), r_t: (Variable 2 r_t [] Local () () Default (Pointer (Array (Real 4) [(() ())] DescriptorArray ) ) () Source Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sub1: (Function (SymbolTable 3 { sub1_arg_0: (Variable 3 sub1_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sub1_arg_1: (Variable 3 sub1_arg_1 [] Unspecified () () Default (Array (Real 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub1 (FunctionType [(Integer 4) (Array (Real 4) [(() ())] PointerArray )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 3 sub1_arg_0) (Var 3 sub1_arg_1)] [] () Public .false. .false. () ), sub2: (Function (SymbolTable 4 { sub2_arg_0: (Variable 4 sub2_arg_0 [] Unspecified () () Default (Integer 4) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ), sub2_arg_1: (Variable 4 sub2_arg_1 [] Unspecified () () Default (Array (Real 4) [(() ())] PointerArray ) () BindC Public Required .false. .false. .false. () .false. .false. NotMethod () [] ) }) sub2 (FunctionType [(Integer 4) (Array (Real 4) [(() ())] PointerArray )] () BindC Interface () .false. .false. .false. .false. .false. [] .false. ) [] [(Var 4 sub2_arg_0) (Var 4 sub2_arg_1)] [] () Public .false. .false. () ) }) implicit_interface_allocatable_array (FunctionType [] () Source Implementation () .false. .false. .false. .false. .false. [] .false. ) [] [] [(SubroutineCall 2 sub1 () [((IntegerConstant 1 (Integer 4) Decimal)) ((ArrayPhysicalCast (Var 2 r_g) DescriptorArray PointerArray (Array (Real 4) [(() ())] PointerArray ) () ))] () .false. ) (SubroutineCall 2 sub2 () [((IntegerConstant 1 (Integer 4) Decimal)) ((ArrayPhysicalCast (Var 2 r_t) DescriptorArray PointerArray (Pointer (Array (Real 4) [(() ())] PointerArray ) ) () ))] () .false. )] () Public .false. .false. () ) }) [] ) lfortran-0.64.0/tests/reference/asr-global_scope7-70d8b93.json0000664000175000017500000000073415227365530024124 0ustar alastairalastair{ "basename": "asr-global_scope7-70d8b93", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/global_scope7.f90", "infile_hash": "b3d005db52f7a57b335928fc6d884d6fdee0654c64fc98c2e797e242", "outfile": null, "outfile_hash": null, "stdout": "asr-global_scope7-70d8b93.stdout", "stdout_hash": "033194557b07b0c777582d98bd0bb18f5623565c09554252b2c4f079", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-implicit_typing1-45de3a2.stderr0000664000175000017500000000017615227365530025272 0ustar alastairalastairsemantic error: Variable 'x' is not declared --> tests/errors/implicit_typing1.f90:3:1 | 3 | x = 1 | ^ 'x' is undeclared lfortran-0.64.0/tests/reference/ast_f90-common3-fab0cfa.json0000664000175000017500000000072515227365530023721 0ustar alastairalastair{ "basename": "ast_f90-common3-fab0cfa", "cmd": "lfortran --show-ast-f90 --no-indent --no-color {infile}", "infile": "tests/common3.f90", "infile_hash": "113991d796f59c8f9cb2babe7720663be887616a5ce127bf58767997", "outfile": null, "outfile_hash": null, "stdout": "ast_f90-common3-fab0cfa.stdout", "stdout_hash": "267b484b68f32da42b53258c88c7f3edffc8a133474555d8ba7245d8", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/asr-end_sub_name-b8abc97.stderr0000664000175000017500000000036515227365530024514 0ustar alastairalastairsyntax error: End subroutine name does not match subroutine name --> tests/errors/end_sub_name.f90:1:1 - 7:22 | 1 | subroutine swap(x, y) | ^^^^^^^^^^^^^^^^^^^^^... ... | 7 | end subroutine reverse | ...^^^^^^^^^^^^^^^^^^^^^^ lfortran-0.64.0/tests/reference/llvm-global_scope4-10fa534.stdout0000664000175000017500000000127515227365530024643 0ustar alastairalastair; ModuleID = 'LFortran' source_filename = "LFortran" target datalayout = "..." @x = global i32 0 define i32 @__lfortran_evaluate_1() { .entry: %__lfortran_evaluate_11 = alloca i32, align 4 store i32 6, i32* @x, align 4 %0 = load i32, i32* @x, align 4 %1 = add i32 %0, 1 store i32 %1, i32* @x, align 4 %2 = load i32, i32* @x, align 4 %3 = mul i32 3, %2 store i32 %3, i32* %__lfortran_evaluate_11, align 4 br label %return return: ; preds = %.entry br label %FINALIZE_SYMTABLE___lfortran_evaluate_1 FINALIZE_SYMTABLE___lfortran_evaluate_1: ; preds = %return %4 = load i32, i32* %__lfortran_evaluate_11, align 4 ret i32 %4 } lfortran-0.64.0/tests/reference/ast-assign-262a444.stdout0000664000175000017500000000243015227365530023144 0ustar alastairalastair(TranslationUnit [(Program assign () [] [] [(Declaration (AttrType TypeInteger [] () () None ) [] [(x [] [] () () None ())] () ) (Declaration (AttrType TypeReal [] () () None ) [] [(y [] [] () () None ())] () )] [(Format 10 "'(i3)'" () ) (Assign 0 10 x () ) (Assign 20 10 x () ) (Assign 0 10 x () ) (Assign 30 10 y (TriviaNode [] [(EOLComment "! An integer variable is required in this context." )] ) )] [] )] ) lfortran-0.64.0/tests/reference/asr-char_arr_assignment-1f9a875.json0000664000175000017500000000075615227365530025425 0ustar alastairalastair{ "basename": "asr-char_arr_assignment-1f9a875", "cmd": "lfortran --show-asr --no-color {infile} -o {outfile}", "infile": "tests/char_arr_assignment.f90", "infile_hash": "637e9e1637e9afbc3bcbf797c587b2b064dcf67eb215ce9f22fe5ade", "outfile": null, "outfile_hash": null, "stdout": "asr-char_arr_assignment-1f9a875.stdout", "stdout_hash": "7e1f75d97be3ac5edf2bc08dbe58c8f6c2a0791b47184f2ed29bf3ed", "stderr": null, "stderr_hash": null, "returncode": 0 }lfortran-0.64.0/tests/reference/ast_f90-doloop_19-c625895.stdout0000664000175000017500000000151115227365530024161 0ustar alastairalastairprogram doloop_19 integer :: i, s ! (a) plain DO loop: no label on `do`, no label on `end do`. s = 0 do i = 1, 5 s = s + i end do if (s /= 15) then error stop end if ! (b) Label only on `end do`. `go to 1` branches to the loop ! terminator, which cycles the iteration (F2018 11.1.7.5). s = 0 do i = 1, 5 if (i == 3) then go to 1 end if s = s + i 1 end do if (s /= 12) then error stop end if ! (c) Labels on both `do` and `end do` (modern labelled DO). s = 0 do i = 1, 5 if (i == 3) then go to 2 end if s = s + i 2 end do if (s /= 12) then error stop end if ! (d) Legacy `DO