From 18b2f70ff80f8e795de463abaf61758cba4ca368 Mon Sep 17 00:00:00 2001 From: Prince Roshan Date: Sun, 8 Oct 2023 12:29:32 +0530 Subject: [PATCH] Fix test references --- .../asr-array_01_decl-39cf894.stdout | 1043 ----- .../asr-array_02_decl-e8f6874.stdout | 833 ---- tests/reference/asr-bindc_02-bc1a7ea.stdout | 437 -- tests/reference/asr-cast-435c233.stdout | 312 -- tests/reference/asr-complex1-f26c460.stdout | 794 ---- tests/reference/asr-constants1-5828e8a.stdout | 1793 -------- .../reference/asr-elemental_01-b58df26.stdout | 3649 ----------------- tests/reference/asr-expr10-efcbb1b.stdout | 453 -- tests/reference/asr-expr13-81bdb5a.stdout | 473 --- tests/reference/asr-expr7-480ba2f.stdout | 371 -- tests/reference/asr-expr8-6beda60.stdout | 430 -- tests/reference/asr-expr_05-3a37324.stdout | 1642 -------- .../asr-generics_array_01-682b1b2.stdout | 459 --- .../asr-generics_array_02-22c8dc1.stdout | 1395 ------- .../asr-generics_array_03-fb3706c.stdout | 1880 --------- tests/reference/asr-structs_05-fa98307.stdout | 1476 ------- .../asr-test_bool_binop-f856ef0.stdout | 442 -- .../asr-test_builtin_bin-52ba9fa.stdout | 271 -- .../asr-test_builtin_bool-330223a.stdout | 896 ---- .../asr-test_builtin_hex-64bd268.stdout | 246 -- .../asr-test_builtin_oct-20b9066.stdout | 282 -- .../asr-test_builtin_pow-f02fcda.stdout | 1955 --------- .../asr-test_builtin_round-7417a21.stdout | 919 ----- .../asr-test_complex_01-a6def58.stdout | 2049 --------- .../asr-test_complex_02-782ba2d.stdout | 754 ---- .../reference/asr-test_max_min-3c2fc51.stdout | 826 ---- .../asr-test_numpy_03-e600a49.stdout | 1962 --------- .../asr-test_numpy_04-ecbb614.stdout | 519 --- tests/reference/asr-test_pow-3f5d550.stdout | 159 - tests/reference/asr-vec_01-66ac423.stdout | 295 -- tests/reference/c-expr7-bb2692a.stdout | 362 -- tests/reference/cpp-expr15-1661c0d.stdout | 92 - tests/reference/cpp-expr7-529bd53.stdout | 83 - tests/reference/cpp-expr8-704cece.stdout | 37 - .../cpp-test_builtin_pow-56b3f92.stdout | 269 -- .../pass_loop_vectorise-vec_01-be9985e.stdout | 527 --- 36 files changed, 30385 deletions(-) delete mode 100644 tests/reference/asr-array_01_decl-39cf894.stdout delete mode 100644 tests/reference/asr-array_02_decl-e8f6874.stdout delete mode 100644 tests/reference/asr-bindc_02-bc1a7ea.stdout delete mode 100644 tests/reference/asr-cast-435c233.stdout delete mode 100644 tests/reference/asr-complex1-f26c460.stdout delete mode 100644 tests/reference/asr-constants1-5828e8a.stdout delete mode 100644 tests/reference/asr-elemental_01-b58df26.stdout delete mode 100644 tests/reference/asr-expr10-efcbb1b.stdout delete mode 100644 tests/reference/asr-expr13-81bdb5a.stdout delete mode 100644 tests/reference/asr-expr7-480ba2f.stdout delete mode 100644 tests/reference/asr-expr8-6beda60.stdout delete mode 100644 tests/reference/asr-expr_05-3a37324.stdout delete mode 100644 tests/reference/asr-generics_array_01-682b1b2.stdout delete mode 100644 tests/reference/asr-generics_array_02-22c8dc1.stdout delete mode 100644 tests/reference/asr-generics_array_03-fb3706c.stdout delete mode 100644 tests/reference/asr-structs_05-fa98307.stdout delete mode 100644 tests/reference/asr-test_bool_binop-f856ef0.stdout delete mode 100644 tests/reference/asr-test_builtin_bin-52ba9fa.stdout delete mode 100644 tests/reference/asr-test_builtin_bool-330223a.stdout delete mode 100644 tests/reference/asr-test_builtin_hex-64bd268.stdout delete mode 100644 tests/reference/asr-test_builtin_oct-20b9066.stdout delete mode 100644 tests/reference/asr-test_builtin_pow-f02fcda.stdout delete mode 100644 tests/reference/asr-test_builtin_round-7417a21.stdout delete mode 100644 tests/reference/asr-test_complex_01-a6def58.stdout delete mode 100644 tests/reference/asr-test_complex_02-782ba2d.stdout delete mode 100644 tests/reference/asr-test_max_min-3c2fc51.stdout delete mode 100644 tests/reference/asr-test_numpy_03-e600a49.stdout delete mode 100644 tests/reference/asr-test_numpy_04-ecbb614.stdout delete mode 100644 tests/reference/asr-test_pow-3f5d550.stdout delete mode 100644 tests/reference/asr-vec_01-66ac423.stdout delete mode 100644 tests/reference/c-expr7-bb2692a.stdout delete mode 100644 tests/reference/cpp-expr15-1661c0d.stdout delete mode 100644 tests/reference/cpp-expr7-529bd53.stdout delete mode 100644 tests/reference/cpp-expr8-704cece.stdout delete mode 100644 tests/reference/cpp-test_builtin_pow-56b3f92.stdout delete mode 100644 tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout diff --git a/tests/reference/asr-array_01_decl-39cf894.stdout b/tests/reference/asr-array_01_decl-39cf894.stdout deleted file mode 100644 index 7afd122ab5..0000000000 --- a/tests/reference/asr-array_01_decl-39cf894.stdout +++ /dev/null @@ -1,1043 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - ArraySizes: - (EnumType - (SymbolTable - 201 - { - SIZE_10: - (Variable - 201 - SIZE_10 - [] - Local - (IntegerConstant 10 (Integer 4)) - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - SIZE_3: - (Variable - 201 - SIZE_3 - [] - Local - (IntegerConstant 3 (Integer 4)) - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - ArraySizes - [] - [SIZE_3 - SIZE_10] - Source - Public - IntegerUnique - (Integer 4) - () - ), - __main__global_stmts: - (Function - (SymbolTable - 208 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [declare_arrays] - [] - [(SubroutineCall - 2 declare_arrays - () - [] - () - )] - () - Public - .false. - .false. - () - ), - accept_f32_array: - (Function - (SymbolTable - 205 - { - _lpython_return_variable: - (Variable - 205 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - xf32: - (Variable - 205 - xf32 - [] - InOut - () - () - Default - (Array - (Real 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_f32_array - (FunctionType - [(Array - (Real 4) - [(() - ())] - DescriptorArray - )] - (Real 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 205 xf32)] - [(= - (ArrayItem - (Var 205 xf32) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (RealConstant - 32.000000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 32.000000 - (Real 4) - ) - ) - () - ) - (= - (Var 205 _lpython_return_variable) - (ArrayItem - (Var 205 xf32) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - () - ) - (Return)] - (Var 205 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_f64_array: - (Function - (SymbolTable - 206 - { - _lpython_return_variable: - (Variable - 206 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - xf64: - (Variable - 206 - xf64 - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_f64_array - (FunctionType - [(Array - (Real 8) - [(() - ())] - DescriptorArray - )] - (Real 8) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 206 xf64)] - [(= - (ArrayItem - (Var 206 xf64) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - (RealConstant - 64.000000 - (Real 8) - ) - () - ) - (= - (Var 206 _lpython_return_variable) - (ArrayItem - (Var 206 xf64) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - () - ) - (Return)] - (Var 206 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_i16_array: - (Function - (SymbolTable - 202 - { - _lpython_return_variable: - (Variable - 202 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 2) - () - Source - Public - Required - .false. - ), - xi16: - (Variable - 202 - xi16 - [] - InOut - () - () - Default - (Array - (Integer 2) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_i16_array - (FunctionType - [(Array - (Integer 2) - [(() - ())] - DescriptorArray - )] - (Integer 2) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 xi16)] - [(= - (ArrayItem - (Var 202 xi16) - [(() - (IntegerConstant 2 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - (Cast - (IntegerConstant 32 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 32 (Integer 2)) - ) - () - ) - (= - (Var 202 _lpython_return_variable) - (ArrayItem - (Var 202 xi16) - [(() - (IntegerConstant 2 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - () - ) - (Return)] - (Var 202 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_i32_array: - (Function - (SymbolTable - 203 - { - _lpython_return_variable: - (Variable - 203 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - xi32: - (Variable - 203 - xi32 - [] - InOut - () - () - Default - (Array - (Integer 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_i32_array - (FunctionType - [(Array - (Integer 4) - [(() - ())] - DescriptorArray - )] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 xi32)] - [(= - (ArrayItem - (Var 203 xi32) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 32 (Integer 4)) - () - ) - (= - (Var 203 _lpython_return_variable) - (ArrayItem - (Var 203 xi32) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - () - ) - (Return)] - (Var 203 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_i64_array: - (Function - (SymbolTable - 204 - { - _lpython_return_variable: - (Variable - 204 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - xi64: - (Variable - 204 - xi64 - [] - InOut - () - () - Default - (Array - (Integer 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_i64_array - (FunctionType - [(Array - (Integer 8) - [(() - ())] - DescriptorArray - )] - (Integer 8) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 204 xi64)] - [(= - (ArrayItem - (Var 204 xi64) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 8) - RowMajor - () - ) - (Cast - (IntegerConstant 64 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 64 (Integer 8)) - ) - () - ) - (= - (Var 204 _lpython_return_variable) - (ArrayItem - (Var 204 xi64) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 8) - RowMajor - () - ) - () - ) - (Return)] - (Var 204 _lpython_return_variable) - Public - .false. - .false. - () - ), - declare_arrays: - (Function - (SymbolTable - 207 - { - ac32: - (Variable - 207 - ac32 - [] - Local - () - () - Default - (Array - (Complex 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ac64: - (Variable - 207 - ac64 - [] - Local - () - () - Default - (Array - (Complex 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - af32: - (Variable - 207 - af32 - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - af64: - (Variable - 207 - af64 - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ai16: - (Variable - 207 - ai16 - [] - Local - () - () - Default - (Array - (Integer 2) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ai32: - (Variable - 207 - ai32 - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ai64: - (Variable - 207 - ai64 - [] - Local - () - () - Default - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - declare_arrays - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [accept_i16_array - accept_i32_array - accept_i64_array - accept_f32_array - accept_f64_array] - [] - [(= - (Var 207 ai16) - (ArrayConstant - [] - (Array - (Integer 2) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 ai32) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 ai64) - (ArrayConstant - [] - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 af32) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 af64) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 ac32) - (ArrayConstant - [] - (Array - (Complex 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 ac64) - (ArrayConstant - [] - (Array - (Complex 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (Print - () - [(FunctionCall - 2 accept_i16_array - () - [((ArrayPhysicalCast - (Var 207 ai16) - FixedSizeArray - DescriptorArray - (Array - (Integer 2) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Integer 2) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_i32_array - () - [((ArrayPhysicalCast - (Var 207 ai32) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Integer 4) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_i64_array - () - [((ArrayPhysicalCast - (Var 207 ai64) - FixedSizeArray - DescriptorArray - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Integer 8) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_f32_array - () - [((ArrayPhysicalCast - (Var 207 af32) - FixedSizeArray - DescriptorArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Real 4) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_f64_array - () - [((ArrayPhysicalCast - (Var 207 af64) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Real 8) - () - () - )] - () - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 209 - { - __main__global_stmts: - (ExternalSymbol - 209 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 209 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-array_02_decl-e8f6874.stdout b/tests/reference/asr-array_02_decl-e8f6874.stdout deleted file mode 100644 index d32364d9da..0000000000 --- a/tests/reference/asr-array_02_decl-e8f6874.stdout +++ /dev/null @@ -1,833 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 206 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [declare_arrays] - [] - [(SubroutineCall - 2 declare_arrays - () - [] - () - )] - () - Public - .false. - .false. - () - ), - accept_multidim_f32_array: - (Function - (SymbolTable - 203 - { - _lpython_return_variable: - (Variable - 203 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - xf32: - (Variable - 203 - xf32 - [] - InOut - () - () - Default - (Array - (Real 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_multidim_f32_array - (FunctionType - [(Array - (Real 4) - [(() - ())] - DescriptorArray - )] - (Real 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 xf32)] - [(= - (Var 203 _lpython_return_variable) - (ArrayItem - (Var 203 xf32) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - () - ) - (Return)] - (Var 203 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_multidim_f64_array: - (Function - (SymbolTable - 204 - { - _lpython_return_variable: - (Variable - 204 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - xf64: - (Variable - 204 - xf64 - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_multidim_f64_array - (FunctionType - [(Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - )] - (Real 8) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 204 xf64)] - [(= - (Var 204 _lpython_return_variable) - (ArrayItem - (Var 204 xf64) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 1 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - () - ) - (Return)] - (Var 204 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_multidim_i32_array: - (Function - (SymbolTable - 201 - { - _lpython_return_variable: - (Variable - 201 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - xi32: - (Variable - 201 - xi32 - [] - InOut - () - () - Default - (Array - (Integer 4) - [(() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_multidim_i32_array - (FunctionType - [(Array - (Integer 4) - [(() - ()) - (() - ())] - DescriptorArray - )] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 201 xi32)] - [(= - (Var 201 _lpython_return_variable) - (ArrayItem - (Var 201 xi32) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - () - ) - (Return)] - (Var 201 _lpython_return_variable) - Public - .false. - .false. - () - ), - accept_multidim_i64_array: - (Function - (SymbolTable - 202 - { - _lpython_return_variable: - (Variable - 202 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - xi64: - (Variable - 202 - xi64 - [] - InOut - () - () - Default - (Array - (Integer 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - accept_multidim_i64_array - (FunctionType - [(Array - (Integer 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - )] - (Integer 8) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 xi64)] - [(= - (Var 202 _lpython_return_variable) - (ArrayItem - (Var 202 xi64) - [(() - (IntegerConstant 9 (Integer 4)) - ()) - (() - (IntegerConstant 9 (Integer 4)) - ()) - (() - (IntegerConstant 9 (Integer 4)) - ())] - (Integer 8) - RowMajor - () - ) - () - ) - (Return)] - (Var 202 _lpython_return_variable) - Public - .false. - .false. - () - ), - declare_arrays: - (Function - (SymbolTable - 205 - { - ac32: - (Variable - 205 - ac32 - [] - Local - () - () - Default - (Array - (Complex 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 5 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 99 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ac64: - (Variable - 205 - ac64 - [] - Local - () - () - Default - (Array - (Complex 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 13 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 11 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - af32: - (Variable - 205 - af32 - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - af64: - (Variable - 205 - af64 - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ai32: - (Variable - 205 - ai32 - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - ai64: - (Variable - 205 - ai64 - [] - Local - () - () - Default - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - declare_arrays - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [accept_multidim_i32_array - accept_multidim_i64_array - accept_multidim_f32_array - accept_multidim_f64_array] - [] - [(= - (Var 205 ai32) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 205 ai64) - (ArrayConstant - [] - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 205 af32) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 205 af64) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 205 ac32) - (ArrayConstant - [] - (Array - (Complex 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 5 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 99 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 205 ac64) - (ArrayConstant - [] - (Array - (Complex 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 13 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 11 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (Print - () - [(FunctionCall - 2 accept_multidim_i32_array - () - [((ArrayPhysicalCast - (Var 205 ai32) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Integer 4) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_multidim_i64_array - () - [((ArrayPhysicalCast - (Var 205 ai64) - FixedSizeArray - DescriptorArray - (Array - (Integer 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Integer 8) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_multidim_f32_array - () - [((ArrayPhysicalCast - (Var 205 af32) - FixedSizeArray - DescriptorArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Real 4) - () - () - )] - () - () - ) - (Print - () - [(FunctionCall - 2 accept_multidim_f64_array - () - [((ArrayPhysicalCast - (Var 205 af64) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 10 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - DescriptorArray - ) - () - ))] - (Real 8) - () - () - )] - () - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 207 - { - __main__global_stmts: - (ExternalSymbol - 207 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 207 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-bindc_02-bc1a7ea.stdout b/tests/reference/asr-bindc_02-bc1a7ea.stdout deleted file mode 100644 index 9a45fc6312..0000000000 --- a/tests/reference/asr-bindc_02-bc1a7ea.stdout +++ /dev/null @@ -1,437 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 202 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [f] - [] - [(CPtrToPointer - (Var 2 queries) - (Var 2 x) - (ArrayConstant - [(IntegerConstant 1 (Integer 4))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - (ArrayConstant - [(IntegerConstant 0 (Integer 4))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - ) - (Print - () - [(Var 2 queries) - (Var 2 x)] - () - () - ) - (SubroutineCall - 2 f - () - [] - () - )] - () - Public - .false. - .false. - () - ), - f: - (Function - (SymbolTable - 201 - { - y: - (Variable - 201 - y - [] - Local - () - () - Default - (Array - (Integer 2) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - yptr1: - (Variable - 201 - yptr1 - [] - Local - () - () - Default - (Pointer - (Array - (Integer 2) - [(() - ())] - DescriptorArray - ) - ) - () - Source - Public - Required - .false. - ), - yq: - (Variable - 201 - yq - [] - Local - () - () - Default - (CPtr) - () - Source - Public - Required - .false. - ) - }) - f - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 201 yq) - (PointerNullConstant - (CPtr) - ) - () - ) - (= - (Var 201 y) - (ArrayConstant - [] - (Array - (Integer 2) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 201 y) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 1 (Integer 2)) - ) - () - ) - (= - (ArrayItem - (Var 201 y) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 2 (Integer 2)) - ) - () - ) - (= - (Var 201 yptr1) - (GetPointer - (Var 201 y) - (Pointer - (Array - (Integer 2) - [(() - ())] - DescriptorArray - ) - ) - () - ) - () - ) - (Print - () - [(GetPointer - (Var 201 y) - (Pointer - (Array - (Integer 2) - [(() - ())] - DescriptorArray - ) - ) - () - ) - (Var 201 yptr1)] - () - () - ) - (Print - () - [(ArrayItem - (Var 201 yptr1) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - (ArrayItem - (Var 201 yptr1) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - )] - () - () - ) - (Assert - (IntegerCompare - (ArrayItem - (Var 201 yptr1) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - Eq - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 1 (Integer 2)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (ArrayItem - (Var 201 yptr1) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 2) - RowMajor - () - ) - Eq - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 2 (Integer 2)) - ) - (Logical 4) - () - ) - () - ) - (CPtrToPointer - (Var 201 yq) - (Var 201 yptr1) - (ArrayConstant - [(IntegerConstant 2 (Integer 4))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - (ArrayConstant - [(IntegerConstant 0 (Integer 4))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - ) - (Print - () - [(Var 201 yq) - (Var 201 yptr1)] - () - () - )] - () - Public - .false. - .false. - () - ), - queries: - (Variable - 2 - queries - [] - Local - (PointerNullConstant - (CPtr) - ) - (PointerNullConstant - (CPtr) - ) - Default - (CPtr) - () - Source - Public - Required - .false. - ), - x: - (Variable - 2 - x - [] - Local - () - () - Default - (Pointer - (Array - (Integer 2) - [(() - ())] - DescriptorArray - ) - ) - () - Source - Public - Required - .false. - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 203 - { - __main__global_stmts: - (ExternalSymbol - 203 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 203 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-cast-435c233.stdout b/tests/reference/asr-cast-435c233.stdout deleted file mode 100644 index aed92b3b98..0000000000 --- a/tests/reference/asr-cast-435c233.stdout +++ /dev/null @@ -1,312 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [f] - [] - [(SubroutineCall - 2 f - () - [] - () - )] - () - Public - .false. - .false. - () - ), - f: - (Function - (SymbolTable - 3 - { - list: - (ExternalSymbol - 3 - list - 4 list - lpython_builtin - [] - list - Private - ), - s: - (Variable - 3 - s - [] - Local - () - () - Default - (Character 1 -2 ()) - () - Source - Public - Required - .false. - ), - x: - (Variable - 3 - x - [] - Local - () - () - Default - (List - (Character 1 -2 ()) - ) - () - Source - Public - Required - .false. - ), - y: - (Variable - 3 - y - [] - Local - () - () - Default - (List - (Character 1 -2 ()) - ) - () - Source - Public - Required - .false. - ) - }) - f - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [list] - [] - [(= - (Var 3 s) - (StringConstant - "lpython" - (Character 1 7 ()) - ) - () - ) - (= - (Var 3 x) - (FunctionCall - 3 list - () - [((Var 3 s))] - (List - (Character 1 -2 ()) - ) - () - () - ) - () - ) - (= - (Var 3 y) - (ListConstant - [(StringConstant - "a" - (Character 1 1 ()) - ) - (StringConstant - "b" - (Character 1 1 ()) - ) - (StringConstant - "c" - (Character 1 1 ()) - )] - (List - (Character 1 1 ()) - ) - ) - () - ) - (= - (Var 3 x) - (FunctionCall - 3 list - () - [((Var 3 y))] - (List - (Character 1 -2 ()) - ) - () - () - ) - () - ) - (= - (Var 3 x) - (ListConstant - [] - (List - (Character 1 -2 ()) - ) - ) - () - ) - (= - (Var 3 x) - (FunctionCall - 3 list - () - [((ListConstant - [] - (List - (Character 1 -2 ()) - ) - ))] - (List - (Character 1 -2 ()) - ) - (ListConstant - [] - (List - (Character 1 -2 ()) - ) - ) - () - ) - () - ) - (= - (Var 3 x) - (FunctionCall - 3 list - () - [((StringConstant - "lpython" - (Character 1 7 ()) - ))] - (List - (Character 1 -2 ()) - ) - (ListConstant - [(StringConstant - "l" - (Character 1 1 ()) - ) - (StringConstant - "p" - (Character 1 1 ()) - ) - (StringConstant - "y" - (Character 1 1 ()) - ) - (StringConstant - "t" - (Character 1 1 ()) - ) - (StringConstant - "h" - (Character 1 1 ()) - ) - (StringConstant - "o" - (Character 1 1 ()) - ) - (StringConstant - "n" - (Character 1 1 ()) - )] - (List - (Character 1 1 ()) - ) - ) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-complex1-f26c460.stdout b/tests/reference/asr-complex1-f26c460.stdout deleted file mode 100644 index 8076419ea1..0000000000 --- a/tests/reference/asr-complex1-f26c460.stdout +++ /dev/null @@ -1,794 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - test: - (Function - (SymbolTable - 4 - { - x: - (Variable - 4 - x - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - y: - (Variable - 4 - y - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - z: - (Variable - 4 - z - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ) - }) - test - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 4 x) - (ComplexBinOp - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 2.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 3.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 4 y) - (ComplexBinOp - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 5.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 5.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 5.000000 - 5.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 4 z) - (Cast - (ComplexBinOp - (Var 4 x) - Add - (Var 4 y) - (Complex 8) - () - ) - ComplexToComplex - (Complex 4) - () - ) - () - ) - (= - (Var 4 z) - (Cast - (ComplexBinOp - (Var 4 x) - Sub - (Var 4 y) - (Complex 8) - () - ) - ComplexToComplex - (Complex 4) - () - ) - () - ) - (= - (Var 4 z) - (Cast - (ComplexBinOp - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 2.000000 - 0.000000 - (Complex 8) - ) - ) - Mul - (Var 4 x) - (Complex 8) - () - ) - ComplexToComplex - (Complex 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_complex: - (Function - (SymbolTable - 3 - { - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 3 - c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c1: - (Variable - 3 - c1 - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c2: - (Variable - 3 - c2 - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c3: - (Variable - 3 - c3 - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 3 - complex - 5 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_0__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_0__complex - 5 __lpython_overloaded_0__complex - lpython_builtin - [] - __lpython_overloaded_0__complex - Public - ), - complex@__lpython_overloaded_13__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_13__complex - 5 __lpython_overloaded_13__complex - lpython_builtin - [] - __lpython_overloaded_13__complex - Public - ), - complex@__lpython_overloaded_1__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_1__complex - 5 __lpython_overloaded_1__complex - lpython_builtin - [] - __lpython_overloaded_1__complex - Public - ), - complex@__lpython_overloaded_2__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_2__complex - 5 __lpython_overloaded_2__complex - lpython_builtin - [] - __lpython_overloaded_2__complex - Public - ), - complex@__lpython_overloaded_5__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_5__complex - 5 __lpython_overloaded_5__complex - lpython_builtin - [] - __lpython_overloaded_5__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 5 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ) - }) - test_complex - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_0__complex - complex@__lpython_overloaded_1__complex - complex@__lpython_overloaded_5__complex - complex@__lpython_overloaded_2__complex - complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_13__complex] - [] - [(= - (Var 3 c) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_0__complex - 3 complex - [] - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_1__complex - 3 complex - [((RealConstant - 3.400000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.400000 - 0.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 3.400000 - 0.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_5__complex - 3 complex - [((RealConstant - 5.000000 - (Real 8) - )) - ((RealConstant - 4.300000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 5.000000 - 4.300000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 5.000000 - 4.300000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c) - (FunctionCall - 3 complex@__lpython_overloaded_2__complex - 3 complex - [((IntegerConstant 1 (Integer 4)))] - (Complex 4) - (ComplexConstant - 1.000000 - 0.000000 - (Complex 8) - ) - () - ) - () - ) - (= - (Var 3 c1) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 4 (Integer 4)))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c2) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_13__complex - 3 complex - [((IntegerConstant 2 (Integer 4))) - ((RealConstant - 4.500000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 2.000000 - 4.500000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 2.000000 - 4.500000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c3) - (FunctionCall - 3 complex@__lpython_overloaded_5__complex - 3 complex - [((RealConstant - 3.000000 - (Real 8) - )) - ((RealConstant - 4.000000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - () - ) - (= - (Var 3 b) - (ComplexCompare - (Var 3 c1) - NotEq - (Var 3 c2) - (Logical 4) - () - ) - () - ) - (= - (Var 3 b) - (ComplexCompare - (Cast - (Var 3 c1) - ComplexToComplex - (Complex 8) - () - ) - Eq - (Var 3 c3) - (Logical 4) - () - ) - () - ) - (= - (Var 3 c) - (ComplexBinOp - (Var 3 c1) - Add - (Var 3 c2) - (Complex 4) - () - ) - () - ) - (= - (Var 3 c) - (ComplexBinOp - (Var 3 c2) - Sub - (Var 3 c1) - (Complex 4) - () - ) - () - ) - (= - (Var 3 c) - (ComplexBinOp - (Var 3 c1) - Mul - (Var 3 c2) - (Complex 4) - () - ) - () - ) - (= - (Var 3 c) - (Cast - (ComplexBinOp - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Complex 8) - (ComplexConstant - 1.000000 - 2.000000 - (Complex 8) - ) - () - ) - Pow - (FunctionCall - 3 complex@__lpython_overloaded_5__complex - 3 complex - [((RealConstant - 3.345340 - (Real 8) - )) - ((RealConstant - 4.867868 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.345340 - 4.867868 - (Complex 8) - ) - () - ) - (Complex 8) - (ComplexConstant - 0.015553 - 0.065561 - (Complex 8) - ) - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 0.015553 - 0.065561 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c) - (Cast - (ComplexBinOp - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Complex 8) - (ComplexConstant - 1.000000 - 2.000000 - (Complex 8) - ) - () - ) - Mul - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 4 (Integer 4)))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - (Complex 8) - (ComplexConstant - -5.000000 - 10.000000 - (Complex 8) - ) - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - -5.000000 - 10.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c) - (Cast - (ComplexBinOp - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 4 (Integer 4))) - ((IntegerConstant 5 (Integer 4)))] - (Complex 8) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 8) - ) - () - ) - Sub - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 4 (Integer 4)))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - (Complex 8) - (ComplexConstant - 1.000000 - 1.000000 - (Complex 8) - ) - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 1.000000 - 1.000000 - (Complex 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - - }) - main_program - [] - [] - ) - }) - [] -) diff --git a/tests/reference/asr-constants1-5828e8a.stdout b/tests/reference/asr-constants1-5828e8a.stdout deleted file mode 100644 index e1ac329855..0000000000 --- a/tests/reference/asr-constants1-5828e8a.stdout +++ /dev/null @@ -1,1793 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - test_abs: - (Function - (SymbolTable - 5 - { - a: - (Variable - 5 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 5 - b - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 5 - complex - 13 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_5__complex: - (ExternalSymbol - 5 - complex@__lpython_overloaded_5__complex - 13 __lpython_overloaded_5__complex - lpython_builtin - [] - __lpython_overloaded_5__complex - Public - ) - }) - test_abs - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_5__complex] - [] - [(= - (Var 5 a) - (IntrinsicScalarFunction - Abs - [(IntegerConstant 5 (Integer 4))] - 0 - (Integer 4) - (IntegerConstant 5 (Integer 4)) - ) - () - ) - (= - (Var 5 a) - (IntrinsicScalarFunction - Abs - [(IntegerUnaryMinus - (IntegerConstant 500 (Integer 4)) - (Integer 4) - (IntegerConstant -500 (Integer 4)) - )] - 0 - (Integer 4) - (IntegerConstant 500 (Integer 4)) - ) - () - ) - (= - (Var 5 a) - (IntrinsicScalarFunction - Abs - [(Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - )] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 5 a) - (IntrinsicScalarFunction - Abs - [(Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - )] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 5 b) - (Cast - (IntrinsicScalarFunction - Abs - [(RealConstant - 3.450000 - (Real 8) - )] - 0 - (Real 8) - (RealConstant - 3.450000 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 3.450000 - (Real 4) - ) - ) - () - ) - (= - (Var 5 b) - (Cast - (IntrinsicScalarFunction - Abs - [(RealUnaryMinus - (RealConstant - 5346.340000 - (Real 8) - ) - (Real 8) - (RealConstant - -5346.340000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 5346.340000 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 5346.340000 - (Real 4) - ) - ) - () - ) - (= - (Var 5 b) - (Cast - (IntrinsicScalarFunction - Abs - [(FunctionCall - 5 complex@__lpython_overloaded_5__complex - 5 complex - [((RealConstant - 3.450000 - (Real 8) - )) - ((RealConstant - 5.600000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.450000 - 5.600000 - (Complex 8) - ) - () - )] - 0 - (Real 8) - (RealConstant - 6.577424 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 6.577424 - (Real 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ), - test_bool: - (Function - (SymbolTable - 7 - { - a: - (Variable - 7 - a - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 7 - complex - 13 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 7 - complex@__lpython_overloaded_9__complex - 13 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ) - }) - test_bool - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_9__complex] - [] - [(= - (Var 7 a) - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 7 a) - (Cast - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - IntegerToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 7 a) - (Cast - (StringConstant - "" - (Character 1 0 ()) - ) - CharacterToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 7 a) - (Cast - (FunctionCall - 7 complex@__lpython_overloaded_9__complex - 7 complex - [((IntegerConstant 0 (Integer 4))) - ((IntegerConstant 0 (Integer 4)))] - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - () - ) - ComplexToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (Assert - (LogicalCompare - (Var 7 a) - Eq - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 7 a) - (Cast - (StringConstant - "t" - (Character 1 1 ()) - ) - CharacterToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 7 a) - (Cast - (RealConstant - 2.300000 - (Real 8) - ) - RealToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (LogicalCompare - (Var 7 a) - Eq - (LogicalConstant - .true. - (Logical 4) - ) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_boz: - (Function - (SymbolTable - 3 - { - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Character 1 -2 ()) - () - Source - Public - Required - .false. - ), - bin: - (ExternalSymbol - 3 - bin - 13 bin - lpython_builtin - [] - bin - Private - ), - hex: - (ExternalSymbol - 3 - hex - 13 hex - lpython_builtin - [] - hex - Private - ), - oct: - (ExternalSymbol - 3 - oct - 13 oct - lpython_builtin - [] - oct - Private - ) - }) - test_boz - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [bin - oct - hex] - [] - [(= - (Var 3 b) - (FunctionCall - 3 bin - () - [((IntegerConstant 5 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0b101" - (Character 1 5 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 bin - () - [((IntegerConstant 64 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0b1000000" - (Character 1 9 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 bin - () - [((IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0b1000010110" - (Character 1 13 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 oct - () - [((IntegerConstant 8 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0o10" - (Character 1 4 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 oct - () - [((IntegerConstant 56 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0o70" - (Character 1 4 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 oct - () - [((IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0o1026" - (Character 1 7 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 hex - () - [((IntegerConstant 42 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0x2a" - (Character 1 4 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 hex - () - [((IntegerConstant 12648430 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0xc0ffee" - (Character 1 8 ()) - ) - () - ) - () - ) - (= - (Var 3 b) - (FunctionCall - 3 hex - () - [((IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0x216" - (Character 1 6 ()) - ) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_callable: - (Function - (SymbolTable - 9 - { - a: - (Variable - 9 - a - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 9 - b - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_callable - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 9 b) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 9 a) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (Assert - (LogicalCompare - (Var 9 a) - Eq - (LogicalConstant - .true. - (Logical 4) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 9 a) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (Assert - (LogicalCompare - (Var 9 a) - Eq - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 9 a) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (Assert - (LogicalCompare - (Var 9 a) - Eq - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_divmod: - (Function - (SymbolTable - 12 - { - a: - (Variable - 12 - a - [] - Local - () - () - Default - (Tuple - [(Integer 4) - (Integer 4)] - ) - () - Source - Public - Required - .false. - ), - divmod: - (ExternalSymbol - 12 - divmod - 13 divmod - lpython_builtin - [] - divmod - Private - ) - }) - test_divmod - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [divmod] - [] - [(= - (Var 12 a) - (FunctionCall - 12 divmod - () - [((IntegerConstant 9 (Integer 4))) - ((IntegerConstant 3 (Integer 4)))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - (TupleConstant - [(IntegerConstant 3 (Integer 4)) - (IntegerConstant 0 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - ) - () - ) - () - ) - (= - (Var 12 a) - (FunctionCall - 12 divmod - () - [((IntegerConstant 9 (Integer 4))) - ((IntegerUnaryMinus - (IntegerConstant 3 (Integer 4)) - (Integer 4) - (IntegerConstant -3 (Integer 4)) - ))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - (TupleConstant - [(IntegerConstant -3 (Integer 4)) - (IntegerConstant 0 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - ) - () - ) - () - ) - (= - (Var 12 a) - (FunctionCall - 12 divmod - () - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 3 (Integer 4)))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - (TupleConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 0 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - ) - () - ) - () - ) - (= - (Var 12 a) - (FunctionCall - 12 divmod - () - [((IntegerConstant 4 (Integer 4))) - ((IntegerConstant 5 (Integer 4)))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - (TupleConstant - [(IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - ) - () - ) - () - ) - (= - (Var 12 a) - (FunctionCall - 12 divmod - () - [((IntegerConstant 0 (Integer 4))) - ((IntegerConstant 5 (Integer 4)))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - (TupleConstant - [(IntegerConstant 0 (Integer 4)) - (IntegerConstant 0 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4)] - ) - ) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_float: - (Function - (SymbolTable - 11 - { - a: - (Variable - 11 - a - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ) - }) - test_float - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 11 a) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 11 a) - (RealConstant - 4.560000 - (Real 8) - ) - () - ) - (= - (Var 11 a) - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToReal - (Real 8) - (RealConstant - 5.000000 - (Real 8) - ) - ) - () - ) - (= - (Var 11 a) - (Cast - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - IntegerToReal - (Real 8) - (RealConstant - -1.000000 - (Real 8) - ) - ) - () - ) - (= - (Var 11 a) - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToReal - (Real 8) - (RealConstant - 1.000000 - (Real 8) - ) - ) - () - ) - (= - (Var 11 a) - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToReal - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - () - )] - () - Public - .false. - .false. - () - ), - test_int: - (Function - (SymbolTable - 10 - { - a: - (Variable - 10 - a - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ) - }) - test_int - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 10 a) - (IntegerConstant 0 (Integer 8)) - () - ) - (= - (Var 10 a) - (Cast - (RealConstant - 4.560000 - (Real 8) - ) - RealToInteger - (Integer 8) - (IntegerConstant 4 (Integer 8)) - ) - () - ) - (= - (Var 10 a) - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 5 (Integer 8)) - ) - () - ) - (= - (Var 10 a) - (Cast - (RealUnaryMinus - (RealConstant - 5.000010 - (Real 8) - ) - (Real 8) - (RealConstant - -5.000010 - (Real 8) - ) - ) - RealToInteger - (Integer 8) - (IntegerConstant -5 (Integer 8)) - ) - () - ) - (= - (Var 10 a) - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 8) - (IntegerConstant 1 (Integer 8)) - ) - () - ) - (= - (Var 10 a) - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 8) - (IntegerConstant 0 (Integer 8)) - ) - () - ) - (= - (Var 10 a) - (IntegerConstant 5346 (Integer 8)) - () - )] - () - Public - .false. - .false. - () - ), - test_len: - (Function - (SymbolTable - 6 - { - a: - (Variable - 6 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - l: - (Variable - 6 - l - [] - Local - () - () - Default - (List - (Integer 4) - ) - () - Source - Public - Required - .false. - ) - }) - test_len - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 6 a) - (StringLen - (StringConstant - "" - (Character 1 0 ()) - ) - (Integer 4) - (IntegerConstant 0 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (StringLen - (StringConstant - "test" - (Character 1 4 ()) - ) - (Integer 4) - (IntegerConstant 4 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (StringLen - (StringConstant - "this is a test" - (Character 1 14 ()) - ) - (Integer 4) - (IntegerConstant 14 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (TupleLen - (TupleConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - (Tuple - [(Integer 4) - (Integer 4) - (Integer 4)] - ) - ) - (Integer 4) - (IntegerConstant 3 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (TupleLen - (TupleConstant - [(TupleConstant - [(StringConstant - "c" - (Character 1 1 ()) - ) - (StringConstant - "b" - (Character 1 1 ()) - ) - (RealConstant - 3.400000 - (Real 8) - )] - (Tuple - [(Character 1 1 ()) - (Character 1 1 ()) - (Real 8)] - ) - ) - (TupleConstant - [(StringConstant - "c" - (Character 1 1 ()) - ) - (IntegerConstant 3 (Integer 4)) - (RealConstant - 5.600000 - (Real 8) - )] - (Tuple - [(Character 1 1 ()) - (Integer 4) - (Real 8)] - ) - )] - (Tuple - [(Tuple - [(Character 1 1 ()) - (Character 1 1 ()) - (Real 8)] - ) - (Tuple - [(Character 1 1 ()) - (Integer 4) - (Real 8)] - )] - ) - ) - (Integer 4) - (IntegerConstant 2 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (ListLen - (ListConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - (List - (Integer 4) - ) - ) - (Integer 4) - (IntegerConstant 3 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (ListLen - (ListConstant - [(ListConstant - [(IntegerUnaryMinus - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant -4 (Integer 4)) - ) - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - (IntegerUnaryMinus - (IntegerConstant 6 (Integer 4)) - (Integer 4) - (IntegerConstant -6 (Integer 4)) - )] - (List - (Integer 4) - ) - ) - (ListConstant - [(IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - (IntegerUnaryMinus - (IntegerConstant 2 (Integer 4)) - (Integer 4) - (IntegerConstant -2 (Integer 4)) - ) - (IntegerUnaryMinus - (IntegerConstant 3 (Integer 4)) - (Integer 4) - (IntegerConstant -3 (Integer 4)) - )] - (List - (Integer 4) - ) - )] - (List - (List - (Integer 4) - ) - ) - ) - (Integer 4) - (IntegerConstant 2 (Integer 4)) - ) - () - ) - (= - (Var 6 a) - (SetLen - (SetConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - (Set - (Integer 4) - ) - ) - (Integer 4) - () - ) - () - ) - (= - (Var 6 a) - (DictLen - (DictConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - [(StringConstant - "c" - (Character 1 1 ()) - ) - (StringConstant - "b" - (Character 1 1 ()) - ) - (StringConstant - "c" - (Character 1 1 ()) - )] - (Dict - (Integer 4) - (Character 1 1 ()) - ) - ) - (Integer 4) - () - ) - () - ) - (= - (Var 6 l) - (ListConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4)) - (IntegerConstant 4 (Integer 4))] - (List - (Integer 4) - ) - ) - () - ) - (= - (Var 6 a) - (ListLen - (Var 6 l) - (Integer 4) - () - ) - () - ) - (ListAppend - (Var 6 l) - (IntegerConstant 5 (Integer 4)) - ) - (= - (Var 6 a) - (ListLen - (Var 6 l) - (Integer 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_ord_chr: - (Function - (SymbolTable - 4 - { - a: - (Variable - 4 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - s: - (Variable - 4 - s - [] - Local - () - () - Default - (Character 1 -2 ()) - () - Source - Public - Required - .false. - ) - }) - test_ord_chr - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 4 a) - (StringOrd - (StringConstant - "5" - (Character 1 1 ()) - ) - (Integer 4) - (IntegerConstant 53 (Integer 4)) - ) - () - ) - (= - (Var 4 s) - (StringChr - (IntegerConstant 43 (Integer 4)) - (Character 1 1 ()) - (StringConstant - "+" - (Character 1 1 ()) - ) - ) - () - )] - () - Public - .false. - .false. - () - ), - test_str: - (Function - (SymbolTable - 8 - { - s: - (Variable - 8 - s - [] - Local - () - () - Default - (Character 1 -2 ()) - () - Source - Public - Required - .false. - ) - }) - test_str - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 8 s) - (StringConstant - "" - (Character 1 0 ()) - ) - () - ) - (= - (Var 8 s) - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToCharacter - (Character 1 -2 ()) - (StringConstant - "5" - (Character 1 1 ()) - ) - ) - () - ) - (= - (Var 8 s) - (Cast - (IntegerUnaryMinus - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant -4 (Integer 4)) - ) - IntegerToCharacter - (Character 1 -2 ()) - (StringConstant - "-4" - (Character 1 2 ()) - ) - ) - () - ) - (= - (Var 8 s) - (Cast - (RealConstant - 5.600000 - (Real 8) - ) - RealToCharacter - (Character 1 -2 ()) - (StringConstant - "5.6" - (Character 1 3 ()) - ) - ) - () - ) - (= - (Var 8 s) - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToCharacter - (Character 1 -2 ()) - (StringConstant - "True" - (Character 1 4 ()) - ) - ) - () - ) - (= - (Var 8 s) - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToCharacter - (Character 1 -2 ()) - (StringConstant - "False" - (Character 1 5 ()) - ) - ) - () - ) - (= - (Var 8 s) - (StringConstant - "5346" - (Character 1 4 ()) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 128 - { - - }) - main_program - [] - [] - ) - }) - [] -) diff --git a/tests/reference/asr-elemental_01-b58df26.stdout b/tests/reference/asr-elemental_01-b58df26.stdout deleted file mode 100644 index 3e3d44dd88..0000000000 --- a/tests/reference/asr-elemental_01-b58df26.stdout +++ /dev/null @@ -1,3649 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 234 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [elemental_sin - elemental_cos - elemental_trig_identity - elemental_sum - elemental_mul] - [] - [(SubroutineCall - 2 elemental_sin - () - [] - () - ) - (SubroutineCall - 2 elemental_cos - () - [] - () - ) - (SubroutineCall - 2 elemental_trig_identity - () - [] - () - ) - (SubroutineCall - 2 elemental_sum - () - [] - () - ) - (SubroutineCall - 2 elemental_mul - () - [] - () - )] - () - Public - .false. - .false. - () - ), - cos: - (ExternalSymbol - 2 - cos - 3 cos - numpy - [] - cos - Public - ), - elemental_cos: - (Function - (SymbolTable - 209 - { - array2d: - (Variable - 209 - array2d - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - cos2d: - (Variable - 209 - cos2d - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - cos@__lpython_overloaded_0__cos: - (ExternalSymbol - 209 - cos@__lpython_overloaded_0__cos - 3 __lpython_overloaded_0__cos - numpy - [] - __lpython_overloaded_0__cos - Public - ), - i: - (Variable - 209 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 209 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - elemental_cos - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [cos@__lpython_overloaded_0__cos - verify2d] - [] - [(= - (Var 209 array2d) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 209 cos2d) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 209 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 256 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 255 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 209 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 64 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 63 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 209 array2d) - [(() - (Var 209 i) - ()) - (() - (Var 209 j) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (IntegerBinOp - (Var 209 i) - Add - (Var 209 j) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - () - )] - )] - ) - (= - (Var 209 cos2d) - (RealBinOp - (FunctionCall - 209 cos@__lpython_overloaded_0__cos - 2 cos - [((Var 209 array2d))] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - FixedSizeArray - ) - () - ) - () - ) - (SubroutineCall - 2 verify2d - () - [((ArrayPhysicalCast - (Var 209 array2d) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 209 cos2d) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 256 (Integer 4))) - ((IntegerConstant 64 (Integer 4)))] - () - )] - () - Public - .false. - .false. - () - ), - elemental_mul: - (Function - (SymbolTable - 207 - { - array_a: - (Variable - 207 - array_a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - array_b: - (Variable - 207 - array_b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - array_c: - (Variable - 207 - array_c - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 207 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 207 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 207 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - elemental_mul - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [verify1d_mul] - [] - [(= - (Var 207 array_a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 array_b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 207 array_c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 207 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 100 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 99 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 207 array_a) - [(() - (Var 207 i) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (Var 207 i) - IntegerToReal - (Real 8) - () - ) - () - )] - ) - (DoLoop - () - ((Var 207 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 100 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 99 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 207 array_b) - [(() - (Var 207 j) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (IntegerBinOp - (Var 207 j) - Add - (IntegerConstant 5 (Integer 4)) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - () - )] - ) - (= - (Var 207 array_c) - (RealBinOp - (RealBinOp - (RealBinOp - (Var 207 array_a) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - Mul - (RealConstant - 5.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - Mul - (RealBinOp - (Var 207 array_b) - Pow - (RealConstant - 3.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - () - ) - (SubroutineCall - 2 verify1d_mul - () - [((ArrayPhysicalCast - (Var 207 array_a) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 207 array_b) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 207 array_c) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 100 (Integer 4)))] - () - )] - () - Public - .false. - .false. - () - ), - elemental_sin: - (Function - (SymbolTable - 208 - { - array1d: - (Variable - 208 - array1d - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - arraynd: - (Variable - 208 - arraynd - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 208 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 208 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 208 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - sin1d: - (Variable - 208 - sin1d - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - sin@__lpython_overloaded_0__sin: - (ExternalSymbol - 208 - sin@__lpython_overloaded_0__sin - 3 __lpython_overloaded_0__sin - numpy - [] - __lpython_overloaded_0__sin - Public - ), - sin@__lpython_overloaded_1__sin: - (ExternalSymbol - 208 - sin@__lpython_overloaded_1__sin - 3 __lpython_overloaded_1__sin - numpy - [] - __lpython_overloaded_1__sin - Public - ), - sinnd: - (Variable - 208 - sinnd - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - elemental_sin - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [sin@__lpython_overloaded_1__sin - verify1d - sin@__lpython_overloaded_0__sin - verifynd] - [] - [(= - (Var 208 array1d) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 208 sin1d) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 208 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 256 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 255 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 208 array1d) - [(() - (Var 208 i) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (Var 208 i) - IntegerToReal - (Real 4) - () - ) - () - )] - ) - (= - (Var 208 sin1d) - (FunctionCall - 208 sin@__lpython_overloaded_1__sin - 2 sin - [((FunctionCall - 208 sin@__lpython_overloaded_1__sin - 2 sin - [((Var 208 array1d))] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - () - ))] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - () - ) - (SubroutineCall - 2 verify1d - () - [((ArrayPhysicalCast - (Var 208 array1d) - FixedSizeArray - DescriptorArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 208 sin1d) - FixedSizeArray - DescriptorArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 256 (Integer 4)))] - () - ) - (= - (Var 208 arraynd) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 208 sinnd) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 208 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 256 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 255 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 208 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 64 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 63 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 208 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 208 arraynd) - [(() - (Var 208 i) - ()) - (() - (Var 208 j) - ()) - (() - (Var 208 k) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (IntegerBinOp - (IntegerBinOp - (Var 208 i) - Add - (Var 208 j) - (Integer 4) - () - ) - Add - (Var 208 k) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - () - )] - )] - )] - ) - (= - (Var 208 sinnd) - (RealBinOp - (FunctionCall - 208 sin@__lpython_overloaded_0__sin - 2 sin - [((Var 208 arraynd))] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - ) - () - ) - (SubroutineCall - 2 verifynd - () - [((ArrayPhysicalCast - (Var 208 arraynd) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 208 sinnd) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 256 (Integer 4))) - ((IntegerConstant 64 (Integer 4))) - ((IntegerConstant 16 (Integer 4)))] - () - )] - () - Public - .false. - .false. - () - ), - elemental_sum: - (Function - (SymbolTable - 206 - { - array_a: - (Variable - 206 - array_a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - array_b: - (Variable - 206 - array_b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - array_c: - (Variable - 206 - array_c - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 206 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 206 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 206 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - elemental_sum - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [verify1d_sum] - [] - [(= - (Var 206 array_a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 206 array_b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 206 array_c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 206 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 100 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 99 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 206 array_a) - [(() - (Var 206 i) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (Var 206 i) - IntegerToReal - (Real 8) - () - ) - () - )] - ) - (DoLoop - () - ((Var 206 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 100 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 99 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 206 array_b) - [(() - (Var 206 j) - ())] - (Real 8) - RowMajor - () - ) - (Cast - (IntegerBinOp - (Var 206 j) - Add - (IntegerConstant 5 (Integer 4)) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - () - )] - ) - (= - (Var 206 array_c) - (RealBinOp - (RealBinOp - (Var 206 array_a) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - Add - (RealBinOp - (RealConstant - 5.000000 - (Real 8) - ) - Mul - (RealBinOp - (Var 206 array_b) - Pow - (RealConstant - 3.000000 - (Real 8) - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - FixedSizeArray - ) - () - ) - () - ) - (SubroutineCall - 2 verify1d_sum - () - [((ArrayPhysicalCast - (Var 206 array_a) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 206 array_b) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((ArrayPhysicalCast - (Var 206 array_c) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 100 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 100 (Integer 4)))] - () - )] - () - Public - .false. - .false. - () - ), - elemental_trig_identity: - (Function - (SymbolTable - 210 - { - arraynd: - (Variable - 210 - arraynd - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - cos@__lpython_overloaded_1__cos: - (ExternalSymbol - 210 - cos@__lpython_overloaded_1__cos - 3 __lpython_overloaded_1__cos - numpy - [] - __lpython_overloaded_1__cos - Public - ), - eps: - (Variable - 210 - eps - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - i: - (Variable - 210 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 210 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 210 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - l: - (Variable - 210 - l - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - newshape: - (Variable - 210 - newshape - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - observed: - (Variable - 210 - observed - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - observed1d: - (Variable - 210 - observed1d - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 65536 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - sin@__lpython_overloaded_1__sin: - (ExternalSymbol - 210 - sin@__lpython_overloaded_1__sin - 3 __lpython_overloaded_1__sin - numpy - [] - __lpython_overloaded_1__sin - Public - ) - }) - elemental_trig_identity - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [sin@__lpython_overloaded_1__sin - cos@__lpython_overloaded_1__cos] - [] - [(= - (Var 210 eps) - (Cast - (RealConstant - 0.000001 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 0.000001 - (Real 4) - ) - ) - () - ) - (= - (Var 210 arraynd) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 210 observed) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 210 observed1d) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 65536 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 210 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 64 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 63 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 210 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 32 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 31 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 210 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 8 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 7 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 210 l) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 4 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 3 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 210 arraynd) - [(() - (Var 210 i) - ()) - (() - (Var 210 j) - ()) - (() - (Var 210 k) - ()) - (() - (Var 210 l) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (IntegerBinOp - (IntegerBinOp - (IntegerBinOp - (Var 210 i) - Add - (Var 210 j) - (Integer 4) - () - ) - Add - (Var 210 k) - (Integer 4) - () - ) - Add - (Var 210 l) - (Integer 4) - () - ) - IntegerToReal - (Real 4) - () - ) - () - )] - )] - )] - )] - ) - (= - (Var 210 observed) - (RealBinOp - (RealBinOp - (FunctionCall - 210 sin@__lpython_overloaded_1__sin - 2 sin - [((Var 210 arraynd))] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - Pow - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToReal - (Real 4) - (RealConstant - 2.000000 - (Real 4) - ) - ) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - ) - Add - (RealBinOp - (FunctionCall - 210 cos@__lpython_overloaded_1__cos - 2 cos - [((Var 210 arraynd))] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - Pow - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToReal - (Real 4) - (RealConstant - 2.000000 - (Real 4) - ) - ) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - ) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 64 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 32 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 8 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4 (Integer 4)))] - FixedSizeArray - ) - () - ) - () - ) - (= - (Var 210 newshape) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 210 newshape) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 65536 (Integer 4)) - () - ) - (= - (Var 210 observed1d) - (ArrayReshape - (Var 210 observed) - (ArrayPhysicalCast - (Var 210 newshape) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - DescriptorArray - ) - () - ) - (Array - (Real 4) - [(() - ())] - FixedSizeArray - ) - () - ) - () - ) - (DoLoop - () - ((Var 210 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 65536 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 65535 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ArrayItem - (Var 210 observed1d) - [(() - (Var 210 i) - ())] - (Real 4) - RowMajor - () - ) - Sub - (Cast - (RealConstant - 1.000000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 1.000000 - (Real 4) - ) - ) - (Real 4) - () - )] - 0 - (Real 4) - () - ) - LtE - (Var 210 eps) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ), - sin: - (ExternalSymbol - 2 - sin - 3 sin - numpy - [] - sin - Public - ), - verify1d: - (Function - (SymbolTable - 201 - { - array: - (Variable - 201 - array - [] - InOut - () - () - Default - (Array - (Real 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - block: - (Block - (SymbolTable - 211 - { - sin@__lpython_overloaded_1__sin: - (ExternalSymbol - 211 - sin@__lpython_overloaded_1__sin - 3 __lpython_overloaded_1__sin - numpy - [] - __lpython_overloaded_1__sin - Public - ) - }) - block - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 211 sin@__lpython_overloaded_1__sin - 2 sin - [((FunctionCall - 211 sin@__lpython_overloaded_1__sin - 2 sin - [((ArrayItem - (Var 201 array) - [(() - (Var 201 i) - ())] - (Real 4) - RowMajor - () - ))] - (Real 4) - () - () - ))] - (Real 4) - () - () - ) - Sub - (ArrayItem - (Var 201 result) - [(() - (Var 201 i) - ())] - (Real 4) - RowMajor - () - ) - (Real 4) - () - )] - 0 - (Real 4) - () - ) - LtE - (Var 201 eps) - (Logical 4) - () - ) - () - )] - ), - eps: - (Variable - 201 - eps - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - i: - (Variable - 201 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - result: - (Variable - 201 - result - [] - InOut - () - () - Default - (Array - (Real 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - size: - (Variable - 201 - size - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - verify1d - (FunctionType - [(Array - (Real 4) - [(() - ())] - DescriptorArray - ) - (Array - (Real 4) - [(() - ())] - DescriptorArray - ) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [sin@__lpython_overloaded_1__sin] - [(Var 201 array) - (Var 201 result) - (Var 201 size)] - [(= - (Var 201 eps) - (Cast - (RealConstant - 0.000001 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 0.000001 - (Real 4) - ) - ) - () - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 201 size) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 201 block - )] - )] - () - Public - .false. - .false. - () - ), - verify1d_mul: - (Function - (SymbolTable - 205 - { - array_a: - (Variable - 205 - array_a - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - array_b: - (Variable - 205 - array_b - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 205 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 205 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - result: - (Variable - 205 - result - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - size: - (Variable - 205 - size - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - verify1d_mul - (FunctionType - [(Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 205 array_a) - (Var 205 array_b) - (Var 205 result) - (Var 205 size)] - [(= - (Var 205 eps) - (RealConstant - 0.000010 - (Real 8) - ) - () - ) - (DoLoop - () - ((Var 205 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 205 size) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (RealBinOp - (RealBinOp - (ArrayItem - (Var 205 array_a) - [(() - (Var 205 i) - ())] - (Real 8) - RowMajor - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - ) - Mul - (RealConstant - 5.000000 - (Real 8) - ) - (Real 8) - () - ) - Mul - (RealBinOp - (ArrayItem - (Var 205 array_b) - [(() - (Var 205 i) - ())] - (Real 8) - RowMajor - () - ) - Pow - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (ArrayItem - (Var 205 result) - [(() - (Var 205 i) - ())] - (Real 8) - RowMajor - () - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 205 eps) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ), - verify1d_sum: - (Function - (SymbolTable - 204 - { - array_a: - (Variable - 204 - array_a - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - array_b: - (Variable - 204 - array_b - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 204 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 204 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - result: - (Variable - 204 - result - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - size: - (Variable - 204 - size - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - verify1d_sum - (FunctionType - [(Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 204 array_a) - (Var 204 array_b) - (Var 204 result) - (Var 204 size)] - [(= - (Var 204 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (DoLoop - () - ((Var 204 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 204 size) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (RealBinOp - (ArrayItem - (Var 204 array_a) - [(() - (Var 204 i) - ())] - (Real 8) - RowMajor - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - ) - Add - (RealBinOp - (RealConstant - 5.000000 - (Real 8) - ) - Mul - (RealBinOp - (ArrayItem - (Var 204 array_b) - [(() - (Var 204 i) - ())] - (Real 8) - RowMajor - () - ) - Pow - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - () - ) - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (ArrayItem - (Var 204 result) - [(() - (Var 204 i) - ())] - (Real 8) - RowMajor - () - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 204 eps) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ), - verify2d: - (Function - (SymbolTable - 203 - { - array: - (Variable - 203 - array - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - block: - (Block - (SymbolTable - 215 - { - block: - (Block - (SymbolTable - 216 - { - cos@__lpython_overloaded_0__cos: - (ExternalSymbol - 216 - cos@__lpython_overloaded_0__cos - 3 __lpython_overloaded_0__cos - numpy - [] - __lpython_overloaded_0__cos - Public - ) - }) - block - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (FunctionCall - 216 cos@__lpython_overloaded_0__cos - 2 cos - [((ArrayItem - (Var 203 array) - [(() - (Var 203 i) - ()) - (() - (Var 203 j) - ())] - (Real 8) - RowMajor - () - ))] - (Real 8) - () - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - ) - Sub - (ArrayItem - (Var 203 result) - [(() - (Var 203 i) - ()) - (() - (Var 203 j) - ())] - (Real 8) - RowMajor - () - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 203 eps) - (Logical 4) - () - ) - () - )] - ) - }) - block - [(DoLoop - () - ((Var 203 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 203 size2) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 215 block - )] - )] - ), - eps: - (Variable - 203 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 203 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 203 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - result: - (Variable - 203 - result - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - size1: - (Variable - 203 - size1 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - size2: - (Variable - 203 - size2 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - verify2d - (FunctionType - [(Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - (Integer 4) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [cos@__lpython_overloaded_0__cos] - [(Var 203 array) - (Var 203 result) - (Var 203 size1) - (Var 203 size2)] - [(= - (Var 203 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (DoLoop - () - ((Var 203 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 203 size1) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 203 block - )] - )] - () - Public - .false. - .false. - () - ), - verifynd: - (Function - (SymbolTable - 202 - { - array: - (Variable - 202 - array - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - block: - (Block - (SymbolTable - 212 - { - block: - (Block - (SymbolTable - 213 - { - block: - (Block - (SymbolTable - 214 - { - sin@__lpython_overloaded_0__sin: - (ExternalSymbol - 214 - sin@__lpython_overloaded_0__sin - 3 __lpython_overloaded_0__sin - numpy - [] - __lpython_overloaded_0__sin - Public - ) - }) - block - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (FunctionCall - 214 sin@__lpython_overloaded_0__sin - 2 sin - [((ArrayItem - (Var 202 array) - [(() - (Var 202 i) - ()) - (() - (Var 202 j) - ()) - (() - (Var 202 k) - ())] - (Real 8) - RowMajor - () - ))] - (Real 8) - () - () - ) - Pow - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - ) - Sub - (ArrayItem - (Var 202 result) - [(() - (Var 202 i) - ()) - (() - (Var 202 j) - ()) - (() - (Var 202 k) - ())] - (Real 8) - RowMajor - () - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 202 eps) - (Logical 4) - () - ) - () - )] - ) - }) - block - [(DoLoop - () - ((Var 202 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 202 size3) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 213 block - )] - )] - ) - }) - block - [(DoLoop - () - ((Var 202 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 202 size2) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 212 block - )] - )] - ), - eps: - (Variable - 202 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 202 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 202 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 202 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - result: - (Variable - 202 - result - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - size1: - (Variable - 202 - size1 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - size2: - (Variable - 202 - size2 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - size3: - (Variable - 202 - size3 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - verifynd - (FunctionType - [(Array - (Real 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - ) - (Array - (Real 8) - [(() - ()) - (() - ()) - (() - ())] - DescriptorArray - ) - (Integer 4) - (Integer 4) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [sin@__lpython_overloaded_0__sin] - [(Var 202 array) - (Var 202 result) - (Var 202 size1) - (Var 202 size2) - (Var 202 size3)] - [(= - (Var 202 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (DoLoop - () - ((Var 202 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 202 size1) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(BlockCall - -1 - 202 block - )] - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 235 - { - __main__global_stmts: - (ExternalSymbol - 235 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 235 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-expr10-efcbb1b.stdout b/tests/reference/asr-expr10-efcbb1b.stdout deleted file mode 100644 index d0c6534e4e..0000000000 --- a/tests/reference/asr-expr10-efcbb1b.stdout +++ /dev/null @@ -1,453 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - test_UnaryOp: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b1: - (Variable - 3 - b1 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b2: - (Variable - 3 - b2 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b3: - (Variable - 3 - b3 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 3 - c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 3 - complex - 4 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_13__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_13__complex - 4 __lpython_overloaded_13__complex - lpython_builtin - [] - __lpython_overloaded_13__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 4 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ), - f: - (Variable - 3 - f - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ) - }) - test_UnaryOp - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_13__complex] - [] - [(= - (Var 3 a) - (IntegerConstant 4 (Integer 4)) - () - ) - (= - (Var 3 a) - (IntegerUnaryMinus - (IntegerConstant 500 (Integer 4)) - (Integer 4) - (IntegerConstant -500 (Integer 4)) - ) - () - ) - (= - (Var 3 a) - (IntegerBitNot - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -6 (Integer 4)) - ) - () - ) - (= - (Var 3 b) - (LogicalNot - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 b) - (LogicalNot - (Cast - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - IntegerToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 b) - (LogicalNot - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 f) - (RealConstant - 1.000000 - (Real 4) - ) - () - ) - (= - (Var 3 f) - (RealUnaryMinus - (Cast - (RealConstant - 183745.534000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 183745.534000 - (Real 4) - ) - ) - (Real 4) - (RealConstant - -183745.534000 - (Real 4) - ) - ) - () - ) - (= - (Var 3 b1) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (= - (Var 3 b2) - (LogicalNot - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 b3) - (LogicalNot - (Var 3 b2) - (Logical 4) - () - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 1 (Integer 4)) - () - ) - (= - (Var 3 a) - (IntegerUnaryMinus - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - (IntegerConstant 0 (Integer 4)) - ) - (Integer 4) - (IntegerConstant 0 (Integer 4)) - ) - () - ) - (= - (Var 3 a) - (IntegerBitNot - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - (IntegerConstant -2 (Integer 4)) - ) - (Integer 4) - (IntegerConstant -2 (Integer 4)) - ) - () - ) - (= - (Var 3 c) - (ComplexConstant - 1.000000 - 2.000000 - (Complex 4) - ) - () - ) - (= - (Var 3 c) - (ComplexUnaryMinus - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_13__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((RealConstant - 65.000000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.000000 - 65.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 3.000000 - 65.000000 - (Complex 4) - ) - ) - (Complex 4) - (ComplexConstant - -3.000000 - -65.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 b1) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (= - (Var 3 b2) - (LogicalConstant - .true. - (Logical 4) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 119 - { - - }) - main_program - [] - [] - ) - }) - [] -) diff --git a/tests/reference/asr-expr13-81bdb5a.stdout b/tests/reference/asr-expr13-81bdb5a.stdout deleted file mode 100644 index f6376d2e47..0000000000 --- a/tests/reference/asr-expr13-81bdb5a.stdout +++ /dev/null @@ -1,473 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - test_Compare: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 3 - complex - 4 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_5__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_5__complex - 4 __lpython_overloaded_5__complex - lpython_builtin - [] - __lpython_overloaded_5__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 4 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ) - }) - test_Compare - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_5__complex] - [] - [(= - (Var 3 a) - (IntegerCompare - (IntegerConstant 5 (Integer 4)) - Gt - (IntegerConstant 4 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (IntegerCompare - (IntegerConstant 5 (Integer 4)) - LtE - (IntegerConstant 4 (Integer 4)) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (IntegerCompare - (IntegerConstant 5 (Integer 4)) - Lt - (IntegerConstant 4 (Integer 4)) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (RealCompare - (RealConstant - 5.600000 - (Real 8) - ) - GtE - (RealConstant - 5.599990 - (Real 8) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (RealCompare - (RealConstant - 3.300000 - (Real 8) - ) - Eq - (RealConstant - 3.300000 - (Real 8) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (RealCompare - (RealConstant - 3.300000 - (Real 8) - ) - NotEq - (RealConstant - 3.400000 - (Real 8) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (ComplexCompare - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 4 (Integer 4)))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - Eq - (FunctionCall - 3 complex@__lpython_overloaded_5__complex - 3 complex - [((RealConstant - 3.000000 - (Real 8) - )) - ((RealConstant - 4.000000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "abc" - (Character 1 3 ()) - ) - Gt - (StringConstant - "abd" - (Character 1 3 ()) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "" - (Character 1 0 ()) - ) - Lt - (StringConstant - "s" - (Character 1 1 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "-abs" - (Character 1 4 ()) - ) - GtE - (StringConstant - "abs" - (Character 1 3 ()) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "abcd" - (Character 1 4 ()) - ) - LtE - (StringConstant - "abcde" - (Character 1 5 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "abc" - (Character 1 3 ()) - ) - Eq - (StringConstant - "abc" - (Character 1 3 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "abc" - (Character 1 3 ()) - ) - NotEq - (StringConstant - "abd" - (Character 1 3 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (StringCompare - (StringConstant - "" - (Character 1 0 ()) - ) - Eq - (StringConstant - "+" - (Character 1 1 ()) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (LogicalCompare - (LogicalConstant - .true. - (Logical 4) - ) - Gt - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (LogicalCompare - (LogicalConstant - .true. - (Logical 4) - ) - Eq - (LogicalConstant - .true. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (LogicalCompare - (LogicalConstant - .false. - (Logical 4) - ) - NotEq - (LogicalConstant - .true. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a) - (LogicalCompare - (LogicalConstant - .false. - (Logical 4) - ) - GtE - (LogicalConstant - .true. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 119 - { - - }) - main_program - [] - [] - ) - }) - [] -) diff --git a/tests/reference/asr-expr7-480ba2f.stdout b/tests/reference/asr-expr7-480ba2f.stdout deleted file mode 100644 index 1b16413d18..0000000000 --- a/tests/reference/asr-expr7-480ba2f.stdout +++ /dev/null @@ -1,371 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 121 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [main0] - [] - [(SubroutineCall - 2 main0 - () - [] - () - )] - () - Public - .false. - .false. - () - ), - main0: - (Function - (SymbolTable - 5 - { - c: - (Variable - 5 - c - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - main0 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_pow - test_pow_1] - [] - [(SubroutineCall - 2 test_pow - () - [] - () - ) - (= - (Var 5 c) - (FunctionCall - 2 test_pow_1 - () - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Integer 4) - () - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_pow: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - pow: - (ExternalSymbol - 3 - pow - 6 pow - lpython_builtin - [] - pow - Private - ), - pow@__lpython_overloaded_0__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_0__pow - 6 __lpython_overloaded_0__pow - lpython_builtin - [] - __lpython_overloaded_0__pow - Public - ) - }) - test_pow - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [pow@__lpython_overloaded_0__pow] - [] - [(= - (Var 3 a) - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((IntegerConstant 2 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Real 8) - (RealConstant - 4.000000 - (Real 8) - ) - () - ) - RealToInteger - (Integer 4) - (IntegerConstant 4 (Integer 4)) - ) - () - )] - () - Public - .false. - .false. - () - ), - test_pow_1: - (Function - (SymbolTable - 4 - { - _lpython_return_variable: - (Variable - 4 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - a: - (Variable - 4 - a - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 4 - b - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - pow: - (ExternalSymbol - 4 - pow - 6 pow - lpython_builtin - [] - pow - Private - ), - pow@__lpython_overloaded_0__pow: - (ExternalSymbol - 4 - pow@__lpython_overloaded_0__pow - 6 __lpython_overloaded_0__pow - lpython_builtin - [] - __lpython_overloaded_0__pow - Public - ), - res: - (Variable - 4 - res - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_pow_1 - (FunctionType - [(Integer 4) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [pow@__lpython_overloaded_0__pow] - [(Var 4 a) - (Var 4 b)] - [(= - (Var 4 res) - (Cast - (FunctionCall - 4 pow@__lpython_overloaded_0__pow - 4 pow - [((Var 4 a)) - ((Var 4 b))] - (Real 8) - () - () - ) - RealToInteger - (Integer 4) - () - ) - () - ) - (= - (Var 4 _lpython_return_variable) - (Var 4 res) - () - ) - (Return)] - (Var 4 _lpython_return_variable) - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 122 - { - __main__global_stmts: - (ExternalSymbol - 122 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 122 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-expr8-6beda60.stdout b/tests/reference/asr-expr8-6beda60.stdout deleted file mode 100644 index cda03a79a5..0000000000 --- a/tests/reference/asr-expr8-6beda60.stdout +++ /dev/null @@ -1,430 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - test_binop: - (Function - (SymbolTable - 3 - { - b1: - (Variable - 3 - b1 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b2: - (Variable - 3 - b2 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 3 - x - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - x2: - (Variable - 3 - x2 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ) - }) - test_binop - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 3 x) - (IntegerBinOp - (IntegerConstant 2 (Integer 4)) - Pow - (IntegerConstant 3 (Integer 4)) - (Integer 4) - (IntegerConstant 8 (Integer 4)) - ) - () - ) - (= - (Var 3 x2) - (Cast - (RealBinOp - (RealConstant - 2.000000 - (Real 8) - ) - Pow - (RealConstant - 3.500000 - (Real 8) - ) - (Real 8) - (RealConstant - 11.313708 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 11.313708 - (Real 4) - ) - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (IntegerConstant 54 (Integer 4)) - Sub - (IntegerConstant 100 (Integer 4)) - (Integer 4) - (IntegerConstant -46 (Integer 4)) - ) - () - ) - (= - (Var 3 x2) - (Cast - (RealBinOp - (RealBinOp - (RealConstant - 3.454000 - (Real 8) - ) - Sub - (RealConstant - 765.430000 - (Real 8) - ) - (Real 8) - (RealConstant - -761.976000 - (Real 8) - ) - ) - Add - (RealConstant - 534.600000 - (Real 8) - ) - (Real 8) - (RealConstant - -227.376000 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - -227.376000 - (Real 4) - ) - ) - () - ) - (= - (Var 3 x2) - (Cast - (RealBinOp - (RealConstant - 5346.565000 - (Real 8) - ) - Mul - (RealConstant - 3.450000 - (Real 8) - ) - (Real 8) - (RealConstant - 18445.649250 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 18445.649250 - (Real 4) - ) - ) - () - ) - (= - (Var 3 x2) - (Cast - (RealBinOp - (RealConstant - 5346.565000 - (Real 8) - ) - Pow - (RealConstant - 3.450000 - (Real 8) - ) - (Real 8) - (RealConstant - 7275422789925.217773 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 7275422789925.217773 - (Real 4) - ) - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Add - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Sub - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Mul - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Pow - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (Var 3 b1) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (= - (Var 3 b2) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (= - (Var 3 x) - (Cast - (IntrinsicScalarFunction - FloorDiv - [(Var 3 b1) - (Var 3 b1)] - 0 - (Logical 4) - () - ) - LogicalToInteger - (Integer 4) - () - ) - () - ) - (= - (Var 3 x) - (IntegerBinOp - (Cast - (Var 3 b1) - LogicalToInteger - (Integer 4) - () - ) - Pow - (Cast - (Var 3 b2) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [] - .false. - .false. - ), - main_program: - (Program - (SymbolTable - 4 - { - - }) - main_program - [] - [] - ) - }) - [] -) diff --git a/tests/reference/asr-expr_05-3a37324.stdout b/tests/reference/asr-expr_05-3a37324.stdout deleted file mode 100644 index 05fb00b886..0000000000 --- a/tests/reference/asr-expr_05-3a37324.stdout +++ /dev/null @@ -1,1642 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 121 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [main0] - [] - [(SubroutineCall - 2 main0 - () - [] - () - )] - () - Public - .false. - .false. - () - ), - main0: - (Function - (SymbolTable - 5 - { - _mod: - (ExternalSymbol - 5 - _mod - 6 _mod - lpython_builtin - [] - _mod - Private - ), - _mod@__lpython_overloaded_2___mod: - (ExternalSymbol - 5 - _mod@__lpython_overloaded_2___mod - 6 __lpython_overloaded_2___mod - lpython_builtin - [] - __lpython_overloaded_2___mod - Public - ), - _mod@__lpython_overloaded_4___mod: - (ExternalSymbol - 5 - _mod@__lpython_overloaded_4___mod - 6 __lpython_overloaded_4___mod - lpython_builtin - [] - __lpython_overloaded_4___mod - Public - ), - _mod@__lpython_overloaded_9___mod: - (ExternalSymbol - 5 - _mod@__lpython_overloaded_9___mod - 6 __lpython_overloaded_9___mod - lpython_builtin - [] - __lpython_overloaded_9___mod - Public - ), - a: - (Variable - 5 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - a1: - (Variable - 5 - a1 - [] - Local - () - () - Default - (UnsignedInteger - 2 - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 5 - b - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b1: - (Variable - 5 - b1 - [] - Local - () - () - Default - (UnsignedInteger - 2 - ) - () - Source - Public - Required - .false. - ), - c1: - (Variable - 5 - c1 - [] - Local - () - () - Default - (UnsignedInteger - 2 - ) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 5 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 5 - i - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - i1: - (Variable - 5 - i1 - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i2: - (Variable - 5 - i2 - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i3: - (Variable - 5 - i3 - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i4: - (Variable - 5 - i4 - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - main0 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_multiply - test_mod - _mod@__lpython_overloaded_2___mod - _mod@__lpython_overloaded_9___mod - _mod@__lpython_overloaded_4___mod] - [] - [(= - (Var 5 a) - (IntegerConstant 10 (Integer 4)) - () - ) - (= - (Var 5 b) - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - () - ) - (= - (Var 5 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 2 test_multiply - () - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 50 (Integer 4)) - (Integer 4) - (IntegerConstant -50 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 i) - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 1 (Integer 8)) - ) - () - ) - (= - (Var 5 i) - (IntegerBinOp - (Var 5 i) - Add - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 1 (Integer 8)) - ) - (Integer 8) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 i) - Eq - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 5 b) - (IntegerConstant 5 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 2 test_mod - () - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 2 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 2 test_mod - () - [((IntegerConstant 23 (Integer 4))) - ((IntegerConstant 3 (Integer 4)))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 2 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerConstant 123282374 (Integer 4)) - () - ) - (= - (Var 5 b) - (IntegerConstant 32771 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 2 test_mod - () - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 30643 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerUnaryMinus - (IntegerConstant 5345 (Integer 4)) - (Integer 4) - (IntegerConstant -5345 (Integer 4)) - ) - () - ) - (= - (Var 5 b) - (IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 5 _mod@__lpython_overloaded_2___mod - 5 _mod - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerUnaryMinus - (IntegerConstant 123282374 (Integer 4)) - (Integer 4) - (IntegerConstant -123282374 (Integer 4)) - ) - () - ) - (= - (Var 5 b) - (IntegerConstant 32771 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 2 test_mod - () - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 2128 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerConstant 10 (Integer 4)) - BitOr - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant 14 (Integer 4)) - ) - Eq - (IntegerConstant 14 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (IntegerConstant 105346 (Integer 4)) - (Integer 4) - (IntegerConstant -105346 (Integer 4)) - ) - BitOr - (IntegerUnaryMinus - (IntegerConstant 32771 (Integer 4)) - (Integer 4) - (IntegerConstant -32771 (Integer 4)) - ) - (Integer 4) - (IntegerConstant -32769 (Integer 4)) - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 32769 (Integer 4)) - (Integer 4) - (IntegerConstant -32769 (Integer 4)) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerConstant 10 (Integer 4)) - BitAnd - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant 0 (Integer 4)) - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (IntegerConstant 105346 (Integer 4)) - (Integer 4) - (IntegerConstant -105346 (Integer 4)) - ) - BitAnd - (IntegerUnaryMinus - (IntegerConstant 32771 (Integer 4)) - (Integer 4) - (IntegerConstant -32771 (Integer 4)) - ) - (Integer 4) - (IntegerConstant -105348 (Integer 4)) - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 105348 (Integer 4)) - (Integer 4) - (IntegerConstant -105348 (Integer 4)) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerConstant 10 (Integer 4)) - BitXor - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant 14 (Integer 4)) - ) - Eq - (IntegerConstant 14 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (IntegerConstant 105346 (Integer 4)) - (Integer 4) - (IntegerConstant -105346 (Integer 4)) - ) - BitXor - (IntegerUnaryMinus - (IntegerConstant 32771 (Integer 4)) - (Integer 4) - (IntegerConstant -32771 (Integer 4)) - ) - (Integer 4) - (IntegerConstant 72579 (Integer 4)) - ) - Eq - (IntegerConstant 72579 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerConstant 10 (Integer 4)) - BitRShift - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 5 (Integer 4)) - ) - Eq - (IntegerConstant 5 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerConstant 5 (Integer 4)) - BitLShift - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 10 (Integer 4)) - ) - Eq - (IntegerConstant 10 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 5 i1) - (IntegerConstant 10 (Integer 4)) - () - ) - (= - (Var 5 i2) - (IntegerConstant 4 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i1) - BitLShift - (Var 5 i2) - (Integer 4) - () - ) - Eq - (IntegerConstant 160 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i1) - BitRShift - (Var 5 i2) - (Integer 4) - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i1) - BitAnd - (Var 5 i2) - (Integer 4) - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i1) - BitOr - (Var 5 i2) - (Integer 4) - () - ) - Eq - (IntegerConstant 14 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i1) - BitXor - (Var 5 i2) - (Integer 4) - () - ) - Eq - (IntegerConstant 14 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (Var 5 i1) - (Integer 4) - () - ) - BitXor - (IntegerUnaryMinus - (Var 5 i2) - (Integer 4) - () - ) - (Integer 4) - () - ) - Eq - (IntegerConstant 10 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 i3) - (IntegerConstant 432534534 (Integer 4)) - () - ) - (= - (Var 5 i4) - (IntegerUnaryMinus - (IntegerConstant 4325 (Integer 4)) - (Integer 4) - (IntegerConstant -4325 (Integer 4)) - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i3) - BitOr - (Var 5 i4) - (Integer 4) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 225 (Integer 4)) - (Integer 4) - (IntegerConstant -225 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (Var 5 i4) - BitRShift - (IntegerConstant 3 (Integer 4)) - (Integer 4) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 541 (Integer 4)) - (Integer 4) - (IntegerConstant -541 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (Var 5 i3) - (Integer 4) - () - ) - BitAnd - (Var 5 i4) - (Integer 4) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 432534758 (Integer 4)) - (Integer 4) - (IntegerConstant -432534758 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntegerBinOp - (IntegerUnaryMinus - (Var 5 i3) - (Integer 4) - () - ) - BitXor - (Var 5 i4) - (Integer 4) - () - ) - Eq - (IntegerConstant 432530657 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerConstant 10 (Integer 4)) - () - ) - (= - (Var 5 a) - (IntegerBinOp - (Var 5 a) - BitOr - (IntegerConstant 4 (Integer 4)) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 14 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerBinOp - (Var 5 a) - BitXor - (IntegerConstant 3 (Integer 4)) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 13 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 b) - (IntegerConstant 10 (Integer 4)) - () - ) - (= - (Var 5 a) - (FunctionCall - 5 _mod@__lpython_overloaded_2___mod - 5 _mod - [((Var 5 a)) - ((Var 5 b))] - (Integer 4) - () - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 3 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 b) - (IntegerConstant 4 (Integer 4)) - () - ) - (= - (Var 5 a) - (IntegerBinOp - (Var 5 a) - BitLShift - (Var 5 b) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 48 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerBinOp - (Var 5 a) - BitRShift - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 24 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a) - (IntegerBinOp - (Var 5 a) - BitAnd - (Var 5 b) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 a) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 5 b) - (IntegerBinOp - (Var 5 b) - Pow - (IntegerConstant 4 (Integer 4)) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 5 b) - Eq - (IntegerConstant 256 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 5 _mod@__lpython_overloaded_2___mod - 5 _mod - [((IntegerUnaryMinus - (IntegerConstant 8 (Integer 4)) - (Integer 4) - (IntegerConstant -8 (Integer 4)) - )) - ((IntegerConstant 3 (Integer 4)))] - (Integer 4) - (IntegerConstant 1 (Integer 4)) - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 5 _mod@__lpython_overloaded_2___mod - 5 _mod - [((IntegerConstant 8 (Integer 4))) - ((IntegerUnaryMinus - (IntegerConstant 3 (Integer 4)) - (Integer 4) - (IntegerConstant -3 (Integer 4)) - ))] - (Integer 4) - (IntegerConstant -1 (Integer 4)) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 5 _mod@__lpython_overloaded_2___mod - 5 _mod - [((IntegerUnaryMinus - (IntegerConstant 8 (Integer 4)) - (Integer 4) - (IntegerConstant -8 (Integer 4)) - )) - ((IntegerUnaryMinus - (IntegerConstant 3 (Integer 4)) - (Integer 4) - (IntegerConstant -3 (Integer 4)) - ))] - (Integer 4) - (IntegerConstant -2 (Integer 4)) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 2 (Integer 4)) - (Integer 4) - (IntegerConstant -2 (Integer 4)) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 5 _mod@__lpython_overloaded_9___mod - 5 _mod - [((RealConstant - 11.000000 - (Real 8) - )) - ((RealUnaryMinus - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -3.000000 - (Real 8) - ) - ))] - (Real 8) - (RealConstant - -1.000000 - (Real 8) - ) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 1.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -1.000000 - (Real 8) - ) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 5 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 5 _mod@__lpython_overloaded_9___mod - 5 _mod - [((RealUnaryMinus - (RealConstant - 11.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -11.000000 - (Real 8) - ) - )) - ((RealConstant - 3.000000 - (Real 8) - ))] - (Real 8) - (RealConstant - 1.000000 - (Real 8) - ) - () - ) - Sub - (RealConstant - 1.000000 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 5 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 5 a1) - (Cast - (IntegerConstant 10 (Integer 4)) - IntegerToUnsignedInteger - (UnsignedInteger - 2 - ) - (UnsignedIntegerConstant - 10 - (UnsignedInteger - 2 - ) - ) - ) - () - ) - (= - (Var 5 b1) - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToUnsignedInteger - (UnsignedInteger - 2 - ) - (UnsignedIntegerConstant - 3 - (UnsignedInteger - 2 - ) - ) - ) - () - ) - (= - (Var 5 c1) - (FunctionCall - 5 _mod@__lpython_overloaded_4___mod - 5 _mod - [((Var 5 a1)) - ((Var 5 b1))] - (UnsignedInteger - 2 - ) - () - () - ) - () - ) - (Assert - (UnsignedIntegerCompare - (Var 5 c1) - Eq - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToUnsignedInteger - (UnsignedInteger - 2 - ) - (UnsignedIntegerConstant - 1 - (UnsignedInteger - 2 - ) - ) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 c1) - (IntrinsicScalarFunction - FloorDiv - [(Var 5 a1) - (Var 5 b1)] - 0 - (UnsignedInteger - 2 - ) - () - ) - () - ) - (Assert - (UnsignedIntegerCompare - (Var 5 c1) - Eq - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToUnsignedInteger - (UnsignedInteger - 2 - ) - (UnsignedIntegerConstant - 3 - (UnsignedInteger - 2 - ) - ) - ) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_mod: - (Function - (SymbolTable - 4 - { - _lpython_return_variable: - (Variable - 4 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - _mod: - (ExternalSymbol - 4 - _mod - 6 _mod - lpython_builtin - [] - _mod - Private - ), - _mod@__lpython_overloaded_2___mod: - (ExternalSymbol - 4 - _mod@__lpython_overloaded_2___mod - 6 __lpython_overloaded_2___mod - lpython_builtin - [] - __lpython_overloaded_2___mod - Public - ), - a: - (Variable - 4 - a - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 4 - b - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_mod - (FunctionType - [(Integer 4) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [_mod@__lpython_overloaded_2___mod] - [(Var 4 a) - (Var 4 b)] - [(= - (Var 4 _lpython_return_variable) - (FunctionCall - 4 _mod@__lpython_overloaded_2___mod - 4 _mod - [((Var 4 a)) - ((Var 4 b))] - (Integer 4) - () - () - ) - () - ) - (Return)] - (Var 4 _lpython_return_variable) - Public - .false. - .false. - () - ), - test_multiply: - (Function - (SymbolTable - 3 - { - _lpython_return_variable: - (Variable - 3 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - a: - (Variable - 3 - a - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_multiply - (FunctionType - [(Integer 4) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 3 a) - (Var 3 b)] - [(= - (Var 3 _lpython_return_variable) - (IntegerBinOp - (Var 3 a) - Mul - (Var 3 b) - (Integer 4) - () - ) - () - ) - (Return)] - (Var 3 _lpython_return_variable) - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 122 - { - __main__global_stmts: - (ExternalSymbol - 122 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 122 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-generics_array_01-682b1b2.stdout b/tests/reference/asr-generics_array_01-682b1b2.stdout deleted file mode 100644 index a74477dc35..0000000000 --- a/tests/reference/asr-generics_array_01-682b1b2.stdout +++ /dev/null @@ -1,459 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - T: - (Variable - 2 - T - [] - Local - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - __asr_generic_f_0: - (Function - (SymbolTable - 203 - { - _lpython_return_variable: - (Variable - 203 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i: - (Variable - 203 - i - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - lst: - (Variable - 203 - lst - [] - InOut - () - () - Default - (Array - (Integer 4) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - __asr_generic_f_0 - (FunctionType - [(Array - (Integer 4) - [(() - ())] - DescriptorArray - ) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 lst) - (Var 203 i)] - [(= - (ArrayItem - (Var 203 lst) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (Var 203 i) - () - ) - (= - (Var 203 _lpython_return_variable) - (ArrayItem - (Var 203 lst) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - () - ) - (Return)] - (Var 203 _lpython_return_variable) - Public - .false. - .false. - () - ), - __main__global_stmts: - (Function - (SymbolTable - 204 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [use_array] - [] - [(SubroutineCall - 2 use_array - () - [] - () - )] - () - Public - .false. - .false. - () - ), - f: - (Function - (SymbolTable - 201 - { - _lpython_return_variable: - (Variable - 201 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 201 - i - [] - In - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - lst: - (Variable - 201 - lst - [] - InOut - () - () - Default - (Array - (TypeParameter - T - ) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - f - (FunctionType - [(Array - (TypeParameter - T - ) - [(() - ())] - DescriptorArray - ) - (TypeParameter - T - )] - (TypeParameter - T - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 201 lst) - (Var 201 i)] - [(= - (ArrayItem - (Var 201 lst) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (TypeParameter - T - ) - RowMajor - () - ) - (Var 201 i) - () - ) - (= - (Var 201 _lpython_return_variable) - (ArrayItem - (Var 201 lst) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (TypeParameter - T - ) - RowMajor - () - ) - () - ) - (Return)] - (Var 201 _lpython_return_variable) - Public - .false. - .false. - () - ), - use_array: - (Function - (SymbolTable - 202 - { - array: - (Variable - 202 - array - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - x: - (Variable - 202 - x - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - use_array - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [__asr_generic_f_0] - [] - [(= - (Var 202 array) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 202 x) - (IntegerConstant 69 (Integer 4)) - () - ) - (Print - () - [(FunctionCall - 2 __asr_generic_f_0 - () - [((ArrayPhysicalCast - (Var 202 array) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - DescriptorArray - ) - () - )) - ((Var 202 x))] - (Integer 4) - () - () - )] - () - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 205 - { - __main__global_stmts: - (ExternalSymbol - 205 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 205 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-generics_array_02-22c8dc1.stdout b/tests/reference/asr-generics_array_02-22c8dc1.stdout deleted file mode 100644 index 22b8883224..0000000000 --- a/tests/reference/asr-generics_array_02-22c8dc1.stdout +++ /dev/null @@ -1,1395 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - T: - (Variable - 2 - T - [] - Local - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - __asr_generic_g_0: - (Function - (SymbolTable -<<<<<<< HEAD - 220 -======= - 207 ->>>>>>> main - { - a: - (Variable - 207 - a - [n] - InOut - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 207 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 207 - b - [n] - InOut - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 207 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 207 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 207 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 207 - r - [n] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 207 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - __asr_generic_g_0 - (FunctionType - [(Integer 4) - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add_integer] - [(Var 207 n) - (Var 207 a) - (Var 207 b)] - [(= - (Var 207 r) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 207 n))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 207 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 207 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 207 r) - [(() - (Var 207 i) - ())] - (Integer 4) - RowMajor - () - ) - (FunctionCall - 2 add_integer - () - [((ArrayItem - (Var 207 a) - [(() - (Var 207 i) - ())] - (Integer 4) - RowMajor - () - )) - ((ArrayItem - (Var 207 b) - [(() - (Var 207 i) - ())] - (Integer 4) - RowMajor - () - ))] - (Integer 4) - () - () - ) - () - )] - ) - (Print - () - [(ArrayItem - (Var 207 r) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - )] - () - () - )] - () - Public - .false. - .false. - () - ), - __asr_generic_g_1: - (Function - (SymbolTable - 208 - { - a: - (Variable - 208 - a - [n] - InOut - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 208 - b - [n] - InOut - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 208 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 208 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 208 - r - [n] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - __asr_generic_g_1 - (FunctionType - [(Integer 4) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add_float] - [(Var 208 n) - (Var 208 a) - (Var 208 b)] - [(= - (Var 208 r) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 208 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 208 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 208 r) - [(() - (Var 208 i) - ())] - (Real 4) - RowMajor - () - ) - (FunctionCall - 2 add_float - () - [((ArrayItem - (Var 208 a) - [(() - (Var 208 i) - ())] - (Real 4) - RowMajor - () - )) - ((ArrayItem - (Var 208 b) - [(() - (Var 208 i) - ())] - (Real 4) - RowMajor - () - ))] - (Real 4) - () - () - ) - () - )] - ) - (Print - () - [(ArrayItem - (Var 208 r) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - )] - () - () - )] - () - Public - .false. - .false. - () - ), - __main__global_stmts: - (Function - (SymbolTable - 209 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [main] - [] - [(SubroutineCall - 2 main - () - [] - () - )] - () - Public - .false. - .false. - () - ), - add: - (Function - (SymbolTable - 201 - { - _lpython_return_variable: - (Variable - 201 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - x: - (Variable - 201 - x - [] - In - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - y: - (Variable - 201 - y - [] - In - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ) - }) - add - (FunctionType - [(TypeParameter - T - ) - (TypeParameter - T - )] - (TypeParameter - T - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .true. - ) - [] - [(Var 201 x) - (Var 201 y)] - [] - (Var 201 _lpython_return_variable) - Public - .false. - .false. - () - ), - add_float: - (Function - (SymbolTable - 203 - { - _lpython_return_variable: - (Variable - 203 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 203 - x - [] - In - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 203 - y - [] - In - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ) - }) - add_float - (FunctionType - [(Real 4) - (Real 4)] - (Real 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 x) - (Var 203 y)] - [(= - (Var 203 _lpython_return_variable) - (RealBinOp - (Var 203 x) - Add - (Var 203 y) - (Real 4) - () - ) - () - ) - (Return)] - (Var 203 _lpython_return_variable) - Public - .false. - .false. - () - ), - add_integer: - (Function - (SymbolTable - 202 - { - _lpython_return_variable: - (Variable - 202 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 202 - x - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 202 - y - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - add_integer - (FunctionType - [(Integer 4) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 x) - (Var 202 y)] - [(= - (Var 202 _lpython_return_variable) - (IntegerBinOp - (Var 202 x) - Add - (Var 202 y) - (Integer 4) - () - ) - () - ) - (Return)] - (Var 202 _lpython_return_variable) - Public - .false. - .false. - () - ), - g: - (Function - (SymbolTable - 204 - { - a: - (Variable - 204 - a - [n] - InOut - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 204 - b - [n] - InOut - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 204 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 204 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 204 - r - [n] - Local - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - g - (FunctionType - [(Integer 4) - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - ))] - PointerToDataArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add] - [(Var 204 n) - (Var 204 a) - (Var 204 b)] - [(= - (Var 204 r) - (ArrayConstant - [] - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 204 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 204 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 204 r) - [(() - (Var 204 i) - ())] - (TypeParameter - T - ) - RowMajor - () - ) - (FunctionCall - 2 add - () - [((ArrayItem - (Var 204 a) - [(() - (Var 204 i) - ())] - (TypeParameter - T - ) - RowMajor - () - )) - ((ArrayItem - (Var 204 b) - [(() - (Var 204 i) - ())] - (TypeParameter - T - ) - RowMajor - () - ))] - (TypeParameter - T - ) - () - () - ) - () - )] - ) - (Print - () - [(ArrayItem - (Var 204 r) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (TypeParameter - T - ) - RowMajor - () - )] - () - () - )] - () - Public - .false. - .false. - () - ), - main: - (Function - (SymbolTable - 205 - { - a_float: - (Variable - 205 - a_float - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - a_int: - (Variable - 205 - a_int - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b_float: - (Variable - 205 - b_float - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b_int: - (Variable - 205 - b_int - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - main - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [__asr_generic_g_0 - __asr_generic_g_1] - [] - [(= - (Var 205 a_int) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 a_int) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 400 (Integer 4)) - () - ) - (= - (Var 205 b_int) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 b_int) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 20 (Integer 4)) - () - ) - (SubroutineCall - 2 __asr_generic_g_0 - () - [((IntegerConstant 1 (Integer 4))) - ((ArrayPhysicalCast - (Var 205 a_int) - FixedSizeArray - PointerToDataArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - )) - ((ArrayPhysicalCast - (Var 205 b_int) - FixedSizeArray - PointerToDataArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - ))] - () - ) - (= - (Var 205 a_float) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 a_float) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (RealConstant - 400.000000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 400.000000 - (Real 4) - ) - ) - () - ) - (= - (Var 205 b_float) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 b_float) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (RealConstant - 20.000000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 20.000000 - (Real 4) - ) - ) - () - ) - (SubroutineCall - 2 __asr_generic_g_1 - () - [((IntegerConstant 1 (Integer 4))) - ((ArrayPhysicalCast - (Var 205 a_float) - FixedSizeArray - PointerToDataArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - )) - ((ArrayPhysicalCast - (Var 205 b_float) - FixedSizeArray - PointerToDataArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - ))] - () - )] - () - Public - .false. - .false. - () - ), - n: - (Variable - 2 - n - [] - Local - () - () - Default - (TypeParameter - n - ) - () - Source - Public - Required - .false. - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 210 - { - __main__global_stmts: - (ExternalSymbol - 210 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 210 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-generics_array_03-fb3706c.stdout b/tests/reference/asr-generics_array_03-fb3706c.stdout deleted file mode 100644 index ba718219e6..0000000000 --- a/tests/reference/asr-generics_array_03-fb3706c.stdout +++ /dev/null @@ -1,1880 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - T: - (Variable - 2 - T - [] - Local - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - __asr_generic_g_0: - (Function - (SymbolTable - 208 - { - _lpython_return_variable: - (Variable - 208 - _lpython_return_variable - [n - m] - ReturnVar - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 208 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - a: - (Variable - 208 - a - [n - m] - InOut - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 208 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 208 - b - [n - m] - InOut - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 208 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 208 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 208 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - m: - (Variable - 208 - m - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 208 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 208 - r - [n - m] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 208 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - __asr_generic_g_0 - (FunctionType - [(Integer 4) - (Integer 4) - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - )] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add_integer] - [(Var 208 n) - (Var 208 m) - (Var 208 a) - (Var 208 b)] - [(= - (Var 208 r) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (Var 208 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 208 m))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 208 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 208 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 208 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 208 m) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 208 r) - [(() - (Var 208 i) - ()) - (() - (Var 208 j) - ())] - (Integer 4) - RowMajor - () - ) - (FunctionCall - 2 add_integer - () - [((ArrayItem - (Var 208 a) - [(() - (Var 208 i) - ()) - (() - (Var 208 j) - ())] - (Integer 4) - RowMajor - () - )) - ((ArrayItem - (Var 208 b) - [(() - (Var 208 i) - ()) - (() - (Var 208 j) - ())] - (Integer 4) - RowMajor - () - ))] - (Integer 4) - () - () - ) - () - )] - )] - ) - (Print - () - [(ArrayItem - (Var 208 r) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - )] - () - () - )] - (Var 208 _lpython_return_variable) - Public - .false. - .false. - () - ), - __asr_generic_g_1: - (Function - (SymbolTable - 209 - { - _lpython_return_variable: - (Variable - 209 - _lpython_return_variable - [n - m] - ReturnVar - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 209 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 209 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - a: - (Variable - 209 - a - [n - m] - InOut - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 209 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 209 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 209 - b - [n - m] - InOut - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 209 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 209 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 209 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 209 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - m: - (Variable - 209 - m - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 209 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 209 - r - [n - m] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 209 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 209 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - __asr_generic_g_1 - (FunctionType - [(Integer 4) - (Integer 4) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - )] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add_float] - [(Var 209 n) - (Var 209 m) - (Var 209 a) - (Var 209 b)] - [(= - (Var 209 r) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (Var 209 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 209 m))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 209 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 209 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 209 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 209 m) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 209 r) - [(() - (Var 209 i) - ()) - (() - (Var 209 j) - ())] - (Real 4) - RowMajor - () - ) - (FunctionCall - 2 add_float - () - [((ArrayItem - (Var 209 a) - [(() - (Var 209 i) - ()) - (() - (Var 209 j) - ())] - (Real 4) - RowMajor - () - )) - ((ArrayItem - (Var 209 b) - [(() - (Var 209 i) - ()) - (() - (Var 209 j) - ())] - (Real 4) - RowMajor - () - ))] - (Real 4) - () - () - ) - () - )] - )] - ) - (Print - () - [(ArrayItem - (Var 209 r) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - )] - () - () - )] - (Var 209 _lpython_return_variable) - Public - .false. - .false. - () - ), - __main__global_stmts: - (Function - (SymbolTable - 210 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [main] - [] - [(SubroutineCall - 2 main - () - [] - () - )] - () - Public - .false. - .false. - () - ), - add: - (Function - (SymbolTable - 201 - { - _lpython_return_variable: - (Variable - 201 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - x: - (Variable - 201 - x - [] - In - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ), - y: - (Variable - 201 - y - [] - In - () - () - Default - (TypeParameter - T - ) - () - Source - Public - Required - .false. - ) - }) - add - (FunctionType - [(TypeParameter - T - ) - (TypeParameter - T - )] - (TypeParameter - T - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .true. - ) - [] - [(Var 201 x) - (Var 201 y)] - [] - (Var 201 _lpython_return_variable) - Public - .false. - .false. - () - ), - add_float: - (Function - (SymbolTable - 203 - { - _lpython_return_variable: - (Variable - 203 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 203 - x - [] - In - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 203 - y - [] - In - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ) - }) - add_float - (FunctionType - [(Real 4) - (Real 4)] - (Real 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 x) - (Var 203 y)] - [(= - (Var 203 _lpython_return_variable) - (RealBinOp - (Var 203 x) - Add - (Var 203 y) - (Real 4) - () - ) - () - ) - (Return)] - (Var 203 _lpython_return_variable) - Public - .false. - .false. - () - ), - add_integer: - (Function - (SymbolTable - 202 - { - _lpython_return_variable: - (Variable - 202 - _lpython_return_variable - [] - ReturnVar - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 202 - x - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 202 - y - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - add_integer - (FunctionType - [(Integer 4) - (Integer 4)] - (Integer 4) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 x) - (Var 202 y)] - [(= - (Var 202 _lpython_return_variable) - (IntegerBinOp - (Var 202 x) - Add - (Var 202 y) - (Integer 4) - () - ) - () - ) - (Return)] - (Var 202 _lpython_return_variable) - Public - .false. - .false. - () - ), - g: - (Function - (SymbolTable - 204 - { - _lpython_return_variable: - (Variable - 204 - _lpython_return_variable - [n - m] - ReturnVar - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 204 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - a: - (Variable - 204 - a - [n - m] - InOut - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 204 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 204 - b - [n - m] - InOut - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 204 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 204 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 204 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - m: - (Variable - 204 - m - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - n: - (Variable - 204 - n - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - r: - (Variable - 204 - r - [n - m] - Local - () - () - Default - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 204 m))] - PointerToDataArray - ) - () - Source - Public - Required - .false. - ) - }) - g - (FunctionType - [(Integer 4) - (Integer 4) - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - )] - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (FunctionParam - 0 - (Integer 4) - () - )) - ((IntegerConstant 0 (Integer 4)) - (FunctionParam - 1 - (Integer 4) - () - ))] - PointerToDataArray - ) - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [2 add] - .false. - ) - [add] - [(Var 204 n) - (Var 204 m) - (Var 204 a) - (Var 204 b)] - [(= - (Var 204 r) - (ArrayConstant - [] - (Array - (TypeParameter - T - ) - [((IntegerConstant 0 (Integer 4)) - (Var 204 n)) - ((IntegerConstant 0 (Integer 4)) - (Var 204 m))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 204 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 204 n) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 204 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (Var 204 m) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 204 r) - [(() - (Var 204 i) - ()) - (() - (Var 204 j) - ())] - (TypeParameter - T - ) - RowMajor - () - ) - (FunctionCall - 2 add - () - [((ArrayItem - (Var 204 a) - [(() - (Var 204 i) - ()) - (() - (Var 204 j) - ())] - (TypeParameter - T - ) - RowMajor - () - )) - ((ArrayItem - (Var 204 b) - [(() - (Var 204 i) - ()) - (() - (Var 204 j) - ())] - (TypeParameter - T - ) - RowMajor - () - ))] - (TypeParameter - T - ) - () - () - ) - () - )] - )] - ) - (Print - () - [(ArrayItem - (Var 204 r) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (TypeParameter - T - ) - RowMajor - () - )] - () - () - )] - (Var 204 _lpython_return_variable) - Public - .false. - .false. - () - ), - m: - (Variable - 2 - m - [] - Local - () - () - Default - (TypeParameter - m - ) - () - Source - Public - Required - .false. - ), - main: - (Function - (SymbolTable - 205 - { - __lcompilers_dummy: - (Variable - 205 - __lcompilers_dummy - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - __lcompilers_dummy1: - (Variable - 205 - __lcompilers_dummy1 - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - a_float: - (Variable - 205 - a_float - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - a_int: - (Variable - 205 - a_int - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b_float: - (Variable - 205 - b_float - [] - Local - () - () - Default - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b_int: - (Variable - 205 - b_int - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - main - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [__asr_generic_g_0 - __asr_generic_g_1] - [] - [(= - (Var 205 a_int) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 a_int) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 400 (Integer 4)) - () - ) - (= - (Var 205 b_int) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 b_int) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 20 (Integer 4)) - () - ) - (= - (Var 205 __lcompilers_dummy) - (FunctionCall - 2 __asr_generic_g_0 - () - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 1 (Integer 4))) - ((ArrayPhysicalCast - (Var 205 a_int) - FixedSizeArray - PointerToDataArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - )) - ((ArrayPhysicalCast - (Var 205 b_int) - FixedSizeArray - PointerToDataArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - ))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - () - ) - (= - (Var 205 a_float) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 a_float) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (IntegerConstant 400 (Integer 4)) - IntegerToReal - (Real 4) - (RealConstant - 400.000000 - (Real 4) - ) - ) - () - ) - (= - (Var 205 b_float) - (ArrayConstant - [] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 b_float) - [(() - (IntegerConstant 0 (Integer 4)) - ()) - (() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 4) - RowMajor - () - ) - (Cast - (IntegerConstant 20 (Integer 4)) - IntegerToReal - (Real 4) - (RealConstant - 20.000000 - (Real 4) - ) - ) - () - ) - (= - (Var 205 __lcompilers_dummy1) - (FunctionCall - 2 __asr_generic_g_1 - () - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 1 (Integer 4))) - ((ArrayPhysicalCast - (Var 205 a_float) - FixedSizeArray - PointerToDataArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - )) - ((ArrayPhysicalCast - (Var 205 b_float) - FixedSizeArray - PointerToDataArray - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - PointerToDataArray - ) - () - ))] - (Array - (Real 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - () - ) - () - )] - () - Public - .false. - .false. - () - ), - n: - (Variable - 2 - n - [] - Local - () - () - Default - (TypeParameter - n - ) - () - Source - Public - Required - .false. - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 211 - { - __main__global_stmts: - (ExternalSymbol - 211 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 211 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-structs_05-fa98307.stdout b/tests/reference/asr-structs_05-fa98307.stdout deleted file mode 100644 index e6c27d31a3..0000000000 --- a/tests/reference/asr-structs_05-fa98307.stdout +++ /dev/null @@ -1,1476 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - A: - (StructType - (SymbolTable - 201 - { - a: - (Variable - 201 - a - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 201 - b - [] - Local - () - () - Default - (Integer 2) - () - Source - Public - Required - .false. - ), - c: - (Variable - 201 - c - [] - Local - () - () - Default - (Integer 1) - () - Source - Public - Required - .false. - ), - d: - (Variable - 201 - d - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - x: - (Variable - 201 - x - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 201 - y - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - z: - (Variable - 201 - z - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ) - }) - A - [] - [y - x - z - a - b - c - d] - Source - Public - .false. - .false. - [(()) - (()) - (()) - (()) - (()) - (()) - (())] - () - () - ), - __main__global_stmts: - (Function - (SymbolTable - 207 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [g] - [] - [(SubroutineCall - 2 g - () - [] - () - )] - () - Public - .false. - .false. - () - ), - g: - (Function - (SymbolTable - 205 - { - y: - (Variable - 205 - y - [] - Local - () - () - Default - (Array - (Struct - 2 A - ) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - g - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [verify - update_1 - update_2] - [] - [(= - (Var 205 y) - (ArrayConstant - [] - (Array - (Struct - 2 A - ) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 205 y) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - (StructTypeConstructor - 2 A - [((RealConstant - 1.100000 - (Real 8) - )) - ((IntegerConstant 1 (Integer 4))) - ((Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 1 (Integer 8)) - )) - ((Cast - (RealConstant - 1.100000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 1.100000 - (Real 4) - ) - )) - ((Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 1 (Integer 2)) - )) - ((Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 1 (Integer 1)) - )) - ((LogicalConstant - .true. - (Logical 4) - ))] - (Struct - 2 A - ) - () - ) - () - ) - (= - (ArrayItem - (Var 205 y) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - (StructTypeConstructor - 2 A - [((RealConstant - 2.200000 - (Real 8) - )) - ((IntegerConstant 2 (Integer 4))) - ((Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - )) - ((Cast - (RealConstant - 2.200000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 2.200000 - (Real 4) - ) - )) - ((Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 2 (Integer 2)) - )) - ((Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 2 (Integer 1)) - )) - ((LogicalConstant - .true. - (Logical 4) - ))] - (Struct - 2 A - ) - () - ) - () - ) - (SubroutineCall - 2 verify - () - [((ArrayPhysicalCast - (Var 205 y) - FixedSizeArray - DescriptorArray - (Array - (Struct - 2 A - ) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 1 (Integer 4))) - ((RealConstant - 1.100000 - (Real 8) - )) - ((IntegerConstant 2 (Integer 4))) - ((RealConstant - 2.200000 - (Real 8) - ))] - () - ) - (SubroutineCall - 2 update_1 - () - [((ArrayItem - (Var 205 y) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ))] - () - ) - (SubroutineCall - 2 update_2 - () - [((ArrayPhysicalCast - (Var 205 y) - FixedSizeArray - DescriptorArray - (Array - (Struct - 2 A - ) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - DescriptorArray - ) - () - ))] - () - ) - (SubroutineCall - 2 verify - () - [((ArrayPhysicalCast - (Var 205 y) - FixedSizeArray - DescriptorArray - (Array - (Struct - 2 A - ) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - DescriptorArray - ) - () - )) - ((IntegerConstant 2 (Integer 4))) - ((RealConstant - 1.200000 - (Real 8) - )) - ((IntegerConstant 3 (Integer 4))) - ((RealConstant - 2.300000 - (Real 8) - ))] - () - )] - () - Public - .false. - .false. - () - ), - update_1: - (Function - (SymbolTable - 203 - { - s: - (Variable - 203 - s - [] - InOut - () - () - Default - (Struct - 2 A - ) - () - Source - Public - Required - .false. - ) - }) - update_1 - (FunctionType - [(Struct - 2 A - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 203 s)] - [(= - (StructInstanceMember - (Var 203 s) - 201 x - (Integer 4) - () - ) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (StructInstanceMember - (Var 203 s) - 201 y - (Real 8) - () - ) - (RealConstant - 1.200000 - (Real 8) - ) - () - ) - (= - (StructInstanceMember - (Var 203 s) - 201 z - (Integer 8) - () - ) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - ) - () - ) - (= - (StructInstanceMember - (Var 203 s) - 201 a - (Real 4) - () - ) - (Cast - (RealConstant - 1.200000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 1.200000 - (Real 4) - ) - ) - () - ) - (= - (StructInstanceMember - (Var 203 s) - 201 b - (Integer 2) - () - ) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 2 (Integer 2)) - ) - () - ) - (= - (StructInstanceMember - (Var 203 s) - 201 c - (Integer 1) - () - ) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 2 (Integer 1)) - ) - () - )] - () - Public - .false. - .false. - () - ), - update_2: - (Function - (SymbolTable - 204 - { - s: - (Variable - 204 - s - [] - InOut - () - () - Default - (Array - (Struct - 2 A - ) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ) - }) - update_2 - (FunctionType - [(Array - (Struct - 2 A - ) - [(() - ())] - DescriptorArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 204 s)] - [(= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 x - (Integer 4) - () - ) - (IntegerConstant 3 (Integer 4)) - () - ) - (= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 y - (Real 8) - () - ) - (RealConstant - 2.300000 - (Real 8) - ) - () - ) - (= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 z - (Integer 8) - () - ) - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 3 (Integer 8)) - ) - () - ) - (= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 a - (Real 4) - () - ) - (Cast - (RealConstant - 2.300000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 2.300000 - (Real 4) - ) - ) - () - ) - (= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 b - (Integer 2) - () - ) - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 3 (Integer 2)) - ) - () - ) - (= - (StructInstanceMember - (ArrayItem - (Var 204 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - 201 c - (Integer 1) - () - ) - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 3 (Integer 1)) - ) - () - )] - () - Public - .false. - .false. - () - ), - verify: - (Function - (SymbolTable - 202 - { - eps: - (Variable - 202 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - s: - (Variable - 202 - s - [] - InOut - () - () - Default - (Array - (Struct - 2 A - ) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - s0: - (Variable - 202 - s0 - [] - Local - () - () - Default - (Struct - 2 A - ) - () - Source - Public - Required - .false. - ), - s1: - (Variable - 202 - s1 - [] - Local - () - () - Default - (Struct - 2 A - ) - () - Source - Public - Required - .false. - ), - x1: - (Variable - 202 - x1 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - x2: - (Variable - 202 - x2 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - y1: - (Variable - 202 - y1 - [] - In - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - y2: - (Variable - 202 - y2 - [] - In - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ) - }) - verify - (FunctionType - [(Array - (Struct - 2 A - ) - [(() - ())] - DescriptorArray - ) - (Integer 4) - (Real 8) - (Integer 4) - (Real 8)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 s) - (Var 202 x1) - (Var 202 y1) - (Var 202 x2) - (Var 202 y2)] - [(= - (Var 202 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 202 s0) - (ArrayItem - (Var 202 s) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - () - ) - (Print - () - [(StructInstanceMember - (Var 202 s0) - 201 x - (Integer 4) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 y - (Real 8) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 z - (Integer 8) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 a - (Real 4) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 b - (Integer 2) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 c - (Integer 1) - () - ) - (StructInstanceMember - (Var 202 s0) - 201 d - (Logical 4) - () - )] - () - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s0) - 201 x - (Integer 4) - () - ) - Eq - (Var 202 x1) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (StructInstanceMember - (Var 202 s0) - 201 y - (Real 8) - () - ) - Sub - (Var 202 y1) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 202 eps) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s0) - 201 z - (Integer 8) - () - ) - Eq - (Cast - (Var 202 x1) - IntegerToInteger - (Integer 8) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (StructInstanceMember - (Var 202 s0) - 201 a - (Real 4) - () - ) - Sub - (Cast - (Var 202 y1) - RealToReal - (Real 4) - () - ) - (Real 4) - () - )] - 0 - (Real 4) - () - ) - Lt - (Cast - (RealConstant - 0.000001 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 0.000001 - (Real 4) - ) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s0) - 201 b - (Integer 2) - () - ) - Eq - (Cast - (Var 202 x1) - IntegerToInteger - (Integer 2) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s0) - 201 c - (Integer 1) - () - ) - Eq - (Cast - (Var 202 x1) - IntegerToInteger - (Integer 1) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (StructInstanceMember - (Var 202 s0) - 201 d - (Logical 4) - () - ) - () - ) - (= - (Var 202 s1) - (ArrayItem - (Var 202 s) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Struct - 2 A - ) - RowMajor - () - ) - () - ) - (Print - () - [(StructInstanceMember - (Var 202 s1) - 201 x - (Integer 4) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 y - (Real 8) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 z - (Integer 8) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 a - (Real 4) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 b - (Integer 2) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 c - (Integer 1) - () - ) - (StructInstanceMember - (Var 202 s1) - 201 d - (Logical 4) - () - )] - () - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s1) - 201 x - (Integer 4) - () - ) - Eq - (Var 202 x2) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (StructInstanceMember - (Var 202 s1) - 201 y - (Real 8) - () - ) - Sub - (Var 202 y2) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 202 eps) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s1) - 201 z - (Integer 8) - () - ) - Eq - (Cast - (Var 202 x2) - IntegerToInteger - (Integer 8) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (StructInstanceMember - (Var 202 s1) - 201 a - (Real 4) - () - ) - Sub - (Cast - (Var 202 y2) - RealToReal - (Real 4) - () - ) - (Real 4) - () - )] - 0 - (Real 4) - () - ) - Lt - (Cast - (RealConstant - 0.000001 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 0.000001 - (Real 4) - ) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s1) - 201 b - (Integer 2) - () - ) - Eq - (Cast - (Var 202 x2) - IntegerToInteger - (Integer 2) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (StructInstanceMember - (Var 202 s1) - 201 c - (Integer 1) - () - ) - Eq - (Cast - (Var 202 x2) - IntegerToInteger - (Integer 1) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (StructInstanceMember - (Var 202 s1) - 201 d - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 208 - { - __main__global_stmts: - (ExternalSymbol - 208 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 208 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-test_bool_binop-f856ef0.stdout b/tests/reference/asr-test_bool_binop-f856ef0.stdout deleted file mode 100644 index f93267c185..0000000000 --- a/tests/reference/asr-test_bool_binop-f856ef0.stdout +++ /dev/null @@ -1,442 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 4 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [f] - [] - [(SubroutineCall - 2 f - () - [] - () - )] - () - Public - .false. - .false. - () - ), - f: - (Function - (SymbolTable - 3 - { - b1: - (Variable - 3 - b1 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b2: - (Variable - 3 - b2 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - f: - (Variable - 3 - f - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - f - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 3 i) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Add - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 2 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Sub - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerBinOp - (Cast - (LogicalConstant - .false. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Mul - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (Cast - (IntrinsicScalarFunction - FloorDiv - [(LogicalConstant - .true. - (Logical 4) - ) - (LogicalConstant - .true. - (Logical 4) - )] - 0 - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - LogicalToInteger - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (Cast - (IntrinsicScalarFunction - FloorDiv - [(LogicalConstant - .false. - (Logical 4) - ) - (LogicalConstant - .true. - (Logical 4) - )] - 0 - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - LogicalToInteger - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerBinOp - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - Pow - (Cast - (LogicalConstant - .true. - (Logical 4) - ) - LogicalToInteger - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Var 3 i) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 b1) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (= - (Var 3 b2) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (= - (Var 3 f) - (RealBinOp - (Cast - (Var 3 b1) - LogicalToReal - (Real 8) - () - ) - Div - (Cast - (Var 3 b2) - LogicalToReal - (Real 8) - () - ) - (Real 8) - () - ) - () - ) - (Assert - (RealCompare - (Var 3 f) - Eq - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [] - .false. - .false. - ), - main_program: - (Program - (SymbolTable - 5 - { - __main__global_stmts: - (ExternalSymbol - 5 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 5 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout deleted file mode 100644 index 5497b1299d..0000000000 --- a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout +++ /dev/null @@ -1,271 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_bin] - [] - [(SubroutineCall - 2 test_bin - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_bin: - (Function - (SymbolTable - 3 - { - bin: - (ExternalSymbol - 3 - bin - 4 bin - lpython_builtin - [] - bin - Private - ), - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_bin - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [bin] - [] - [(= - (Var 3 i) - (IntegerConstant 5 (Integer 4)) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 bin - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "0b101" - (Character 1 5 ()) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerConstant 64 (Integer 4)) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 bin - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "0b1000000" - (Character 1 9 ()) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 bin - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "-0b1000010110" - (Character 1 13 ()) - ) - (Logical 4) - () - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 bin - () - [((IntegerConstant 64 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0b1000000" - (Character 1 9 ()) - ) - () - ) - Eq - (StringConstant - "0b1000000" - (Character 1 9 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 bin - () - [((IntegerUnaryMinus - (IntegerConstant 534 (Integer 4)) - (Integer 4) - (IntegerConstant -534 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0b1000010110" - (Character 1 13 ()) - ) - () - ) - Eq - (StringConstant - "-0b1000010110" - (Character 1 13 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_bool-330223a.stdout b/tests/reference/asr-test_builtin_bool-330223a.stdout deleted file mode 100644 index cc514a16d8..0000000000 --- a/tests/reference/asr-test_builtin_bool-330223a.stdout +++ /dev/null @@ -1,896 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_bool] - [] - [(SubroutineCall - 2 test_bool - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_bool: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - a2: - (Variable - 3 - a2 - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - a3: - (Variable - 3 - a3 - [] - Local - () - () - Default - (Integer 1) - () - Source - Public - Required - .false. - ), - a4: - (Variable - 3 - a4 - [] - Local - () - () - Default - (Integer 2) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 3 - c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c1: - (Variable - 3 - c1 - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 3 - complex - 4 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_13__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_13__complex - 4 __lpython_overloaded_13__complex - lpython_builtin - [] - __lpython_overloaded_13__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 4 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ), - f: - (Variable - 3 - f - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - f2: - (Variable - 3 - f2 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - s: - (Variable - 3 - s - [] - Local - () - () - Default - (Character 1 -2 ()) - () - Source - Public - Required - .false. - ) - }) - test_bool - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_13__complex] - [] - [(= - (Var 3 a) - (IntegerConstant 34 (Integer 4)) - () - ) - (Assert - (Cast - (Var 3 a) - IntegerToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 0 (Integer 4)) - () - ) - (Assert - (LogicalNot - (Cast - (Var 3 a) - IntegerToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (Cast - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - IntegerToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (LogicalNot - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a2) - (Cast - (IntegerConstant 34 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 34 (Integer 8)) - ) - () - ) - (Assert - (Cast - (Var 3 a2) - IntegerToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 a3) - (Cast - (IntegerConstant 34 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 34 (Integer 1)) - ) - () - ) - (Assert - (Cast - (Var 3 a3) - IntegerToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 a4) - (IntegerUnaryMinus - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 2) - (IntegerConstant 1 (Integer 2)) - ) - (Integer 2) - (IntegerConstant -1 (Integer 2)) - ) - () - ) - (Assert - (Cast - (Var 3 a4) - IntegerToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (LogicalNot - (Cast - (Var 3 f) - RealToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealConstant - 1.000000 - (Real 8) - ) - () - ) - (Assert - (Cast - (Var 3 f) - RealToLogical - (Logical 4) - () - ) - () - ) - (Assert - (Cast - (RealConstant - 56.786866 - (Real 8) - ) - RealToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (LogicalNot - (Cast - (RealConstant - 0.000000 - (Real 8) - ) - RealToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 f2) - (RealUnaryMinus - (Cast - (RealConstant - 235.600000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 235.600000 - (Real 4) - ) - ) - (Real 4) - (RealConstant - -235.600000 - (Real 4) - ) - ) - () - ) - (Assert - (Cast - (Var 3 f2) - RealToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 f2) - (Cast - (RealConstant - 0.000053 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 0.000053 - (Real 4) - ) - ) - () - ) - (Assert - (Cast - (Var 3 f2) - RealToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 s) - (StringConstant - "" - (Character 1 0 ()) - ) - () - ) - (Assert - (LogicalNot - (Cast - (Var 3 s) - CharacterToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 s) - (StringConstant - "str" - (Character 1 3 ()) - ) - () - ) - (Assert - (Cast - (Var 3 s) - CharacterToLogical - (Logical 4) - () - ) - () - ) - (Assert - (LogicalNot - (Cast - (StringConstant - "" - (Character 1 0 ()) - ) - CharacterToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (Cast - (StringConstant - "str" - (Character 1 3 ()) - ) - CharacterToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 b) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (Assert - (Var 3 b) - () - ) - (= - (Var 3 b) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (Assert - (LogicalNot - (Var 3 b) - (Logical 4) - () - ) - () - ) - (Assert - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (Assert - (LogicalNot - (LogicalConstant - .false. - (Logical 4) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 c) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 2 (Integer 4))) - ((IntegerConstant 3 (Integer 4)))] - (Complex 8) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 4) - ) - ) - () - ) - (Assert - (Cast - (Var 3 c) - ComplexToLogical - (Logical 4) - () - ) - () - ) - (= - (Var 3 c) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 0 (Integer 4))) - ((IntegerConstant 0 (Integer 4)))] - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 4) - ) - ) - () - ) - (Assert - (LogicalNot - (Cast - (Var 3 c) - ComplexToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (LogicalNot - (Cast - (ComplexBinOp - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - ) - ComplexToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 c1) - (FunctionCall - 3 complex@__lpython_overloaded_13__complex - 3 complex - [((IntegerConstant 0 (Integer 4))) - ((RealConstant - 0.100202 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 0.000000 - 0.100202 - (Complex 8) - ) - () - ) - () - ) - (Assert - (Cast - (Var 3 c1) - ComplexToLogical - (Logical 4) - () - ) - () - ) - (Assert - (LogicalNot - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 0 (Integer 4))) - ((IntegerConstant 0 (Integer 4)))] - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - () - ) - ComplexToLogical - (Logical 4) - (LogicalConstant - .false. - (Logical 4) - ) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (Cast - (ComplexBinOp - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 3.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 5.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 3.000000 - 5.000000 - (Complex 8) - ) - ) - ComplexToLogical - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_hex-64bd268.stdout b/tests/reference/asr-test_builtin_hex-64bd268.stdout deleted file mode 100644 index c0176738cf..0000000000 --- a/tests/reference/asr-test_builtin_hex-64bd268.stdout +++ /dev/null @@ -1,246 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_hex] - [] - [(SubroutineCall - 2 test_hex - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_hex: - (Function - (SymbolTable - 3 - { - hex: - (ExternalSymbol - 3 - hex - 4 hex - lpython_builtin - [] - hex - Private - ), - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_hex - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [hex] - [] - [(= - (Var 3 i) - (IntegerConstant 34 (Integer 4)) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 hex - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "0x22" - (Character 1 4 ()) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerUnaryMinus - (IntegerConstant 4235 (Integer 4)) - (Integer 4) - (IntegerConstant -4235 (Integer 4)) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 hex - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "-0x108b" - (Character 1 7 ()) - ) - (Logical 4) - () - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 hex - () - [((IntegerConstant 34 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0x22" - (Character 1 4 ()) - ) - () - ) - Eq - (StringConstant - "0x22" - (Character 1 4 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 hex - () - [((IntegerUnaryMinus - (IntegerConstant 4235 (Integer 4)) - (Integer 4) - (IntegerConstant -4235 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0x108b" - (Character 1 7 ()) - ) - () - ) - Eq - (StringConstant - "-0x108b" - (Character 1 7 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_oct-20b9066.stdout b/tests/reference/asr-test_builtin_oct-20b9066.stdout deleted file mode 100644 index 06973cfab3..0000000000 --- a/tests/reference/asr-test_builtin_oct-20b9066.stdout +++ /dev/null @@ -1,282 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_oct] - [] - [(SubroutineCall - 2 test_oct - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_oct: - (Function - (SymbolTable - 3 - { - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - oct: - (ExternalSymbol - 3 - oct - 4 oct - lpython_builtin - [] - oct - Private - ) - }) - test_oct - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [oct] - [] - [(= - (Var 3 i) - (IntegerConstant 34 (Integer 4)) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 oct - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "0o42" - (Character 1 4 ()) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerUnaryMinus - (IntegerConstant 4235 (Integer 4)) - (Integer 4) - (IntegerConstant -4235 (Integer 4)) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 oct - () - [((Var 3 i))] - (Character 1 -2 ()) - () - () - ) - Eq - (StringConstant - "-0o10213" - (Character 1 8 ()) - ) - (Logical 4) - () - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 oct - () - [((IntegerConstant 34 (Integer 4)))] - (Character 1 -2 ()) - (StringConstant - "0o42" - (Character 1 4 ()) - ) - () - ) - Eq - (StringConstant - "0o42" - (Character 1 4 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (StringCompare - (FunctionCall - 3 oct - () - [((IntegerUnaryMinus - (IntegerConstant 4235 (Integer 4)) - (Integer 4) - (IntegerConstant -4235 (Integer 4)) - ))] - (Character 1 -2 ()) - (StringConstant - "-0o10213" - (Character 1 8 ()) - ) - () - ) - Eq - (StringConstant - "-0o10213" - (Character 1 8 ()) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable -<<<<<<< HEAD -<<<<<<< HEAD - 131 - { - __main__global_stmts: - (ExternalSymbol - 131 -======= -<<<<<<< HEAD - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 -======= - 133 - { - __main__global_stmts: - (ExternalSymbol - 133 ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 ->>>>>>> main - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall -<<<<<<< HEAD -<<<<<<< HEAD - 131 __main__global_stmts -======= -<<<<<<< HEAD - 120 __main__global_stmts -======= - 133 __main__global_stmts ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 120 __main__global_stmts ->>>>>>> main - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_pow-f02fcda.stdout b/tests/reference/asr-test_builtin_pow-f02fcda.stdout deleted file mode 100644 index 03e652d428..0000000000 --- a/tests/reference/asr-test_builtin_pow-f02fcda.stdout +++ /dev/null @@ -1,1955 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_pow] - [] - [(SubroutineCall - 2 test_pow - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_pow: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - a1: - (Variable - 3 - a1 - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - a2: - (Variable - 3 - a2 - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b1: - (Variable - 3 - b1 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - b2: - (Variable - 3 - b2 - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - c1: - (Variable - 3 - c1 - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 3 - complex - 4 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 4 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ), - eps: - (Variable - 3 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - f1: - (Variable - 3 - f1 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - f2: - (Variable - 3 - f2 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - i1: - (Variable - 3 - i1 - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - i2: - (Variable - 3 - i2 - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - j: - (Variable - 3 - j - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - k: - (Variable - 3 - k - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - p: - (Variable - 3 - p - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - pow: - (ExternalSymbol - 3 - pow - 4 pow - lpython_builtin - [] - pow - Private - ), - pow@__lpython_overloaded_0__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_0__pow - 4 __lpython_overloaded_0__pow - lpython_builtin - [] - __lpython_overloaded_0__pow - Public - ), - pow@__lpython_overloaded_10__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_10__pow - 4 __lpython_overloaded_10__pow - lpython_builtin - [] - __lpython_overloaded_10__pow - Public - ), - pow@__lpython_overloaded_11__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_11__pow - 4 __lpython_overloaded_11__pow - lpython_builtin - [] - __lpython_overloaded_11__pow - Public - ), - pow@__lpython_overloaded_1__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_1__pow - 4 __lpython_overloaded_1__pow - lpython_builtin - [] - __lpython_overloaded_1__pow - Public - ), - pow@__lpython_overloaded_2__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_2__pow - 4 __lpython_overloaded_2__pow - lpython_builtin - [] - __lpython_overloaded_2__pow - Public - ), - pow@__lpython_overloaded_3__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_3__pow - 4 __lpython_overloaded_3__pow - lpython_builtin - [] - __lpython_overloaded_3__pow - Public - ), - pow@__lpython_overloaded_4__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_4__pow - 4 __lpython_overloaded_4__pow - lpython_builtin - [] - __lpython_overloaded_4__pow - Public - ), - pow@__lpython_overloaded_5__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_5__pow - 4 __lpython_overloaded_5__pow - lpython_builtin - [] - __lpython_overloaded_5__pow - Public - ), - pow@__lpython_overloaded_6__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_6__pow - 4 __lpython_overloaded_6__pow - lpython_builtin - [] - __lpython_overloaded_6__pow - Public - ), - pow@__lpython_overloaded_7__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_7__pow - 4 __lpython_overloaded_7__pow - lpython_builtin - [] - __lpython_overloaded_7__pow - Public - ), - pow@__lpython_overloaded_8__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_8__pow - 4 __lpython_overloaded_8__pow - lpython_builtin - [] - __lpython_overloaded_8__pow - Public - ), - pow@__lpython_overloaded_9__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_9__pow - 4 __lpython_overloaded_9__pow - lpython_builtin - [] - __lpython_overloaded_9__pow - Public - ), - x: - (Variable - 3 - x - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 3 - y - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ) - }) - test_pow - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [pow@__lpython_overloaded_0__pow - pow@__lpython_overloaded_1__pow - pow@__lpython_overloaded_2__pow - pow@__lpython_overloaded_4__pow - pow@__lpython_overloaded_5__pow - pow@__lpython_overloaded_8__pow - pow@__lpython_overloaded_3__pow - pow@__lpython_overloaded_6__pow - pow@__lpython_overloaded_7__pow - pow@__lpython_overloaded_11__pow - pow@__lpython_overloaded_10__pow - complex@__lpython_overloaded_9__complex - pow@__lpython_overloaded_9__pow] - [] - [(= - (Var 3 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerConstant 5 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((Var 3 a)) - ((Var 3 b))] - (Real 8) - () - () - ) - RealToInteger - (Integer 4) - () - ) - Eq - (IntegerConstant 32 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 6 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerConstant 3 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((Var 3 a)) - ((Var 3 b))] - (Real 8) - () - () - ) - RealToInteger - (Integer 4) - () - ) - Eq - (IntegerConstant 216 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerConstant 0 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((Var 3 a)) - ((Var 3 b))] - (Real 8) - () - () - ) - RealToInteger - (Integer 4) - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerUnaryMinus - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant -1 (Integer 4)) - ) - () - ) - (= - (Var 3 a) - (IntegerConstant 6 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerUnaryMinus - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant -4 (Integer 4)) - ) - () - ) - (= - (Var 3 i1) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - ) - () - ) - (= - (Var 3 i2) - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 5 (Integer 8)) - ) - () - ) - (Assert - (IntegerCompare - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_1__pow - 3 pow - [((Var 3 i1)) - ((Var 3 i2))] - (Real 8) - () - () - ) - RealToInteger - (Integer 8) - () - ) - Eq - (Cast - (IntegerConstant 32 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 32 (Integer 8)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i1) - (Cast - (IntegerConstant 6 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 6 (Integer 8)) - ) - () - ) - (= - (Var 3 i2) - (IntegerUnaryMinus - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 3 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -3 (Integer 8)) - ) - () - ) - (= - (Var 3 f1) - (Cast - (RealBinOp - (Cast - (IntegerConstant 525346 (Integer 4)) - IntegerToReal - (Real 8) - (RealConstant - 525346.000000 - (Real 8) - ) - ) - Div - (Cast - (IntegerConstant 66456 (Integer 4)) - IntegerToReal - (Real 8) - (RealConstant - 66456.000000 - (Real 8) - ) - ) - (Real 8) - (RealConstant - 7.905170 - (Real 8) - ) - ) - RealToReal - (Real 4) - (RealConstant - 7.905170 - (Real 4) - ) - ) - () - ) - (= - (Var 3 f2) - (Cast - (RealConstant - 3.000000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 3.000000 - (Real 4) - ) - ) - () - ) - (= - (Var 3 p) - (FunctionCall - 3 pow@__lpython_overloaded_2__pow - 3 pow - [((Var 3 f1)) - ((Var 3 f2))] - (Real 4) - () - () - ) - () - ) - (= - (Var 3 f1) - (FunctionCall - 3 pow@__lpython_overloaded_4__pow - 3 pow - [((Var 3 a)) - ((Var 3 f2))] - (Real 4) - () - () - ) - () - ) - (= - (Var 3 f1) - (FunctionCall - 3 pow@__lpython_overloaded_5__pow - 3 pow - [((Var 3 f2)) - ((Var 3 a))] - (Real 4) - () - () - ) - () - ) - (= - (Var 3 b1) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (= - (Var 3 b2) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_8__pow - 3 pow - [((Var 3 b1)) - ((Var 3 b2))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_8__pow - 3 pow - [((Var 3 b2)) - ((Var 3 b1))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_8__pow - 3 pow - [((Var 3 b1)) - ((Var 3 b2))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_8__pow - 3 pow - [((LogicalConstant - .false. - (Logical 4) - )) - ((LogicalConstant - .false. - (Logical 4) - ))] - (Integer 4) - (IntegerConstant 1 (Integer 4)) - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 a1) - (RealConstant - 4.500000 - (Real 8) - ) - () - ) - (= - (Var 3 a2) - (RealConstant - 2.300000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_3__pow - 3 pow - [((Var 3 a1)) - ((Var 3 a2))] - (Real 8) - () - () - ) - Sub - (RealConstant - 31.797193 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_3__pow - 3 pow - [((Var 3 a2)) - ((Var 3 a1))] - (Real 8) - () - () - ) - Sub - (RealConstant - 42.439989 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 3 x) - (IntegerConstant 3 (Integer 4)) - () - ) - (= - (Var 3 y) - (RealConstant - 2.300000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_6__pow - 3 pow - [((Var 3 x)) - ((Var 3 y))] - (Real 8) - () - () - ) - Sub - (RealConstant - 12.513503 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_7__pow - 3 pow - [((Var 3 y)) - ((Var 3 x))] - (Real 8) - () - () - ) - Sub - (RealConstant - 12.167000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_6__pow - 3 pow - [((Var 3 x)) - ((RealConstant - 5.500000 - (Real 8) - ))] - (Real 8) - () - () - ) - Sub - (RealConstant - 420.888346 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_1__pow - 3 pow - [((Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - )) - ((IntegerUnaryMinus - (Cast - (IntegerConstant 1 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 1 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -1 (Integer 8)) - ))] - (Real 8) - (RealConstant - 0.500000 - (Real 8) - ) - () - ) - Sub - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_1__pow - 3 pow - [((Cast - (IntegerConstant 6 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 6 (Integer 8)) - )) - ((IntegerUnaryMinus - (Cast - (IntegerConstant 4 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 4 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -4 (Integer 8)) - ))] - (Real 8) - (RealConstant - 0.000772 - (Real 8) - ) - () - ) - Sub - (RealConstant - 0.000772 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_1__pow - 3 pow - [((IntegerUnaryMinus - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 3 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -3 (Integer 8)) - )) - ((IntegerUnaryMinus - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 5 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -5 (Integer 8)) - ))] - (Real 8) - (RealConstant - -0.004115 - (Real 8) - ) - () - ) - Add - (RealConstant - 0.004115 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_1__pow - 3 pow - [((Cast - (IntegerConstant 6 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 6 (Integer 8)) - )) - ((IntegerUnaryMinus - (Cast - (IntegerConstant 4 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 4 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -4 (Integer 8)) - ))] - (Real 8) - (RealConstant - 0.000772 - (Real 8) - ) - () - ) - Sub - (RealConstant - 0.000772 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_3__pow - 3 pow - [((RealConstant - 4.500000 - (Real 8) - )) - ((RealConstant - 2.300000 - (Real 8) - ))] - (Real 8) - (RealConstant - 31.797193 - (Real 8) - ) - () - ) - Sub - (RealConstant - 31.797193 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_3__pow - 3 pow - [((RealConstant - 2.300000 - (Real 8) - )) - ((RealConstant - 0.000000 - (Real 8) - ))] - (Real 8) - (RealConstant - 1.000000 - (Real 8) - ) - () - ) - Sub - (RealConstant - 1.000000 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_3__pow - 3 pow - [((RealConstant - 2.300000 - (Real 8) - )) - ((RealUnaryMinus - (RealConstant - 1.500000 - (Real 8) - ) - (Real 8) - (RealConstant - -1.500000 - (Real 8) - ) - ))] - (Real 8) - (RealConstant - 0.286687 - (Real 8) - ) - () - ) - Sub - (RealConstant - 0.286687 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_6__pow - 3 pow - [((IntegerConstant 2 (Integer 4))) - ((RealConstant - 3.400000 - (Real 8) - ))] - (Real 8) - (RealConstant - 10.556063 - (Real 8) - ) - () - ) - Sub - (RealConstant - 10.556063 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_6__pow - 3 pow - [((IntegerConstant 2 (Integer 4))) - ((RealUnaryMinus - (RealConstant - 3.400000 - (Real 8) - ) - (Real 8) - (RealConstant - -3.400000 - (Real 8) - ) - ))] - (Real 8) - (RealConstant - 0.094732 - (Real 8) - ) - () - ) - Sub - (RealConstant - 0.094732 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_7__pow - 3 pow - [((RealConstant - 3.400000 - (Real 8) - )) - ((IntegerConstant 9 (Integer 4)))] - (Real 8) - (RealConstant - 60716.992766 - (Real 8) - ) - () - ) - Sub - (RealConstant - 60716.992766 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_7__pow - 3 pow - [((RealConstant - 0.000000 - (Real 8) - )) - ((IntegerConstant 53 (Integer 4)))] - (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) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (Cast - (FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((IntegerConstant 4 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Real 8) - (RealConstant - 16.000000 - (Real 8) - ) - () - ) - RealToInteger - (Integer 4) - (IntegerConstant 16 (Integer 4)) - ) - Eq - (IntegerConstant 16 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (FunctionCall - 3 pow@__lpython_overloaded_7__pow - 3 pow - [((RealUnaryMinus - (RealConstant - 4235.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -4235.000000 - (Real 8) - ) - )) - ((IntegerConstant 52 (Integer 4)))] - (Real 8) - (RealConstant - 394800380598526378720936476336799774273305305904443955996320177992404102454228192853661558132283280490733920647962082901303487965679010854404517306573035287122910924343151116372519789002752.000000 - (Real 8) - ) - () - ) - Sub - (RealConstant - 394800380598526378720936476336799774273305305904443955996320177992404102454228192853661558132283280490733920647962082901303487965679010854404517306573035287122910924343151116372519789002752.000000 - (Real 8) - ) - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - )] - 0 - (Real 8) - (RealConstant - 0.000000 - (Real 8) - ) - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (Cast - (IntegerConstant 7 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 7 (Integer 8)) - ) - () - ) - (= - (Var 3 j) - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 2 (Integer 8)) - ) - () - ) - (= - (Var 3 k) - (Cast - (IntegerConstant 5 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 5 (Integer 8)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_11__pow - 3 pow - [((Var 3 i)) - ((Var 3 j)) - ((Var 3 k))] - (Integer 8) - () - () - ) - Eq - (Cast - (IntegerConstant 4 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 4 (Integer 8)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 pow@__lpython_overloaded_10__pow - 3 pow - [((IntegerConstant 102 (Integer 4))) - ((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 121 (Integer 4)))] - (Integer 4) - (RealConstant - 38.000000 - (Real 8) - ) - () - ) - Eq - (IntegerConstant 38 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 c1) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 4 (Integer 4))) - ((IntegerConstant 5 (Integer 4)))] - (Complex 8) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 c1) - (FunctionCall - 3 pow@__lpython_overloaded_9__pow - 3 pow - [((Var 3 c1)) - ((IntegerConstant 4 (Integer 4)))] - (Complex 4) - () - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable -<<<<<<< HEAD -<<<<<<< HEAD - 131 - { - __main__global_stmts: - (ExternalSymbol - 131 -======= -<<<<<<< HEAD - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 -======= - 133 - { - __main__global_stmts: - (ExternalSymbol - 133 ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 ->>>>>>> main - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall -<<<<<<< HEAD -<<<<<<< HEAD - 131 __main__global_stmts -======= -<<<<<<< HEAD - 120 __main__global_stmts -======= - 133 __main__global_stmts ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 120 __main__global_stmts ->>>>>>> main - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_builtin_round-7417a21.stdout b/tests/reference/asr-test_builtin_round-7417a21.stdout deleted file mode 100644 index 28feda2e17..0000000000 --- a/tests/reference/asr-test_builtin_round-7417a21.stdout +++ /dev/null @@ -1,919 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_round] - [] - [(SubroutineCall - 2 test_round - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_round: - (Function - (SymbolTable - 3 - { - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - f: - (Variable - 3 - f - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - f2: - (Variable - 3 - f2 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - i: - (Variable - 3 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i2: - (Variable - 3 - i2 - [] - Local - () - () - Default - (Integer 1) - () - Source - Public - Required - .false. - ), - i3: - (Variable - 3 - i3 - [] - Local - () - () - Default - (Integer 2) - () - Source - Public - Required - .false. - ), - i4: - (Variable - 3 - i4 - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - round: - (ExternalSymbol - 3 - round - 4 round - lpython_builtin - [] - round - Private - ), - round@__lpython_overloaded_0__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_0__round - 4 __lpython_overloaded_0__round - lpython_builtin - [] - __lpython_overloaded_0__round - Public - ), - round@__lpython_overloaded_1__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_1__round - 4 __lpython_overloaded_1__round - lpython_builtin - [] - __lpython_overloaded_1__round - Public - ), - round@__lpython_overloaded_2__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_2__round - 4 __lpython_overloaded_2__round - lpython_builtin - [] - __lpython_overloaded_2__round - Public - ), - round@__lpython_overloaded_3__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_3__round - 4 __lpython_overloaded_3__round - lpython_builtin - [] - __lpython_overloaded_3__round - Public - ), - round@__lpython_overloaded_4__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_4__round - 4 __lpython_overloaded_4__round - lpython_builtin - [] - __lpython_overloaded_4__round - Public - ), - round@__lpython_overloaded_5__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_5__round - 4 __lpython_overloaded_5__round - lpython_builtin - [] - __lpython_overloaded_5__round - Public - ), - round@__lpython_overloaded_6__round: - (ExternalSymbol - 3 - round@__lpython_overloaded_6__round - 4 __lpython_overloaded_6__round - lpython_builtin - [] - __lpython_overloaded_6__round - Public - ) - }) - test_round - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [round@__lpython_overloaded_0__round - round@__lpython_overloaded_1__round - round@__lpython_overloaded_2__round - round@__lpython_overloaded_4__round - round@__lpython_overloaded_5__round - round@__lpython_overloaded_3__round - round@__lpython_overloaded_6__round] - [] - [(= - (Var 3 f) - (RealConstant - 5.678000 - (Real 8) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 6 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealUnaryMinus - (RealConstant - 183745.230000 - (Real 8) - ) - (Real 8) - (RealConstant - -183745.230000 - (Real 8) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 183745 (Integer 4)) - (Integer 4) - (IntegerConstant -183745 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealConstant - 44.340000 - (Real 8) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 44 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealConstant - 0.500000 - (Real 8) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealUnaryMinus - (RealConstant - 50.500000 - (Real 8) - ) - (Real 8) - (RealConstant - -50.500000 - (Real 8) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 50 (Integer 4)) - (Integer 4) - (IntegerConstant -50 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 f) - (RealConstant - 1.500000 - (Real 8) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((Var 3 f))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 2 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealConstant - 13.001000 - (Real 8) - ))] - (Integer 4) - (IntegerConstant 13 (Integer 4)) - () - ) - Eq - (IntegerConstant 13 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealUnaryMinus - (RealConstant - 40.499990 - (Real 8) - ) - (Real 8) - (RealConstant - -40.499990 - (Real 8) - ) - ))] - (Integer 4) - (IntegerConstant -40 (Integer 4)) - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 40 (Integer 4)) - (Integer 4) - (IntegerConstant -40 (Integer 4)) - ) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealConstant - 0.500000 - (Real 8) - ))] - (Integer 4) - (IntegerConstant 0 (Integer 4)) - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealUnaryMinus - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - (RealConstant - -0.500000 - (Real 8) - ) - ))] - (Integer 4) - (IntegerConstant 0 (Integer 4)) - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealConstant - 1.500000 - (Real 8) - ))] - (Integer 4) - (IntegerConstant 2 (Integer 4)) - () - ) - Eq - (IntegerConstant 2 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealConstant - 50.500000 - (Real 8) - ))] - (Integer 4) - (IntegerConstant 50 (Integer 4)) - () - ) - Eq - (IntegerConstant 50 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_0__round - 3 round - [((RealConstant - 56.780000 - (Real 8) - ))] - (Integer 4) - (IntegerConstant 57 (Integer 4)) - () - ) - Eq - (IntegerConstant 57 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 f2) - (Cast - (RealConstant - 5.678000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 5.678000 - (Real 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_1__round - 3 round - [((Var 3 f2))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 6 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i) - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_2__round - 3 round - [((Var 3 i))] - (Integer 4) - () - () - ) - Eq - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_2__round - 3 round - [((IntegerConstant 4 (Integer 4)))] - (Integer 4) - (IntegerConstant 4 (Integer 4)) - () - ) - Eq - (IntegerConstant 4 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (= - (Var 3 i2) - (Cast - (IntegerConstant 7 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 7 (Integer 1)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_4__round - 3 round - [((Var 3 i2))] - (Integer 1) - () - () - ) - Eq - (Cast - (IntegerConstant 7 (Integer 4)) - IntegerToInteger - (Integer 1) - (IntegerConstant 7 (Integer 1)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i3) - (Cast - (IntegerUnaryMinus - (IntegerConstant 8 (Integer 4)) - (Integer 4) - (IntegerConstant -8 (Integer 4)) - ) - IntegerToInteger - (Integer 2) - (IntegerConstant -8 (Integer 2)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_5__round - 3 round - [((Var 3 i3))] - (Integer 2) - () - () - ) - Eq - (Cast - (IntegerUnaryMinus - (IntegerConstant 8 (Integer 4)) - (Integer 4) - (IntegerConstant -8 (Integer 4)) - ) - IntegerToInteger - (Integer 2) - (IntegerConstant -8 (Integer 2)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 i4) - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 0 (Integer 8)) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_3__round - 3 round - [((Var 3 i4))] - (Integer 8) - () - () - ) - Eq - (Cast - (IntegerConstant 0 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 0 (Integer 8)) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 3 b) - (LogicalConstant - .true. - (Logical 4) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_6__round - 3 round - [((Var 3 b))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - () - ) - () - ) - (= - (Var 3 b) - (LogicalConstant - .false. - (Logical 4) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_6__round - 3 round - [((Var 3 b))] - (Integer 4) - () - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 round@__lpython_overloaded_6__round - 3 round - [((LogicalConstant - .false. - (Logical 4) - ))] - (Integer 4) - (IntegerConstant 0 (Integer 4)) - () - ) - Eq - (IntegerConstant 0 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_complex_01-a6def58.stdout b/tests/reference/asr-test_complex_01-a6def58.stdout deleted file mode 100644 index 9afdf1c930..0000000000 --- a/tests/reference/asr-test_complex_01-a6def58.stdout +++ /dev/null @@ -1,2049 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 123 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [check] - [] - [(SubroutineCall - 2 check - () - [] - () - )] - () - Public - .false. - .false. - () - ), - check: - (Function - (SymbolTable - 7 - { - - }) - check - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_real_imag - test_complex - test_complex_unary_minus - test_complex_not] - [] - [(SubroutineCall - 2 test_real_imag - () - [] - () - ) - (SubroutineCall - 2 test_complex - () - [] - () - ) - (SubroutineCall - 2 test_complex_unary_minus - () - [] - () - ) - (SubroutineCall - 2 test_complex_not - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_complex: - (Function - (SymbolTable - 4 - { - a: - (Variable - 4 - a - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - a2: - (Variable - 4 - a2 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - a3: - (Variable - 4 - a3 - [] - Local - () - () - Default - (Real 4) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 4 - complex - 8 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_10__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_10__complex - 8 __lpython_overloaded_10__complex - lpython_builtin - [] - __lpython_overloaded_10__complex - Public - ), - complex@__lpython_overloaded_11__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_11__complex - 8 __lpython_overloaded_11__complex - lpython_builtin - [] - __lpython_overloaded_11__complex - Public - ), - complex@__lpython_overloaded_12__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_12__complex - 8 __lpython_overloaded_12__complex - lpython_builtin - [] - __lpython_overloaded_12__complex - Public - ), - complex@__lpython_overloaded_13__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_13__complex - 8 __lpython_overloaded_13__complex - lpython_builtin - [] - __lpython_overloaded_13__complex - Public - ), - complex@__lpython_overloaded_14__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_14__complex - 8 __lpython_overloaded_14__complex - lpython_builtin - [] - __lpython_overloaded_14__complex - Public - ), - complex@__lpython_overloaded_5__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_5__complex - 8 __lpython_overloaded_5__complex - lpython_builtin - [] - __lpython_overloaded_5__complex - Public - ), - complex@__lpython_overloaded_6__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_6__complex - 8 __lpython_overloaded_6__complex - lpython_builtin - [] - __lpython_overloaded_6__complex - Public - ), - complex@__lpython_overloaded_7__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_7__complex - 8 __lpython_overloaded_7__complex - lpython_builtin - [] - __lpython_overloaded_7__complex - Public - ), - complex@__lpython_overloaded_8__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_8__complex - 8 __lpython_overloaded_8__complex - lpython_builtin - [] - __lpython_overloaded_8__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 4 - complex@__lpython_overloaded_9__complex - 8 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ), - eps: - (Variable - 4 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i1: - (Variable - 4 - i1 - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - i2: - (Variable - 4 - i2 - [] - Local - () - () - Default - (Integer 8) - () - Source - Public - Required - .false. - ), - x: - (Variable - 4 - x - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - x2: - (Variable - 4 - x2 - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ) - }) - test_complex - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_5__complex - complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_13__complex - complex@__lpython_overloaded_14__complex - complex@__lpython_overloaded_6__complex - complex@__lpython_overloaded_7__complex - complex@__lpython_overloaded_8__complex - complex@__lpython_overloaded_11__complex - complex@__lpython_overloaded_10__complex - complex@__lpython_overloaded_12__complex] - [] - [(= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_5__complex - 4 complex - [((RealConstant - 4.500000 - (Real 8) - )) - ((RealConstant - 6.700000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 4.500000 - 6.700000 - (Complex 8) - ) - () - ) - () - ) - (= - (Var 4 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 4.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 6.700000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_9__complex - 4 complex - [((IntegerUnaryMinus - (IntegerConstant 4 (Integer 4)) - (Integer 4) - (IntegerConstant -4 (Integer 4)) - )) - ((IntegerConstant 2 (Integer 4)))] - (Complex 8) - (ComplexConstant - -4.000000 - 2.000000 - (Complex 8) - ) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 4 x) - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 4.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -4.000000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_13__complex - 4 complex - [((IntegerConstant 4 (Integer 4))) - ((RealConstant - 7.890000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 4.000000 - 7.890000 - (Complex 8) - ) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 4.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 7.890000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_14__complex - 4 complex - [((RealConstant - 5.600000 - (Real 8) - )) - ((IntegerConstant 0 (Integer 4)))] - (Complex 8) - (ComplexConstant - 5.600000 - 0.000000 - (Complex 8) - ) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 5.600000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 0.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 a) - (RealConstant - 534.600000 - (Real 8) - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_5__complex - 4 complex - [((Var 4 a)) - ((RealUnaryMinus - (Var 4 a) - (Real 8) - () - ))] - (Complex 8) - () - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 4 x) - (Real 8) - () - ) - Sub - (RealConstant - 534.600000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x) - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 534.600000 - (Real 8) - ) - (Real 8) - (RealConstant - -534.600000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 a2) - (RealUnaryMinus - (Cast - (RealConstant - 423.543081 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 423.543081 - (Real 4) - ) - ) - (Real 4) - (RealConstant - -423.543081 - (Real 4) - ) - ) - () - ) - (= - (Var 4 a3) - (Cast - (RealConstant - 34.500000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 34.500000 - (Real 4) - ) - ) - () - ) - (= - (Var 4 x2) - (FunctionCall - 4 complex@__lpython_overloaded_6__complex - 4 complex - [((Var 4 a2)) - ((Var 4 a3))] - (Complex 4) - () - () - ) - () - ) - (Assert - (RealCompare - (Cast - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 4 x2) - (Real 4) - () - ) - Sub - (Cast - (RealConstant - 34.500000 - (Real 8) - ) - RealToReal - (Real 4) - (RealConstant - 34.500000 - (Real 4) - ) - ) - (Real 4) - () - )] - 0 - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - LtE - (Var 4 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 4 i1) - (IntegerUnaryMinus - (IntegerConstant 5 (Integer 4)) - (Integer 4) - (IntegerConstant -5 (Integer 4)) - ) - () - ) - (= - (Var 4 i2) - (IntegerUnaryMinus - (Cast - (IntegerConstant 6 (Integer 4)) - IntegerToInteger - (Integer 8) - (IntegerConstant 6 (Integer 8)) - ) - (Integer 8) - (IntegerConstant -6 (Integer 8)) - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_7__complex - 4 complex - [((Var 4 a3)) - ((Var 4 a))] - (Complex 8) - () - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_8__complex - 4 complex - [((Var 4 a)) - ((Var 4 a3))] - (Complex 8) - () - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_11__complex - 4 complex - [((Var 4 i1)) - ((Var 4 i2))] - (Complex 8) - () - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_9__complex - 4 complex - [((Var 4 i1)) - ((IntegerUnaryMinus - (Var 4 i1) - (Integer 4) - () - ))] - (Complex 8) - () - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_10__complex - 4 complex - [((IntegerUnaryMinus - (Var 4 i2) - (Integer 8) - () - )) - ((IntegerUnaryMinus - (Var 4 i2) - (Integer 8) - () - ))] - (Complex 8) - () - () - ) - () - ) - (= - (Var 4 x) - (FunctionCall - 4 complex@__lpython_overloaded_12__complex - 4 complex - [((Var 4 i2)) - ((IntegerUnaryMinus - (Var 4 i1) - (Integer 4) - () - ))] - (Complex 8) - () - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_complex_not: - (Function - (SymbolTable - 6 - { - b: - (Variable - 6 - b - [] - Local - () - () - Default - (Logical 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 6 - c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c2: - (Variable - 6 - c2 - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 6 - complex - 8 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 6 - complex@__lpython_overloaded_9__complex - 8 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ) - }) - test_complex_not - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_9__complex] - [] - [(= - (Var 6 c) - (Cast - (FunctionCall - 6 complex@__lpython_overloaded_9__complex - 6 complex - [((IntegerConstant 4 (Integer 4))) - ((IntegerConstant 5 (Integer 4)))] - (Complex 8) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 6 b) - (LogicalNot - (Cast - (Var 6 c) - ComplexToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (LogicalNot - (Var 6 b) - (Logical 4) - () - ) - () - ) - (= - (Var 6 c2) - (FunctionCall - 6 complex@__lpython_overloaded_9__complex - 6 complex - [((IntegerConstant 0 (Integer 4))) - ((IntegerConstant 0 (Integer 4)))] - (Complex 8) - (ComplexConstant - 0.000000 - 0.000000 - (Complex 8) - ) - () - ) - () - ) - (= - (Var 6 b) - (LogicalNot - (Cast - (Var 6 c2) - ComplexToLogical - (Logical 4) - () - ) - (Logical 4) - () - ) - () - ) - (Assert - (Var 6 b) - () - )] - () - Public - .false. - .false. - () - ), - test_complex_unary_minus: - (Function - (SymbolTable - 5 - { - _c: - (Variable - 5 - _c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 5 - c - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - c2: - (Variable - 5 - c2 - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - complex: - (ExternalSymbol - 5 - complex - 8 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_13__complex: - (ExternalSymbol - 5 - complex@__lpython_overloaded_13__complex - 8 __lpython_overloaded_13__complex - lpython_builtin - [] - __lpython_overloaded_13__complex - Public - ), - complex@__lpython_overloaded_5__complex: - (ExternalSymbol - 5 - complex@__lpython_overloaded_5__complex - 8 __lpython_overloaded_5__complex - lpython_builtin - [] - __lpython_overloaded_5__complex - Public - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 5 - complex@__lpython_overloaded_9__complex - 8 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ) - }) - test_complex_unary_minus - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_13__complex - complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_5__complex] - [] - [(= - (Var 5 c) - (Cast - (FunctionCall - 5 complex@__lpython_overloaded_13__complex - 5 complex - [((IntegerConstant 3 (Integer 4))) - ((RealConstant - 4.500000 - (Real 8) - ))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.500000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 3.000000 - 4.500000 - (Complex 4) - ) - ) - () - ) - (= - (Var 5 _c) - (ComplexUnaryMinus - (Var 5 c) - (Complex 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Cast - (ComplexRe - (Var 5 _c) - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -3.000000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Cast - (ComplexIm - (Var 5 _c) - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 4.500000 - (Real 8) - ) - (Real 8) - (RealConstant - -4.500000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 _c) - (Cast - (FunctionCall - 5 complex@__lpython_overloaded_9__complex - 5 complex - [((IntegerConstant 5 (Integer 4))) - ((IntegerUnaryMinus - (IntegerConstant 78 (Integer 4)) - (Integer 4) - (IntegerConstant -78 (Integer 4)) - ))] - (Complex 8) - (ComplexConstant - 5.000000 - -78.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 5.000000 - -78.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 5 _c) - (ComplexUnaryMinus - (Var 5 _c) - (Complex 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Cast - (ComplexRe - (Var 5 _c) - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 5.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -5.000000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Cast - (ComplexIm - (Var 5 _c) - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - Sub - (RealConstant - 78.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 c2) - (FunctionCall - 5 complex@__lpython_overloaded_5__complex - 5 complex - [((RealUnaryMinus - (RealConstant - 4.500000 - (Real 8) - ) - (Real 8) - (RealConstant - -4.500000 - (Real 8) - ) - )) - ((RealUnaryMinus - (RealConstant - 7.800000 - (Real 8) - ) - (Real 8) - (RealConstant - -7.800000 - (Real 8) - ) - ))] - (Complex 8) - (ComplexConstant - -4.500000 - -7.800000 - (Complex 8) - ) - () - ) - () - ) - (= - (Var 5 c2) - (ComplexUnaryMinus - (Var 5 c2) - (Complex 8) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 5 c2) - (Real 8) - () - ) - Sub - (RealConstant - 4.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 5 c2) - (Real 8) - () - ) - Sub - (RealConstant - 7.800000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (= - (Var 5 c2) - (ComplexBinOp - (Cast - (IntegerConstant 3 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 3.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 4.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 5 c2) - (ComplexUnaryMinus - (Var 5 c2) - (Complex 8) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexRe - (Var 5 c2) - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -3.000000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ComplexIm - (Var 5 c2) - (Real 8) - () - ) - Sub - (RealUnaryMinus - (RealConstant - 4.000000 - (Real 8) - ) - (Real 8) - (RealConstant - -4.000000 - (Real 8) - ) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (RealConstant - 0.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_real_imag: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 3 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - x: - (Variable - 3 - x - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ) - }) - test_real_imag - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 3 x) - (ComplexBinOp - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 2.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 3.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 3 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 3 a) - (ComplexRe - (Var 3 x) - (Real 8) - () - ) - () - ) - (= - (Var 3 b) - (ComplexIm - (Var 3 x) - (Real 8) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Var 3 a) - Sub - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Var 3 b) - Sub - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 3 eps) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable -<<<<<<< HEAD -<<<<<<< HEAD - 135 - { - __main__global_stmts: - (ExternalSymbol - 135 -======= -<<<<<<< HEAD - 124 - { - __main__global_stmts: - (ExternalSymbol - 124 -======= - 137 - { - __main__global_stmts: - (ExternalSymbol - 137 ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 124 - { - __main__global_stmts: - (ExternalSymbol - 124 ->>>>>>> main - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall -<<<<<<< HEAD -<<<<<<< HEAD - 135 __main__global_stmts -======= -<<<<<<< HEAD - 124 __main__global_stmts -======= - 137 __main__global_stmts ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 124 __main__global_stmts ->>>>>>> main - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_complex_02-782ba2d.stdout b/tests/reference/asr-test_complex_02-782ba2d.stdout deleted file mode 100644 index bb09e7e578..0000000000 --- a/tests/reference/asr-test_complex_02-782ba2d.stdout +++ /dev/null @@ -1,754 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 122 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [check] - [] - [(SubroutineCall - 2 check - () - [] - () - )] - () - Public - .false. - .false. - () - ), - check: - (Function - (SymbolTable - 6 - { - - }) - check - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_complex_abs - test_complex_binop_32 - test_complex_binop_64] - [] - [(SubroutineCall - 2 test_complex_abs - () - [] - () - ) - (SubroutineCall - 2 test_complex_binop_32 - () - [] - () - ) - (SubroutineCall - 2 test_complex_binop_64 - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_complex_abs: - (Function - (SymbolTable - 3 - { - complex: - (ExternalSymbol - 3 - complex - 7 complex - lpython_builtin - [] - complex - Private - ), - complex@__lpython_overloaded_9__complex: - (ExternalSymbol - 3 - complex@__lpython_overloaded_9__complex - 7 __lpython_overloaded_9__complex - lpython_builtin - [] - __lpython_overloaded_9__complex - Public - ), - eps: - (Variable - 3 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - x: - (Variable - 3 - x - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 3 - y - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ) - }) - test_complex_abs - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [complex@__lpython_overloaded_9__complex] - [] - [(= - (Var 3 x) - (Cast - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 3 (Integer 4))) - ((IntegerConstant 4 (Integer 4)))] - (Complex 8) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 8) - ) - () - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 3.000000 - 4.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 3 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (Cast - (IntrinsicScalarFunction - Abs - [(Var 3 x)] - 0 - (Real 4) - () - ) - RealToReal - (Real 8) - () - ) - Sub - (RealConstant - 5.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - ) - (= - (Var 3 y) - (FunctionCall - 3 complex@__lpython_overloaded_9__complex - 3 complex - [((IntegerConstant 6 (Integer 4))) - ((IntegerConstant 8 (Integer 4)))] - (Complex 8) - (ComplexConstant - 6.000000 - 8.000000 - (Complex 8) - ) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (IntrinsicScalarFunction - Abs - [(Var 3 y)] - 0 - (Real 8) - () - ) - Sub - (RealConstant - 10.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 3 eps) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_complex_binop_32: - (Function - (SymbolTable - 4 - { - x: - (Variable - 4 - x - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - y: - (Variable - 4 - y - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ), - z: - (Variable - 4 - z - [] - Local - () - () - Default - (Complex 4) - () - Source - Public - Required - .false. - ) - }) - test_complex_binop_32 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 4 x) - (Cast - (ComplexBinOp - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 2.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 3.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 8) - ) - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 4 y) - (Cast - (ComplexBinOp - (Cast - (IntegerConstant 4 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 4.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 5.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 8) - ) - ) - ComplexToComplex - (Complex 4) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 4) - ) - ) - () - ) - (= - (Var 4 z) - (ComplexBinOp - (Var 4 x) - Add - (Var 4 y) - (Complex 4) - () - ) - () - ) - (= - (Var 4 z) - (ComplexBinOp - (Var 4 x) - Sub - (Var 4 y) - (Complex 4) - () - ) - () - ) - (= - (Var 4 z) - (ComplexBinOp - (Var 4 x) - Mul - (Var 4 y) - (Complex 4) - () - ) - () - ) - (= - (Var 4 z) - (ComplexBinOp - (Var 4 x) - Pow - (Var 4 y) - (Complex 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_complex_binop_64: - (Function - (SymbolTable - 5 - { - x: - (Variable - 5 - x - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - y: - (Variable - 5 - y - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ), - z: - (Variable - 5 - z - [] - Local - () - () - Default - (Complex 8) - () - Source - Public - Required - .false. - ) - }) - test_complex_binop_64 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 5 x) - (ComplexBinOp - (Cast - (IntegerConstant 2 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 2.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 3.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 2.000000 - 3.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 5 y) - (ComplexBinOp - (Cast - (IntegerConstant 4 (Integer 4)) - IntegerToComplex - (Complex 8) - (ComplexConstant - 4.000000 - 0.000000 - (Complex 8) - ) - ) - Add - (ComplexConstant - 0.000000 - 5.000000 - (Complex 8) - ) - (Complex 8) - (ComplexConstant - 4.000000 - 5.000000 - (Complex 8) - ) - ) - () - ) - (= - (Var 5 z) - (ComplexBinOp - (Var 5 x) - Add - (Var 5 y) - (Complex 8) - () - ) - () - ) - (= - (Var 5 z) - (ComplexBinOp - (Var 5 x) - Sub - (Var 5 y) - (Complex 8) - () - ) - () - ) - (= - (Var 5 z) - (ComplexBinOp - (Var 5 x) - Mul - (Var 5 y) - (Complex 8) - () - ) - () - ) - (= - (Var 5 z) - (ComplexBinOp - (Var 5 x) - Pow - (Var 5 y) - (Complex 8) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable -<<<<<<< HEAD -<<<<<<< HEAD - 134 - { - __main__global_stmts: - (ExternalSymbol - 134 -======= -<<<<<<< HEAD - 123 - { - __main__global_stmts: - (ExternalSymbol - 123 -======= - 136 - { - __main__global_stmts: - (ExternalSymbol - 136 ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 123 - { - __main__global_stmts: - (ExternalSymbol - 123 ->>>>>>> main - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall -<<<<<<< HEAD -<<<<<<< HEAD - 134 __main__global_stmts -======= -<<<<<<< HEAD - 123 __main__global_stmts -======= - 136 __main__global_stmts ->>>>>>> 1095cb6ff (Add isspace API in str) ->>>>>>> c359259eb (Add isspace API in str) -======= - 123 __main__global_stmts ->>>>>>> main - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_max_min-3c2fc51.stdout b/tests/reference/asr-test_max_min-3c2fc51.stdout deleted file mode 100644 index 6ebc1dd036..0000000000 --- a/tests/reference/asr-test_max_min-3c2fc51.stdout +++ /dev/null @@ -1,826 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable -<<<<<<< HEAD - 136 -======= - 123 ->>>>>>> main - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [check] - [] - [(SubroutineCall - 2 check - () - [] - () - )] - () - Public - .false. - .false. - () - ), - check: - (Function - (SymbolTable - 7 - { - - }) - check - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_max_int - test_max_float - test_min_int - test_min_float] - [] - [(SubroutineCall - 2 test_max_int - () - [] - () - ) - (SubroutineCall - 2 test_max_float - () - [] - () - ) - (SubroutineCall - 2 test_min_int - () - [] - () - ) - (SubroutineCall - 2 test_min_float - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_max_float: - (Function - (SymbolTable - 4 - { - d: - (Variable - 4 - d - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - e: - (Variable - 4 - e - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - f: - (Variable - 4 - f - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - max: - (ExternalSymbol - 4 - max - 8 max - lpython_builtin - [] - max - Private - ), - max@__lpython_overloaded_2__max: - (ExternalSymbol - 4 - max@__lpython_overloaded_2__max - 8 __lpython_overloaded_2__max - lpython_builtin - [] - __lpython_overloaded_2__max - Public - ), - max@__lpython_overloaded_3__max: - (ExternalSymbol - 4 - max@__lpython_overloaded_3__max - 8 __lpython_overloaded_3__max - lpython_builtin - [] - __lpython_overloaded_3__max - Public - ) - }) - test_max_float - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [max@__lpython_overloaded_2__max - max@__lpython_overloaded_3__max] - [] - [(= - (Var 4 d) - (RealConstant - 23.233000 - (Real 8) - ) - () - ) - (= - (Var 4 e) - (RealConstant - 23.223300 - (Real 8) - ) - () - ) - (= - (Var 4 f) - (RealConstant - 21.230000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (FunctionCall - 4 max@__lpython_overloaded_2__max - 4 max - [((Var 4 d)) - ((Var 4 e)) - ((Var 4 f))] - (Real 8) - () - () - ) - Eq - (Var 4 d) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (FunctionCall - 4 max@__lpython_overloaded_3__max - 4 max - [((Var 4 e)) - ((Var 4 f))] - (Real 8) - () - () - ) - Eq - (Var 4 e) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_max_int: - (Function - (SymbolTable - 3 - { - a: - (Variable - 3 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 3 - b - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 3 - c - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - max: - (ExternalSymbol - 3 - max - 8 max - lpython_builtin - [] - max - Private - ), - max@__lpython_overloaded_0__max: - (ExternalSymbol - 3 - max@__lpython_overloaded_0__max - 8 __lpython_overloaded_0__max - lpython_builtin - [] - __lpython_overloaded_0__max - Public - ), - max@__lpython_overloaded_1__max: - (ExternalSymbol - 3 - max@__lpython_overloaded_1__max - 8 __lpython_overloaded_1__max - lpython_builtin - [] - __lpython_overloaded_1__max - Public - ) - }) - test_max_int - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [max@__lpython_overloaded_0__max - max@__lpython_overloaded_1__max] - [] - [(= - (Var 3 a) - (IntegerConstant 1 (Integer 4)) - () - ) - (= - (Var 3 b) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 3 c) - (IntegerConstant 3 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 max@__lpython_overloaded_0__max - 3 max - [((Var 3 a)) - ((Var 3 b))] - (Integer 4) - () - () - ) - Eq - (Var 3 b) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 max@__lpython_overloaded_1__max - 3 max - [((Var 3 a)) - ((Var 3 b)) - ((Var 3 c))] - (Integer 4) - () - () - ) - Eq - (Var 3 c) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 max@__lpython_overloaded_1__max - 3 max - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 2 (Integer 4))) - ((IntegerConstant 3 (Integer 4)))] - (Integer 4) - (IntegerConstant 3 (Integer 4)) - () - ) - Eq - (IntegerConstant 3 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (FunctionCall - 3 max@__lpython_overloaded_0__max - 3 max - [((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 6 (Integer 4)))] - (Integer 4) - (IntegerConstant 6 (Integer 4)) - () - ) - Eq - (IntegerConstant 6 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ), - test_min_float: - (Function - (SymbolTable - 6 - { - d: - (Variable - 6 - d - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - e: - (Variable - 6 - e - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - f: - (Variable - 6 - f - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ) - }) - test_min_float - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 6 d) - (RealConstant - 23.233000 - (Real 8) - ) - () - ) - (= - (Var 6 e) - (RealConstant - 23.223300 - (Real 8) - ) - () - ) - (= - (Var 6 f) - (RealConstant - 21.230000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Min - [(Var 6 d) - (Var 6 e) - (Var 6 f)] - 0 - (Real 8) - () - ) - Eq - (Var 6 f) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Min - [(Var 6 e) - (Var 6 f)] - 0 - (Real 8) - () - ) - Eq - (Var 6 f) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_min_int: - (Function - (SymbolTable - 5 - { - a: - (Variable - 5 - a - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - b: - (Variable - 5 - b - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - c: - (Variable - 5 - c - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_min_int - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 5 a) - (IntegerConstant 1 (Integer 4)) - () - ) - (= - (Var 5 b) - (IntegerConstant 2 (Integer 4)) - () - ) - (= - (Var 5 c) - (IntegerConstant 3 (Integer 4)) - () - ) - (Assert - (IntegerCompare - (IntrinsicScalarFunction - Min - [(Var 5 a) - (Var 5 b)] - 0 - (Integer 4) - () - ) - Eq - (Var 5 a) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntrinsicScalarFunction - Min - [(Var 5 a) - (Var 5 b) - (Var 5 c)] - 0 - (Integer 4) - () - ) - Eq - (Var 5 a) - (Logical 4) - () - ) - () - ) - (Assert - (IntegerCompare - (IntrinsicScalarFunction - Min - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - 0 - (Integer 4) - (IntegerConstant 1 (Integer 4)) - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - ) - (Assert - (IntegerCompare - (IntrinsicScalarFunction - Min - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 6 (Integer 4))] - 0 - (Integer 4) - (IntegerConstant 1 (Integer 4)) - ) - Eq - (IntegerConstant 1 (Integer 4)) - (Logical 4) - (LogicalConstant - .true. - (Logical 4) - ) - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable -<<<<<<< HEAD - 137 - { - __main__global_stmts: - (ExternalSymbol - 137 -======= - 124 - { - __main__global_stmts: - (ExternalSymbol - 124 ->>>>>>> main - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 124 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-test_numpy_03-e600a49.stdout b/tests/reference/asr-test_numpy_03-e600a49.stdout deleted file mode 100644 index 6d062b182d..0000000000 --- a/tests/reference/asr-test_numpy_03-e600a49.stdout +++ /dev/null @@ -1,1962 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 218 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_reshape_with_argument] - [] - [(SubroutineCall - 2 test_reshape_with_argument - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_1d_to_nd: - (Function - (SymbolTable - 202 - { - a: - (Variable - 202 - a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 202 - b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - c: - (Variable - 202 - c - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - d: - (Variable - 202 - d - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 202 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 202 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 202 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 202 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - l: - (Variable - 202 - l - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - newshape: - (Variable - 202 - newshape - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - newshape1: - (Variable - 202 - newshape1 - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - test_1d_to_nd - (FunctionType - [(Array - (Real 8) - [(() - ())] - DescriptorArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 202 d)] - [(= - (Var 202 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 202 b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 202 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 256 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 255 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (Var 202 i) - (IntrinsicScalarFunction - FloorDiv - [(Var 202 k) - (IntegerConstant 16 (Integer 4))] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 202 j) - (IntegerBinOp - (Var 202 k) - Sub - (IntegerBinOp - (Var 202 i) - Mul - (IntegerConstant 16 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (ArrayItem - (Var 202 b) - [(() - (Var 202 k) - ())] - (Real 8) - RowMajor - () - ) - (RealBinOp - (Cast - (IntegerBinOp - (Var 202 i) - Add - (Var 202 j) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Add - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - ) - () - )] - ) - (= - (Var 202 a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 202 newshape) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 202 newshape) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 16 (Integer 4)) - () - ) - (= - (ArrayItem - (Var 202 newshape) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 16 (Integer 4)) - () - ) - (= - (Var 202 a) - (ArrayReshape - (Var 202 b) - (ArrayPhysicalCast - (Var 202 newshape) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 2 (Integer 4)))] - DescriptorArray - ) - () - ) - (Array - (Real 8) - [(() - ())] - FixedSizeArray - ) - () - ) - () - ) - (DoLoop - () - ((Var 202 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 202 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (ArrayItem - (Var 202 a) - [(() - (Var 202 i) - ()) - (() - (Var 202 j) - ())] - (Real 8) - RowMajor - () - ) - Sub - (Cast - (IntegerBinOp - (Var 202 i) - Add - (Var 202 j) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 202 eps) - (Logical 4) - () - ) - () - )] - )] - ) - (= - (Var 202 c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 202 newshape1) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 202 newshape1) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 16 (Integer 4)) - () - ) - (= - (ArrayItem - (Var 202 newshape1) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 16 (Integer 4)) - () - ) - (= - (ArrayItem - (Var 202 newshape1) - [(() - (IntegerConstant 2 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 16 (Integer 4)) - () - ) - (= - (Var 202 c) - (ArrayReshape - (Var 202 d) - (ArrayPhysicalCast - (Var 202 newshape1) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - DescriptorArray - ) - () - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - ) - () - ) - (DoLoop - () - ((Var 202 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 202 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 202 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (ArrayItem - (Var 202 c) - [(() - (Var 202 i) - ()) - (() - (Var 202 j) - ()) - (() - (Var 202 k) - ())] - (Real 8) - RowMajor - () - ) - Sub - (Cast - (IntegerBinOp - (IntegerBinOp - (Var 202 i) - Add - (Var 202 j) - (Integer 4) - () - ) - Add - (Var 202 k) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 202 eps) - (Logical 4) - () - ) - () - )] - )] - )] - )] - () - Public - .false. - .false. - () - ), - test_nd_to_1d: - (Function - (SymbolTable - 201 - { - a: - (Variable - 201 - a - [] - InOut - () - () - Default - (Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 201 - b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - c: - (Variable - 201 - c - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - d: - (Variable - 201 - d - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4096 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - eps: - (Variable - 201 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - i: - (Variable - 201 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 201 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 201 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - l: - (Variable - 201 - l - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - newshape: - (Variable - 201 - newshape - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - newshape1: - (Variable - 201 - newshape1 - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - test_nd_to_1d - (FunctionType - [(Array - (Real 8) - [(() - ()) - (() - ())] - DescriptorArray - )] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) -<<<<<<< HEAD -<<<<<<< HEAD -======= - [] - [(Var 201 a)] - [(= - (Var 201 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (= - (Var 201 b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 256 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 201 newshape) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 201 newshape) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 256 (Integer 4)) - () - ) - (= - (Var 201 b) - (ArrayReshape - (Var 201 a) - (ArrayPhysicalCast - (Var 201 newshape) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - DescriptorArray - ) - () - ) - (Array - (Real 8) - [(() - ())] - DescriptorArray - ) - () - ) - () - ) - (DoLoop - () - ((Var 201 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 256 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 255 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (Var 201 i) - (IntrinsicScalarFunction - FloorDiv - [(Var 201 k) - (IntegerConstant 16 (Integer 4))] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 201 j) - (IntegerBinOp - (Var 201 k) - Sub - (IntegerBinOp - (Var 201 i) - Mul - (IntegerConstant 16 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (ArrayItem - (Var 201 b) - [(() - (Var 201 k) - ())] - (Real 8) - RowMajor - () - ) - Sub - (Cast - (IntegerBinOp - (Var 201 i) - Add - (Var 201 j) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 201 eps) - (Logical 4) - () - ) - () - )] - ) - (= - (Var 201 c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 201 c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 201 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 201 k) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 201 c) - [(() - (Var 201 i) - ()) - (() - (Var 201 j) - ()) - (() - (Var 201 k) - ())] - (Real 8) - RowMajor - () - ) - (RealBinOp - (Cast - (IntegerBinOp - (IntegerBinOp - (Var 201 i) - Add - (Var 201 j) - (Integer 4) - () - ) - Add - (Var 201 k) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Add - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - ) - () - )] - )] - )] - ) - (= - (Var 201 d) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4096 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 201 newshape1) - (ArrayConstant - [] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (ArrayItem - (Var 201 newshape1) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - (IntegerConstant 4096 (Integer 4)) - () - ) - (= - (Var 201 d) - (ArrayReshape - (Var 201 c) - (ArrayPhysicalCast - (Var 201 newshape1) - FixedSizeArray - DescriptorArray - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 1 (Integer 4)))] - DescriptorArray - ) - () - ) - (Array - (Real 8) - [(() - ())] - FixedSizeArray - ) - () - ) - () - ) - (DoLoop - () - ((Var 201 l) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 4096 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 4095 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (Var 201 i) - (Cast - (RealBinOp - (Cast - (Var 201 l) - IntegerToReal - (Real 8) - () - ) - Div - (Cast - (IntegerConstant 256 (Integer 4)) - IntegerToReal - (Real 8) - (RealConstant - 256.000000 - (Real 8) - ) - ) - (Real 8) - () - ) - RealToInteger - (Integer 4) - () - ) - () - ) - (= - (Var 201 j) - (IntrinsicScalarFunction - FloorDiv - [(IntegerBinOp - (Var 201 l) - Sub - (IntegerBinOp - (Var 201 i) - Mul - (IntegerConstant 256 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - (IntegerConstant 16 (Integer 4))] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 201 k) - (IntegerBinOp - (IntegerBinOp - (Var 201 l) - Sub - (IntegerBinOp - (Var 201 i) - Mul - (IntegerConstant 256 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - Sub - (IntegerBinOp - (Var 201 j) - Mul - (IntegerConstant 16 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (RealBinOp - (ArrayItem - (Var 201 d) - [(() - (Var 201 l) - ())] - (Real 8) - RowMajor - () - ) - Sub - (Cast - (IntegerBinOp - (IntegerBinOp - (Var 201 i) - Add - (Var 201 j) - (Integer 4) - () - ) - Add - (Var 201 k) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - (Real 8) - () - ) - Sub - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - LtE - (Var 201 eps) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ), - test_reshape_with_argument: - (Function - (SymbolTable - 203 - { - a: - (Variable - 203 - a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - d: - (Variable - 203 - d - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4096 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 203 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - j: - (Variable - 203 - j - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - k: - (Variable - 203 - k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - l: - (Variable - 203 - l - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - test_reshape_with_argument - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) ->>>>>>> main - [test_nd_to_1d - test_1d_to_nd] - [] - [(= - (Var 203 a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 214 c) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 203 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(DoLoop - () - ((Var 203 j) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 16 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 15 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 203 a) - [(() - (Var 203 i) - ()) - (() - (Var 203 j) - ())] - (Real 8) - RowMajor - () - ) - (RealBinOp - (Cast - (IntegerBinOp - (Var 203 i) - Add - (Var 203 j) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Add - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - ) - () - )] - )] - ) - (SubroutineCall - 2 test_nd_to_1d - () - [((ArrayPhysicalCast - (Var 203 a) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4))) - ((IntegerConstant 0 (Integer 4)) - (IntegerConstant 16 (Integer 4)))] - DescriptorArray - ) - () - ))] - () - ) - (= - (Var 203 d) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4096 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 203 l) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 4096 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 4095 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (Var 203 i) - (Cast - (RealBinOp - (Cast - (Var 203 l) - IntegerToReal - (Real 8) - () - ) - Div - (Cast - (IntegerConstant 256 (Integer 4)) - IntegerToReal - (Real 8) - (RealConstant - 256.000000 - (Real 8) - ) - ) - (Real 8) - () - ) - RealToInteger - (Integer 4) - () - ) - () - ) - (= - (Var 203 j) - (IntrinsicScalarFunction - FloorDiv - [(IntegerBinOp - (Var 203 l) - Sub - (IntegerBinOp - (Var 203 i) - Mul - (IntegerConstant 256 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - (IntegerConstant 16 (Integer 4))] - 0 - (Integer 4) - () - ) - () - ) - (= - (Var 203 k) - (IntegerBinOp - (IntegerBinOp - (Var 203 l) - Sub - (IntegerBinOp - (Var 203 i) - Mul - (IntegerConstant 256 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - Sub - (IntegerBinOp - (Var 203 j) - Mul - (IntegerConstant 16 (Integer 4)) - (Integer 4) - () - ) - (Integer 4) - () - ) - () - ) - (= - (ArrayItem - (Var 203 d) - [(() - (Var 203 l) - ())] - (Real 8) - RowMajor - () - ) - (RealBinOp - (Cast - (IntegerBinOp - (IntegerBinOp - (Var 203 i) - Add - (Var 203 j) - (Integer 4) - () - ) - Add - (Var 203 k) - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Add - (RealConstant - 0.500000 - (Real 8) - ) - (Real 8) - () - ) - () - )] - ) - (SubroutineCall - 2 test_1d_to_nd - () - [((ArrayPhysicalCast - (Var 203 d) - FixedSizeArray - DescriptorArray - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 4096 (Integer 4)))] - DescriptorArray - ) - () - ))] - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 219 - { - __main__global_stmts: - (ExternalSymbol - 219 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 219 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-test_numpy_04-ecbb614.stdout b/tests/reference/asr-test_numpy_04-ecbb614.stdout deleted file mode 100644 index 90f4b193b1..0000000000 --- a/tests/reference/asr-test_numpy_04-ecbb614.stdout +++ /dev/null @@ -1,519 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 204 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [check] - [] - [(SubroutineCall - 2 check - () - [] - () - )] - () - Public - .false. - .false. - () - ), - check: - (Function - (SymbolTable - 203 - { - - }) - check - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [test_array_01 - test_array_02] - [] - [(SubroutineCall - 2 test_array_01 - () - [] - () - ) - (SubroutineCall - 2 test_array_02 - () - [] - () - )] - () - Public - .false. - .false. - () - ), - test_array_01: - (Function - (SymbolTable - 201 - { - eps: - (Variable - 201 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - x: - (Variable - 201 - x - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - test_array_01 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 201 x) - (ArrayConstant - [(RealConstant - 1.000000 - (Real 8) - ) - (RealConstant - 2.000000 - (Real 8) - ) - (RealConstant - 3.000000 - (Real 8) - )] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (= - (Var 201 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ArrayItem - (Var 201 x) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - Sub - (RealConstant - 1.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 201 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ArrayItem - (Var 201 x) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - Sub - (RealConstant - 2.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 201 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (IntrinsicScalarFunction - Abs - [(RealBinOp - (ArrayItem - (Var 201 x) - [(() - (IntegerConstant 2 (Integer 4)) - ())] - (Real 8) - RowMajor - () - ) - Sub - (RealConstant - 3.000000 - (Real 8) - ) - (Real 8) - () - )] - 0 - (Real 8) - () - ) - Lt - (Var 201 eps) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ), - test_array_02: - (Function - (SymbolTable - 202 - { - eps: - (Variable - 202 - eps - [] - Local - () - () - Default - (Real 8) - () - Source - Public - Required - .false. - ), - x: - (Variable - 202 - x - [] - Local - () - () - Default - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ) - }) - test_array_02 - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 202 x) - (ArrayConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4))] - (Array - (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 3 (Integer 4)))] - PointerToDataArray - ) - RowMajor - ) - () - ) - (= - (Var 202 eps) - (RealConstant - 0.000000 - (Real 8) - ) - () - ) - (Assert - (RealCompare - (Cast - (IntrinsicScalarFunction - Abs - [(IntegerBinOp - (ArrayItem - (Var 202 x) - [(() - (IntegerConstant 0 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - )] - 0 - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Lt - (Var 202 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (Cast - (IntrinsicScalarFunction - Abs - [(IntegerBinOp - (ArrayItem - (Var 202 x) - [(() - (IntegerConstant 1 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - Sub - (IntegerConstant 2 (Integer 4)) - (Integer 4) - () - )] - 0 - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Lt - (Var 202 eps) - (Logical 4) - () - ) - () - ) - (Assert - (RealCompare - (Cast - (IntrinsicScalarFunction - Abs - [(IntegerBinOp - (ArrayItem - (Var 202 x) - [(() - (IntegerConstant 2 (Integer 4)) - ())] - (Integer 4) - RowMajor - () - ) - Sub - (IntegerConstant 3 (Integer 4)) - (Integer 4) - () - )] - 0 - (Integer 4) - () - ) - IntegerToReal - (Real 8) - () - ) - Lt - (Var 202 eps) - (Logical 4) - () - ) - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 205 - { - __main__global_stmts: - (ExternalSymbol - 205 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 205 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/asr-test_pow-3f5d550.stdout b/tests/reference/asr-test_pow-3f5d550.stdout deleted file mode 100644 index 5e658298dc..0000000000 --- a/tests/reference/asr-test_pow-3f5d550.stdout +++ /dev/null @@ -1,159 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 119 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [main] - [] - [(SubroutineCall - 2 main - () - [] - () - )] - () - Public - .false. - .false. - () - ), - main: - (Function - (SymbolTable - 3 - { - pow: - (ExternalSymbol - 3 - pow - 4 pow - lpython_builtin - [] - pow - Private - ), - pow@__lpython_overloaded_0__pow: - (ExternalSymbol - 3 - pow@__lpython_overloaded_0__pow - 4 __lpython_overloaded_0__pow - lpython_builtin - [] - __lpython_overloaded_0__pow - Public - ) - }) - main - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [pow@__lpython_overloaded_0__pow] - [] - [(Print - () - [(FunctionCall - 3 pow@__lpython_overloaded_0__pow - 3 pow - [((IntegerConstant 2 (Integer 4))) - ((IntegerConstant 2 (Integer 4)))] - (Real 8) - (RealConstant - 4.000000 - (Real 8) - ) - () - )] - () - () - ) - (Print - () - [(IntegerBinOp - (IntegerConstant 2 (Integer 4)) - Pow - (IntegerConstant 2 (Integer 4)) - (Integer 4) - (IntegerConstant 4 (Integer 4)) - )] - () - () - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [lpython_builtin] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 120 - { - __main__global_stmts: - (ExternalSymbol - 120 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 120 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ) - }) - [] -) diff --git a/tests/reference/asr-vec_01-66ac423.stdout b/tests/reference/asr-vec_01-66ac423.stdout deleted file mode 100644 index db5dab97b0..0000000000 --- a/tests/reference/asr-vec_01-66ac423.stdout +++ /dev/null @@ -1,295 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 205 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [loop_vec] - [] - [(SubroutineCall - 2 loop_vec - () - [] - () - )] - () - Public - .false. - .false. - () - ), - loop_vec: - (Function - (SymbolTable - 201 - { - a: - (Variable - 201 - a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 201 - b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 201 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - loop_vec - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [] - [(= - (Var 201 a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 201 b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 9216 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 9215 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 201 b) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - (RealConstant - 5.000000 - (Real 8) - ) - () - )] - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 9216 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 9215 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 201 a) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - (ArrayItem - (Var 201 b) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - () - )] - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 9216 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 9215 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (ArrayItem - (Var 201 a) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - Eq - (RealConstant - 5.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 206 - { - __main__global_stmts: - (ExternalSymbol - 206 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 206 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -) diff --git a/tests/reference/c-expr7-bb2692a.stdout b/tests/reference/c-expr7-bb2692a.stdout deleted file mode 100644 index b85fda16c9..0000000000 --- a/tests/reference/c-expr7-bb2692a.stdout +++ /dev/null @@ -1,362 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include - -float _lcompilers_optimization_floordiv_f32(float a, float b); -double _lcompilers_optimization_floordiv_f64(double a, double b); -int16_t _lcompilers_optimization_floordiv_i16(int16_t a, int16_t b); -int32_t _lcompilers_optimization_floordiv_i32(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i321(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i3210(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i322(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i323(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i324(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i325(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i326(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i327(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i328(int32_t a, int32_t b); -int32_t _lcompilers_optimization_floordiv_i329(int32_t a, int32_t b); -int64_t _lcompilers_optimization_floordiv_i64(int64_t a, int64_t b); -int8_t _lcompilers_optimization_floordiv_i8(int8_t a, int8_t b); -uint16_t _lcompilers_optimization_floordiv_u16(uint16_t a, uint16_t b); -uint32_t _lcompilers_optimization_floordiv_u32(uint32_t a, uint32_t b); -uint64_t _lcompilers_optimization_floordiv_u64(uint64_t a, uint64_t b); -uint8_t _lcompilers_optimization_floordiv_u8(uint8_t a, uint8_t b); -void test_pow(); -int32_t test_pow_1(int32_t a, int32_t b); -void main0(); -void __main__global_stmts(); - - - -// Implementations -float _lcompilers_optimization_floordiv_f32(float a, float b) -{ - double r; - float result; - int64_t tmp; - r = a/b; - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (float)(tmp); - return result; -} - -double _lcompilers_optimization_floordiv_f64(double a, double b) -{ - double r; - double result; - int64_t tmp; - r = a/b; - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (double)(tmp); - return result; -} - -int16_t _lcompilers_optimization_floordiv_i16(int16_t a, int16_t b) -{ - double r; - int16_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i32(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i321(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i3210(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i322(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i323(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i324(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i325(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i326(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i327(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i328(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int32_t _lcompilers_optimization_floordiv_i329(int32_t a, int32_t b) -{ - double r; - int32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int64_t _lcompilers_optimization_floordiv_i64(int64_t a, int64_t b) -{ - double r; - int64_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -int8_t _lcompilers_optimization_floordiv_i8(int8_t a, int8_t b) -{ - double r; - int8_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = tmp; - return result; -} - -uint16_t _lcompilers_optimization_floordiv_u16(uint16_t a, uint16_t b) -{ - double r; - uint16_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (uint16_t)(tmp); - return result; -} - -uint32_t _lcompilers_optimization_floordiv_u32(uint32_t a, uint32_t b) -{ - double r; - uint32_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (uint32_t)(tmp); - return result; -} - -uint64_t _lcompilers_optimization_floordiv_u64(uint64_t a, uint64_t b) -{ - double r; - uint64_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (uint64_t)(tmp); - return result; -} - -uint8_t _lcompilers_optimization_floordiv_u8(uint8_t a, uint8_t b) -{ - double r; - uint8_t result; - int64_t tmp; - r = (double)(a)/(double)(b); - tmp = (int64_t)(r); - if (r < 0.00000000000000000e+00 && (double)(tmp) != r) { - tmp = tmp - 1; - } - result = (uint8_t)(tmp); - return result; -} - -double __lpython_overloaded_0__pow(int32_t x, int32_t y) -{ - double _lpython_return_variable; - _lpython_return_variable = (double)(pow(x, y)); - return _lpython_return_variable; -} - -float _lfortran_caimag(float_complex_t x); - -double _lfortran_zaimag(double_complex_t x); - -void test_pow() -{ - int32_t a; - a = (int32_t)( 4.00000000000000000e+00); -} - -int32_t test_pow_1(int32_t a, int32_t b) -{ - int32_t _lpython_return_variable; - int32_t res; - res = (int32_t)(__lpython_overloaded_0__pow(a, b)); - _lpython_return_variable = res; - return _lpython_return_variable; -} - -void main0() -{ - int32_t c; - test_pow(); - c = test_pow_1(1, 2); -} - -void __main__global_stmts() -{ - main0(); -} - -int main(int argc, char* argv[]) -{ - _lpython_set_argv(argc, argv); - __main__global_stmts(); - return 0; -} diff --git a/tests/reference/cpp-expr15-1661c0d.stdout b/tests/reference/cpp-expr15-1661c0d.stdout deleted file mode 100644 index f1932205ba..0000000000 --- a/tests/reference/cpp-expr15-1661c0d.stdout +++ /dev/null @@ -1,92 +0,0 @@ -#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 __main__global_stmts(); -double test1(); -std::complex test2(); -int32_t test3(); -std::complex __lpython_overloaded_9__complex(int32_t x, int32_t y); -float _lfortran_caimag(std::complex x); -double _lfortran_zaimag(std::complex x); -namespace { -} - -// Implementations -std::complex __lpython_overloaded_9__complex(int32_t x, int32_t y) -{ - std::complex _lpython_return_variable; - _lpython_return_variable = std::complex(x) + std::complex(y)*std::complex(0.000000, 1.000000); - return _lpython_return_variable; -} - -float _lfortran_caimag(std::complex x); - -double _lfortran_zaimag(std::complex x); - -double test1() -{ - double _lpython_return_variable; - double x; - x = 1.00000000000000000e+00; - _lpython_return_variable = x; - return _lpython_return_variable; -} - -std::complex test2() -{ - std::complex _lpython_return_variable; - std::complex x; - x = __lpython_overloaded_9__complex(2, 2); - _lpython_return_variable = x; - return _lpython_return_variable; -} - -int32_t test3() -{ - int32_t _lpython_return_variable; - std::complex x; - std::complex y; - x = std::complex(0.000000, 4.000000); - y = std::complex(0.000000, 4.000000); - _lpython_return_variable = 0; - return _lpython_return_variable; -} - -void __main__global_stmts() -{ - std::cout << test1() << std::endl; - std::cout << test2() << std::endl; - std::cout << test3() << std::endl; -} - -namespace { - -void main2() { - __main__global_stmts(); -} - -} -int main(int argc, char* argv[]) -{ - Kokkos::initialize(argc, argv); - main2(); - Kokkos::finalize(); - return 0; -} diff --git a/tests/reference/cpp-expr7-529bd53.stdout b/tests/reference/cpp-expr7-529bd53.stdout deleted file mode 100644 index 81158df8ae..0000000000 --- a/tests/reference/cpp-expr7-529bd53.stdout +++ /dev/null @@ -1,83 +0,0 @@ -#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 __main__global_stmts(); -void main0(); -void test_pow(); -int32_t test_pow_1(int32_t a, int32_t b); -double __lpython_overloaded_0__pow(int32_t x, int32_t y); -float _lfortran_caimag(std::complex x); -double _lfortran_zaimag(std::complex x); -namespace { -} - -// Implementations -double __lpython_overloaded_0__pow(int32_t x, int32_t y) -{ - double _lpython_return_variable; - _lpython_return_variable = (double)(std::pow(x, y)); - return _lpython_return_variable; -} - -float _lfortran_caimag(std::complex x); - -double _lfortran_zaimag(std::complex x); - -void test_pow() -{ - int32_t a; - a = (int32_t)(__lpython_overloaded_0__pow(2, 2)); -} - -int32_t test_pow_1(int32_t a, int32_t b) -{ - int32_t _lpython_return_variable; - int32_t res; - res = (int32_t)(__lpython_overloaded_0__pow(a, b)); - _lpython_return_variable = res; - return _lpython_return_variable; -} - -void main0() -{ - int32_t c; - test_pow(); - c = test_pow_1(1, 2); -} - -void __main__global_stmts() -{ - main0(); -} - -namespace { - -void main2() { - __main__global_stmts(); -} - -} -int main(int argc, char* argv[]) -{ - Kokkos::initialize(argc, argv); - main2(); - Kokkos::finalize(); - return 0; -} diff --git a/tests/reference/cpp-expr8-704cece.stdout b/tests/reference/cpp-expr8-704cece.stdout deleted file mode 100644 index ea744708f9..0000000000 --- a/tests/reference/cpp-expr8-704cece.stdout +++ /dev/null @@ -1,37 +0,0 @@ -#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() { -} - -} -int main(int argc, char* argv[]) -{ - Kokkos::initialize(argc, argv); - main2(); - Kokkos::finalize(); - return 0; -} diff --git a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout b/tests/reference/cpp-test_builtin_pow-56b3f92.stdout deleted file mode 100644 index 8c7a59f313..0000000000 --- a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout +++ /dev/null @@ -1,269 +0,0 @@ -#include -#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 __main__global_stmts(); -void test_pow(); -double __lpython_overloaded_0__pow(int32_t x, int32_t y); -int32_t __lpython_overloaded_10__pow(int32_t x, int32_t y, int32_t z); -int64_t __lpython_overloaded_11__pow(int64_t x, int64_t y, int64_t z); -double __lpython_overloaded_1__pow(int64_t x, int64_t y); -int32_t __lpython_overloaded_2___mod(int32_t a, int32_t b); -float __lpython_overloaded_2__pow(float x, float y); -double __lpython_overloaded_3__pow(double x, double y); -float __lpython_overloaded_4__pow(int32_t x, float y); -float __lpython_overloaded_5__pow(float x, int32_t y); -double __lpython_overloaded_6__pow(int32_t x, double y); -double __lpython_overloaded_7__pow(double x, int32_t y); -int64_t __lpython_overloaded_8___mod(int64_t a, int64_t b); -int32_t __lpython_overloaded_8__pow(bool x, bool y); -std::complex __lpython_overloaded_9__complex(int32_t x, int32_t y); -std::complex __lpython_overloaded_9__pow(std::complex c, int32_t y); -float _lfortran_caimag(std::complex x); -double _lfortran_zaimag(std::complex x); -namespace { -} - -// Implementations -double __lpython_overloaded_0__pow(int32_t x, int32_t y) -{ - double _lpython_return_variable; - _lpython_return_variable = (double)(std::pow(x, y)); - return _lpython_return_variable; -} - -int32_t __lpython_overloaded_2___mod(int32_t a, int32_t b) -{ - int32_t _lpython_return_variable; - _lpython_return_variable = a - floordiv(a)*b; - return _lpython_return_variable; -} - -int32_t __lpython_overloaded_10__pow(int32_t x, int32_t y, int32_t z) -{ - int32_t _lpython_return_variable; - int32_t result; - if (y < 0) { - std::cerr << "ERROR STOP" << std::endl; - exit(1); - } - result = __lpython_overloaded_2___mod(std::pow(x, y), z); - _lpython_return_variable = result; - return _lpython_return_variable; -} - -int64_t __lpython_overloaded_8___mod(int64_t a, int64_t b) -{ - int64_t _lpython_return_variable; - _lpython_return_variable = a - floordiv(a)*b; - return _lpython_return_variable; -} - -int64_t __lpython_overloaded_11__pow(int64_t x, int64_t y, int64_t z) -{ - int64_t _lpython_return_variable; - int64_t result; - if (y < 0) { - std::cerr << "ERROR STOP" << std::endl; - exit(1); - } - result = __lpython_overloaded_8___mod(std::pow(x, y), z); - _lpython_return_variable = result; - return _lpython_return_variable; -} - -double __lpython_overloaded_1__pow(int64_t x, int64_t y) -{ - double _lpython_return_variable; - _lpython_return_variable = (double)(std::pow(x, y)); - return _lpython_return_variable; -} - -float __lpython_overloaded_2__pow(float x, float y) -{ - float _lpython_return_variable; - _lpython_return_variable = std::pow(x, y); - return _lpython_return_variable; -} - -double __lpython_overloaded_3__pow(double x, double y) -{ - double _lpython_return_variable; - _lpython_return_variable = std::pow(x, y); - return _lpython_return_variable; -} - -float __lpython_overloaded_4__pow(int32_t x, float y) -{ - float _lpython_return_variable; - _lpython_return_variable = std::pow((float)(x), y); - return _lpython_return_variable; -} - -float __lpython_overloaded_5__pow(float x, int32_t y) -{ - float _lpython_return_variable; - _lpython_return_variable = std::pow(x, (float)(y)); - return _lpython_return_variable; -} - -double __lpython_overloaded_6__pow(int32_t x, double y) -{ - double _lpython_return_variable; - _lpython_return_variable = std::pow((double)(x), y); - return _lpython_return_variable; -} - -double __lpython_overloaded_7__pow(double x, int32_t y) -{ - double _lpython_return_variable; - _lpython_return_variable = std::pow(x, (double)(y)); - return _lpython_return_variable; -} - -int32_t __lpython_overloaded_8__pow(bool x, bool y) -{ - int32_t _lpython_return_variable; - if (y && !x) { - _lpython_return_variable = 0; - return _lpython_return_variable; - } - _lpython_return_variable = 1; - return _lpython_return_variable; -} - -std::complex __lpython_overloaded_9__complex(int32_t x, int32_t y) -{ - std::complex _lpython_return_variable; - _lpython_return_variable = std::complex(x) + std::complex(y)*std::complex(0.000000, 1.000000); - return _lpython_return_variable; -} - -std::complex __lpython_overloaded_9__pow(std::complex c, int32_t y) -{ - std::complex _lpython_return_variable; - _lpython_return_variable = std::pow(c, std::complex(y)); - return _lpython_return_variable; -} - -float _lfortran_caimag(std::complex x); - -double _lfortran_zaimag(std::complex x); - -void test_pow() -{ - int32_t a; - double a1; - double a2; - int32_t b; - bool b1; - bool b2; - std::complex c1; - double eps; - float f1; - float f2; - int64_t i; - int64_t i1; - int64_t i2; - int64_t j; - int64_t k; - float p; - int32_t x; - double y; - eps = 9.99999999999999980e-13; - a = 2; - b = 5; - assert ((int32_t)(__lpython_overloaded_0__pow(a, b)) == 32); - a = 6; - b = 3; - assert ((int32_t)(__lpython_overloaded_0__pow(a, b)) == 216); - a = 2; - b = 0; - assert ((int32_t)(__lpython_overloaded_0__pow(a, b)) == 1); - a = 2; - b = -1; - a = 6; - b = -4; - i1 = 2; - i2 = 5; - assert ((int64_t)(__lpython_overloaded_1__pow(i1, i2)) == 32); - i1 = 6; - i2 = -3; - f1 = (double)(525346)/(double)(66456); - f2 = 3.00000000000000000e+00; - p = __lpython_overloaded_2__pow(f1, f2); - f1 = __lpython_overloaded_4__pow(a, f2); - f1 = __lpython_overloaded_5__pow(f2, a); - b1 = true; - b2 = false; - assert (__lpython_overloaded_8__pow(b1, b2) == 1); - assert (__lpython_overloaded_8__pow(b2, b1) == 0); - assert (__lpython_overloaded_8__pow(b1, b2) == 1); - assert (__lpython_overloaded_8__pow(false, false) == 1); - a1 = 4.50000000000000000e+00; - a2 = 2.29999999999999982e+00; - assert (abs(__lpython_overloaded_3__pow(a1, a2) - 3.17971929089206000e+01) < eps); - assert (abs(__lpython_overloaded_3__pow(a2, a1) - 4.24399889427765871e+01) < eps); - x = 3; - y = 2.29999999999999982e+00; - assert (abs(__lpython_overloaded_6__pow(x, y) - 1.25135025328431819e+01) < eps); - assert (abs(__lpython_overloaded_7__pow(y, x) - 1.21669999999999980e+01) < eps); - assert (abs(__lpython_overloaded_6__pow(x, 5.50000000000000000e+00) - 4.20888346239237194e+02) < eps); - assert (abs(__lpython_overloaded_1__pow(2, -1) - 5.00000000000000000e-01) < eps); - assert (abs(__lpython_overloaded_1__pow(6, -4) - 7.71604938271604895e-04) < eps); - assert (abs(__lpython_overloaded_1__pow(-3, -5) + 4.11522633744856002e-03) < eps); - assert (abs(__lpython_overloaded_1__pow(6, -4) - 7.71604938271604895e-04) < eps); - assert (abs(__lpython_overloaded_3__pow( 4.50000000000000000e+00, 2.29999999999999982e+00) - 3.17971929089206000e+01) < eps); - assert (abs(__lpython_overloaded_3__pow( 2.29999999999999982e+00, 0.00000000000000000e+00) - 1.00000000000000000e+00) < eps); - assert (abs(__lpython_overloaded_3__pow( 2.29999999999999982e+00, - 1.50000000000000000e+00) - 2.86687162345994395e-01) < eps); - assert (abs(__lpython_overloaded_6__pow(2, 3.39999999999999991e+00) - 1.05560632861831536e+01) < eps); - assert (abs(__lpython_overloaded_6__pow(2, - 3.39999999999999991e+00) - 9.47322854068998882e-02) < eps); - assert (abs(__lpython_overloaded_7__pow( 3.39999999999999991e+00, 9) - 6.07169927664639836e+04) < eps); - assert (abs(__lpython_overloaded_7__pow( 0.00000000000000000e+00, 53) - 0.00000000000000000e+00) < eps); - assert ((int32_t)(__lpython_overloaded_0__pow(4, 2)) == 16); - assert (abs(__lpython_overloaded_7__pow(- 4.23500000000000000e+03, 52) - 3.94800380598526379e+188) < eps); - i = 7; - j = 2; - k = 5; - assert (__lpython_overloaded_11__pow(i, j, k) == 4); - assert (__lpython_overloaded_10__pow(102, 3, 121) == 38); - c1 = __lpython_overloaded_9__complex(4, 5); - c1 = __lpython_overloaded_9__pow(c1, 4); -} - -void __main__global_stmts() -{ - test_pow(); -} - -namespace { - -void main2() { - __main__global_stmts(); -} - -} -int main(int argc, char* argv[]) -{ - Kokkos::initialize(argc, argv); - main2(); - Kokkos::finalize(); - return 0; -} diff --git a/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout deleted file mode 100644 index 9add220de0..0000000000 --- a/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout +++ /dev/null @@ -1,527 +0,0 @@ -(TranslationUnit - (SymbolTable - 1 - { - __main__: - (Module - (SymbolTable - 2 - { - __main__global_stmts: - (Function - (SymbolTable - 205 - { - - }) - __main__global_stmts - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [loop_vec] - [] - [(SubroutineCall - 2 loop_vec - () - [] - () - )] - () - Public - .false. - .false. - () - ), - loop_vec: - (Function - (SymbolTable - 201 - { - a: - (Variable - 201 - a - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - b: - (Variable - 201 - b - [] - Local - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - i: - (Variable - 201 - i - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - vector_copy_f64[9216]f64[9216]i32@IntrinsicOptimization: - (Function - (SymbolTable - 207 - { - __1_k: - (Variable - 207 - __1_k - [] - Local - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - arg0: - (Variable - 207 - arg0 - [] - In - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - arg1: - (Variable - 207 - arg1 - [] - In - () - () - Default - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - () - Source - Public - Required - .false. - ), - arg2: - (Variable - 207 - arg2 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - arg3: - (Variable - 207 - arg3 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - arg4: - (Variable - 207 - arg4 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ), - arg5: - (Variable - 207 - arg5 - [] - In - () - () - Default - (Integer 4) - () - Source - Public - Required - .false. - ) - }) - vector_copy_f64[9216]f64[9216]i32@IntrinsicOptimization - (FunctionType - [(Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - (Integer 4) - (Integer 4) - (Integer 4) - (Integer 4)] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [] - [(Var 207 arg0) - (Var 207 arg1) - (Var 207 arg2) - (Var 207 arg3) - (Var 207 arg4) - (Var 207 arg5)] - [(= - (Var 207 __1_k) - (IntegerBinOp - (Var 207 arg2) - Sub - (Var 207 arg4) - (Integer 4) - () - ) - () - ) - (WhileLoop - () - (IntegerCompare - (IntegerBinOp - (Var 207 __1_k) - Add - (Var 207 arg4) - (Integer 4) - () - ) - Lt - (Var 207 arg3) - (Logical 4) - () - ) - [(= - (Var 207 __1_k) - (IntegerBinOp - (Var 207 __1_k) - Add - (Var 207 arg4) - (Integer 4) - () - ) - () - ) - (= - (ArrayItem - (Var 207 arg0) - [(() - (Var 207 __1_k) - ())] - (Real 8) - RowMajor - () - ) - (ArrayItem - (Var 207 arg1) - [(() - (Var 207 __1_k) - ())] - (Real 8) - RowMajor - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ) - }) - loop_vec - (FunctionType - [] - () - Source - Implementation - () - .false. - .false. - .false. - .false. - .false. - [] - .false. - ) - [vector_copy_f64[9216]f64[9216]i32@IntrinsicOptimization] - [] - [(= - (Var 201 a) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (= - (Var 201 b) - (ArrayConstant - [] - (Array - (Real 8) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 9216 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - () - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 9216 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 9215 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(= - (ArrayItem - (Var 201 b) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - (RealConstant - 5.000000 - (Real 8) - ) - () - )] - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerConstant 1151 (Integer 4)) - (IntegerConstant 1 (Integer 4))) - [(SubroutineCall - 201 vector_copy_f64[9216]f64[9216]i32@IntrinsicOptimization - () - [((Var 201 a)) - ((Var 201 b)) - ((IntegerBinOp - (Var 201 i) - Mul - (IntegerConstant 8 (Integer 4)) - (Integer 4) - () - )) - ((IntegerBinOp - (IntegerBinOp - (Var 201 i) - Add - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () - ) - Mul - (IntegerConstant 8 (Integer 4)) - (Integer 4) - () - )) - ((IntegerConstant 1 (Integer 4))) - ((IntegerConstant 8 (Integer 4)))] - () - )] - ) - (DoLoop - () - ((Var 201 i) - (IntegerConstant 0 (Integer 4)) - (IntegerBinOp - (IntegerConstant 9216 (Integer 4)) - Sub - (IntegerConstant 1 (Integer 4)) - (Integer 4) - (IntegerConstant 9215 (Integer 4)) - ) - (IntegerConstant 1 (Integer 4))) - [(Assert - (RealCompare - (ArrayItem - (Var 201 a) - [(() - (Var 201 i) - ())] - (Real 8) - RowMajor - () - ) - Eq - (RealConstant - 5.000000 - (Real 8) - ) - (Logical 4) - () - ) - () - )] - )] - () - Public - .false. - .false. - () - ) - }) - __main__ - [numpy] - .false. - .false. - ), - lpython_builtin: - (IntrinsicModule lpython_builtin), - main_program: - (Program - (SymbolTable - 206 - { - __main__global_stmts: - (ExternalSymbol - 206 - __main__global_stmts - 2 __main__global_stmts - __main__ - [] - __main__global_stmts - Public - ) - }) - main_program - [__main__] - [(SubroutineCall - 206 __main__global_stmts - 2 __main__global_stmts - [] - () - )] - ), - numpy: - (Module numpy) - }) - [] -)