From 65bf0f1d03ae37ea71f91f49dad160426b4dfec7 Mon Sep 17 00:00:00 2001 From: swamishiju Date: Thu, 8 Jan 2026 22:56:45 +0530 Subject: [PATCH 1/2] CHORE: Updated compiler options --- libasr | 2 +- src/bin/lpython.cpp | 4 ---- src/lpython/python_evaluator.cpp | 13 ------------ src/lpython/python_kernel.cpp | 1 - src/lpython/tests/test_llvm.cpp | 35 -------------------------------- 5 files changed, 1 insertion(+), 54 deletions(-) diff --git a/libasr b/libasr index f2a04fc2ae..e84b66d34e 160000 --- a/libasr +++ b/libasr @@ -1 +1 @@ -Subproject commit f2a04fc2ae4dd9ccb940c0fee3f694791fec7005 +Subproject commit e84b66d34ecc4a8b85477cbc3899ecb667ed7d4a diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 573a5a9658..814f5d905c 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -1880,8 +1880,6 @@ int main(int argc, char *argv[]) // app.add_option("-J", arg_J, "Where to save mod files"); app.add_flag("--jit", to_jit, "Execute the program using just-in-time (JIT) compiler"); app.add_flag("-g", compiler_options.emit_debug_info, "Compile with debugging information"); - app.add_flag("--debug-with-line-column", compiler_options.emit_debug_line_column, - "Convert the linear location info into line + column in the debugging information"); // app.add_option("-D", compiler_options.c_preprocessor_defines, "Define = (or 1 if omitted)")->allow_extra_args(false); app.add_flag("--version", arg_version, "Display compiler version information"); @@ -2085,7 +2083,6 @@ int main(int argc, char *argv[]) lpython_pass_manager.parse_pass_arg(arg_pass, skip_pass); lpython_pass_manager.use_default_passes(); compiler_options.po.disable_main = true; - compiler_options.emit_debug_line_column = false; compiler_options.separate_compilation = false; return interactive_python_repl(lpython_pass_manager, compiler_options, arg_v); #else @@ -2225,7 +2222,6 @@ int main(int argc, char *argv[]) return 1; } compiler_options.emit_debug_info = false; - compiler_options.emit_debug_line_column = false; compiler_options.separate_compilation = false; return compile_python_using_llvm(arg_file, "", runtime_library_dir, lpython_pass_manager, compiler_options, time_report, false, true); diff --git a/src/lpython/python_evaluator.cpp b/src/lpython/python_evaluator.cpp index b9d59f22f8..34a85169b3 100644 --- a/src/lpython/python_evaluator.cpp +++ b/src/lpython/python_evaluator.cpp @@ -445,19 +445,6 @@ Result> PythonCompiler::get_llvm3( ) { #ifdef HAVE_LFORTRAN_LLVM - if (compiler_options.emit_debug_info) { - if (!compiler_options.emit_debug_line_column) { - diagnostics.add(LCompilers::diag::Diagnostic( - "The `emit_debug_line_column` is not enabled; please use the " - "`--debug-with-line-column` option to get the correct " - "location information", - LCompilers::diag::Level::Error, - LCompilers::diag::Stage::Semantic, {}) - ); - Error err; - return err; - } - } // ASR -> LLVM std::unique_ptr m; Result> res diff --git a/src/lpython/python_kernel.cpp b/src/lpython/python_kernel.cpp index 319466cff7..0793e6373c 100644 --- a/src/lpython/python_kernel.cpp +++ b/src/lpython/python_kernel.cpp @@ -79,7 +79,6 @@ namespace LCompilers::LPython { custom_interpreter() : e{CompilerOptions()} { e.compiler_options.interactive = true; e.compiler_options.po.disable_main = true; - e.compiler_options.emit_debug_line_column = false; e.compiler_options.separate_compilation = false; } virtual ~custom_interpreter() = default; diff --git a/src/lpython/tests/test_llvm.cpp b/src/lpython/tests/test_llvm.cpp index 599161b937..1e9388fb46 100644 --- a/src/lpython/tests/test_llvm.cpp +++ b/src/lpython/tests/test_llvm.cpp @@ -612,7 +612,6 @@ define float @f() TEST_CASE("PythonCompiler 1") { CompilerOptions cu; cu.po.disable_main = true; - cu.emit_debug_line_column = false; cu.separate_compilation = false; cu.interactive = true; cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -627,7 +626,6 @@ TEST_CASE("PythonCompiler 1") { // TEST_CASE("PythonCompiler 2") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -646,7 +644,6 @@ TEST_CASE("PythonCompiler 1") { TEST_CASE("PythonCompiler i32 expressions") { CompilerOptions cu; cu.po.disable_main = true; - cu.emit_debug_line_column = false; cu.separate_compilation = false; cu.interactive = true; cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -692,7 +689,6 @@ TEST_CASE("PythonCompiler i32 expressions") { // TEST_CASE("PythonCompiler i32 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -727,7 +723,6 @@ TEST_CASE("PythonCompiler i32 expressions") { TEST_CASE("PythonCompiler i64 expressions") { CompilerOptions cu; cu.po.disable_main = true; - cu.emit_debug_line_column = false; cu.separate_compilation = false; cu.interactive = true; cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -773,7 +768,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler i64 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -808,7 +802,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u32 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -854,7 +847,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u32 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -890,7 +882,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u64 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -936,7 +927,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u64 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -971,7 +961,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler i8 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1017,7 +1006,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler i8 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1052,7 +1040,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u8 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1098,7 +1085,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u8 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1133,7 +1119,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler i16 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1179,7 +1164,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler i16 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1214,7 +1198,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u16 expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1260,7 +1243,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler u16 declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1295,7 +1277,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler boolean expressions") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1326,7 +1307,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler boolean declaration") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1366,7 +1346,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler string 1") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1387,7 +1366,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler string 2") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1421,7 +1399,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler string 3") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1453,7 +1430,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler Array 1") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1470,7 +1446,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler lists") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1509,7 +1484,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler tuples") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1556,7 +1530,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler classes") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1663,7 +1636,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler underscore 1") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1694,7 +1666,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler underscore 2") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1743,7 +1714,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler underscore 3") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1776,7 +1746,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler underscore 4") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1809,7 +1778,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler asr verify 1") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1828,7 +1796,6 @@ TEST_CASE("PythonCompiler i64 expressions") { // TEST_CASE("PythonCompiler asr verify 2") { // CompilerOptions cu; // cu.po.disable_main = true; -// cu.emit_debug_line_column = false; // cu.separate_compilation = false; // cu.interactive = true; // cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1855,7 +1822,6 @@ TEST_CASE("PythonCompiler i64 expressions") { TEST_CASE("PythonCompiler asr verify 3") { CompilerOptions cu; cu.po.disable_main = true; - cu.emit_debug_line_column = false; cu.separate_compilation = false; cu.interactive = true; cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); @@ -1887,7 +1853,6 @@ def subi(x: i32, y: i32) -> i32: TEST_CASE("PythonCompiler asr verify 4") { CompilerOptions cu; cu.po.disable_main = true; - cu.emit_debug_line_column = false; cu.separate_compilation = false; cu.interactive = true; cu.po.runtime_library_dir = LCompilers::LPython::get_runtime_library_dir(); From 3894aa2a8073dd3475395c7807318749513773bd Mon Sep 17 00:00:00 2001 From: swamishiju Date: Thu, 8 Jan 2026 23:12:59 +0530 Subject: [PATCH 2/2] TEST: Updated tests --- tests/reference/asr-print_02-afbe092.json | 2 +- tests/reference/asr-print_02-afbe092.stdout | 28 +++-- tests/reference/asr-structs_09-f3ffe08.json | 4 +- tests/reference/asr-structs_09-f3ffe08.stderr | 28 ++++- .../asr-test_builtin_len-55b0dec.json | 2 +- .../asr-test_builtin_len-55b0dec.stdout | 8 +- tests/reference/asr-tuple1-09972ab.json | 2 +- tests/reference/asr-tuple1-09972ab.stdout | 40 +++++-- .../reference/c-variable_decl_03-fa1823b.json | 2 +- .../c-variable_decl_03-fa1823b.stdout | 15 +-- .../cpp-test_builtin_pow-56b3f92.json | 2 +- .../cpp-test_builtin_pow-56b3f92.stdout | 34 +++--- tests/reference/llvm_dbg-expr_01-9fc5f30.json | 10 +- .../reference/llvm_dbg-expr_01-9fc5f30.stderr | 2 + .../reference/llvm_dbg-expr_01-9fc5f30.stdout | 113 ------------------ ...ass_print_list_tuple-print_02-09600eb.json | 2 +- ...s_print_list_tuple-print_02-09600eb.stdout | 28 +++-- .../run_dbg-test_assert_01-2f34744.json | 4 +- .../run_dbg-test_assert_01-2f34744.stderr | 9 +- .../run_dbg-test_assert_03-bd7b7dd.json | 4 +- .../run_dbg-test_assert_03-bd7b7dd.stderr | 13 +- .../run_dbg-test_quit_01-30889cc.json | 4 +- .../run_dbg-test_quit_01-30889cc.stderr | 9 +- .../run_dbg-test_raise_01-dfd86ca.json | 4 +- .../run_dbg-test_raise_01-dfd86ca.stderr | 9 +- tests/reference/wat-bool1-234bcd1.json | 2 +- tests/reference/wat-bool1-234bcd1.stdout | 12 +- tests/reference/wat-expr14-5e0cb96.json | 2 +- tests/reference/wat-expr14-5e0cb96.stdout | 12 +- tests/reference/wat-expr2-8b17723.json | 2 +- tests/reference/wat-expr2-8b17723.stdout | 12 +- tests/reference/wat-print_str-385e953.json | 2 +- tests/reference/wat-print_str-385e953.stdout | 12 +- 33 files changed, 183 insertions(+), 251 deletions(-) create mode 100644 tests/reference/llvm_dbg-expr_01-9fc5f30.stderr delete mode 100644 tests/reference/llvm_dbg-expr_01-9fc5f30.stdout diff --git a/tests/reference/asr-print_02-afbe092.json b/tests/reference/asr-print_02-afbe092.json index 007f14f3e2..fe016bb6c2 100644 --- a/tests/reference/asr-print_02-afbe092.json +++ b/tests/reference/asr-print_02-afbe092.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-print_02-afbe092.stdout", - "stdout_hash": "81b28e9c321e4c2f5c4979702be9155fdb7a0bbe0044b34470a55926", + "stdout_hash": "fc8a85b6bc8901fcbbd9bccf807cf6927c9cb26760942c2db6c55491", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-print_02-afbe092.stdout b/tests/reference/asr-print_02-afbe092.stdout index 5fd1be62f2..a183a31cf3 100644 --- a/tests/reference/asr-print_02-afbe092.stdout +++ b/tests/reference/asr-print_02-afbe092.stdout @@ -3037,7 +3037,9 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) (TupleConstant @@ -3048,13 +3050,17 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) )] (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) ) @@ -3067,7 +3073,9 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) (TupleConstant @@ -3078,13 +3086,17 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) )] (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) )] @@ -3092,7 +3104,9 @@ (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) ) diff --git a/tests/reference/asr-structs_09-f3ffe08.json b/tests/reference/asr-structs_09-f3ffe08.json index a27b365565..8f306ed10c 100644 --- a/tests/reference/asr-structs_09-f3ffe08.json +++ b/tests/reference/asr-structs_09-f3ffe08.json @@ -8,6 +8,6 @@ "stdout": null, "stdout_hash": null, "stderr": "asr-structs_09-f3ffe08.stderr", - "stderr_hash": "14119a0bc6420ad242b99395d457f2092014d96d2a1ac81d376c649d", - "returncode": 2 + "stderr_hash": "b37b8fa37881df2189147ce1d10d155f0d770374a0ebd9a9cbf312a8", + "returncode": 1 } \ No newline at end of file diff --git a/tests/reference/asr-structs_09-f3ffe08.stderr b/tests/reference/asr-structs_09-f3ffe08.stderr index a67cb70dba..a8c7fdc37d 100644 --- a/tests/reference/asr-structs_09-f3ffe08.stderr +++ b/tests/reference/asr-structs_09-f3ffe08.stderr @@ -1,5 +1,23 @@ -semantic error: Method not found in the class StringIO or it's parents - --> tests/errors/structs_09.py:13:23 - | -13 | bytes_read: i32 = fd.read() - | ^^^^^^^^^ +Internal Compiler Error: Unhandled exception +Traceback (most recent call last): + File "$DIR/lpython.cpp", line 2142 + File "$DIR/lpython.cpp", line 216 + File "$DIR/semantics/python_ast_to_asr.cpp", line 9188 + File "$DIR/semantics/python_ast_to_asr.cpp", line 9120 + File "$DIR/semantics/python_ast_to_asr.cpp", line 5204 + File "$DIR/python_ast.h", line 1909 + File "$DIR/python_ast.h", line 1776 + File "$DIR/semantics/python_ast_to_asr.cpp", line 5394 + File "$DIR/semantics/python_ast_to_asr.cpp", line 5370 + File "$DIR/semantics/python_ast_to_asr.cpp", line 5158 + File "$DIR/python_ast.h", line 1909 + File "$DIR/python_ast.h", line 1782 + File "$DIR/semantics/python_ast_to_asr.cpp", line 5466 + File "$DIR/semantics/python_ast_to_asr.cpp", line 2898 + File "$DIR/python_ast.h", line 1936 + File "$DIR/python_ast.h", line 1825 + File "$DIR/semantics/python_ast_to_asr.cpp", line 8505 + File "$DIR/semantics/python_ast_to_asr.cpp", line 8245 + File "$DIR/libasr/src/libasr/containers.h", line 164 + LCOMPILERS_ASSERT(pos < n); +AssertFailed: pos < n diff --git a/tests/reference/asr-test_builtin_len-55b0dec.json b/tests/reference/asr-test_builtin_len-55b0dec.json index 3961952d18..2ce93cdbec 100644 --- a/tests/reference/asr-test_builtin_len-55b0dec.json +++ b/tests/reference/asr-test_builtin_len-55b0dec.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_len-55b0dec.stdout", - "stdout_hash": "b2cd8402abe2c03cfa658d19260d285f3dc391c36e793b6e004f5005", + "stdout_hash": "ddc8d9fe739311a02fa1ea239a40fdcf421fce2f37e3a3168b30d649", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_len-55b0dec.stdout b/tests/reference/asr-test_builtin_len-55b0dec.stdout index ccb509e32e..a3e802e4d3 100644 --- a/tests/reference/asr-test_builtin_len-55b0dec.stdout +++ b/tests/reference/asr-test_builtin_len-55b0dec.stdout @@ -564,7 +564,9 @@ (Tuple [(Integer 4) (Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) () @@ -612,7 +614,9 @@ [(Real 8) (Logical 4) (Logical 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) + (Allocatable + (String 1 () DeferredLength DescriptorString) + ) (Integer 4)] ) ) diff --git a/tests/reference/asr-tuple1-09972ab.json b/tests/reference/asr-tuple1-09972ab.json index e2bdb85de0..1c95456024 100644 --- a/tests/reference/asr-tuple1-09972ab.json +++ b/tests/reference/asr-tuple1-09972ab.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-tuple1-09972ab.stdout", - "stdout_hash": "639c2cc9a9a6db4f961bdee39fdaff3b85a4dda684ac62a51315fbc9", + "stdout_hash": "978639d2781799e9f2905a4041f206549c7fbee9f7bad0c35d8f6a6d", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-tuple1-09972ab.stdout b/tests/reference/asr-tuple1-09972ab.stdout index dda49d62f8..f84baf9576 100644 --- a/tests/reference/asr-tuple1-09972ab.stdout +++ b/tests/reference/asr-tuple1-09972ab.stdout @@ -397,9 +397,15 @@ (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) )] (Tuple - [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + [(Allocatable + (String 1 () DeferredLength DescriptorString) + ) + (Allocatable + (String 1 () DeferredLength DescriptorString) + ) + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) () @@ -446,7 +452,9 @@ [(Integer 4) (Integer 4) (Real 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) () @@ -543,8 +551,12 @@ ) (Var 3 float_mem1)] (Tuple - [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) + [(Allocatable + (String 1 () DeferredLength DescriptorString) + ) + (Allocatable + (String 1 () DeferredLength DescriptorString) + ) (Real 4)] ) ) @@ -556,19 +568,27 @@ (IntegerConstant 3 (Integer 4) Decimal) (Var 3 float_mem2)] (Tuple - [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) + [(Allocatable + (String 1 () DeferredLength DescriptorString) + ) (Integer 4) (Real 4)] ) )] (Tuple [(Tuple - [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) + [(Allocatable + (String 1 () DeferredLength DescriptorString) + ) + (Allocatable + (String 1 () DeferredLength DescriptorString) + ) (Real 4)] ) (Tuple - [(String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString) + [(Allocatable + (String 1 () DeferredLength DescriptorString) + ) (Integer 4) (Real 4)] )] diff --git a/tests/reference/c-variable_decl_03-fa1823b.json b/tests/reference/c-variable_decl_03-fa1823b.json index 1060de968b..c7fc823e54 100644 --- a/tests/reference/c-variable_decl_03-fa1823b.json +++ b/tests/reference/c-variable_decl_03-fa1823b.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "c-variable_decl_03-fa1823b.stdout", - "stdout_hash": "b8397cdd7e8998d29574393db30b5638aedd2ecd34a596b8b1c29f7f", + "stdout_hash": "06db4b8826af45ad804274d183e41047f7f34ba719ec5e9b771679bb", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/c-variable_decl_03-fa1823b.stdout b/tests/reference/c-variable_decl_03-fa1823b.stdout index 7c25386e04..d8e75abe72 100644 --- a/tests/reference/c-variable_decl_03-fa1823b.stdout +++ b/tests/reference/c-variable_decl_03-fa1823b.stdout @@ -1,3 +1,4 @@ +#include #include #include @@ -5,7 +6,6 @@ #include #include -double _lcompilers_abs_f64(double x); double f(); void _xx_lcompilers_changed_main_xx(); void __main__global_stmts(); @@ -13,17 +13,6 @@ void __main__global_stmts(); // Implementations -double _lcompilers_abs_f64(double x) -{ - double _lcompilers_abs_f64; - if (x >= 0.00000000000000000e+00) { - _lcompilers_abs_f64 = x; - } else { - _lcompilers_abs_f64 = -x; - } - return _lcompilers_abs_f64; -} - double f() { double _lpython_return_variable; @@ -36,7 +25,7 @@ void _xx_lcompilers_changed_main_xx() double t1; t1 = f()* 1.00000000000000000e+06; printf("%lf\n", t1); - ASSERT(_lcompilers_abs_f64(t1 - 5.50000000000000000e+00* 1.00000000000000000e+06) <= 9.99999999999999955e-07); + ASSERT(fabs(t1 - 5.50000000000000000e+00* 1.00000000000000000e+06) <= 9.99999999999999955e-07); } void __main__global_stmts() diff --git a/tests/reference/cpp-test_builtin_pow-56b3f92.json b/tests/reference/cpp-test_builtin_pow-56b3f92.json index 8d267d3b66..b5898753c3 100644 --- a/tests/reference/cpp-test_builtin_pow-56b3f92.json +++ b/tests/reference/cpp-test_builtin_pow-56b3f92.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "cpp-test_builtin_pow-56b3f92.stdout", - "stdout_hash": "6e1fbf9ddf9a5d58571177561591e443768bd4b3fc777ec390fc1537", + "stdout_hash": "80b231933a8541deb4c7ce3e9e1b06144fbe21d25750558e393810d0", "stderr": "cpp-test_builtin_pow-56b3f92.stderr", "stderr_hash": "859ce76c74748f2d32c7eab92cfbba789a78d4cbf5818646b99806ea", "returncode": 0 diff --git a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout b/tests/reference/cpp-test_builtin_pow-56b3f92.stdout index 8e5bf7278b..cecaaff386 100644 --- a/tests/reference/cpp-test_builtin_pow-56b3f92.stdout +++ b/tests/reference/cpp-test_builtin_pow-56b3f92.stdout @@ -191,26 +191,26 @@ void test_pow() 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); + assert (fabs(__lpython_overloaded_3__pow(a1, a2) - 3.17971929089206000e+01) < eps); + assert (fabs(__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 (fabs(__lpython_overloaded_6__pow(x, y) - 1.25135025328431819e+01) < eps); + assert (fabs(__lpython_overloaded_7__pow(y, x) - 1.21669999999999980e+01) < eps); + assert (fabs(__lpython_overloaded_6__pow(x, 5.50000000000000000e+00) - 4.20888346239237194e+02) < eps); + assert (fabs(__lpython_overloaded_1__pow(2, -1) - 5.00000000000000000e-01) < eps); + assert (fabs(__lpython_overloaded_1__pow(6, -4) - 7.71604938271604895e-04) < eps); + assert (fabs(__lpython_overloaded_1__pow(-3, -5) + 4.11522633744856002e-03) < eps); + assert (fabs(__lpython_overloaded_1__pow(6, -4) - 7.71604938271604895e-04) < eps); + assert (fabs(__lpython_overloaded_3__pow( 4.50000000000000000e+00, 2.29999999999999982e+00) - 3.17971929089206000e+01) < eps); + assert (fabs(__lpython_overloaded_3__pow( 2.29999999999999982e+00, 0.00000000000000000e+00) - 1.00000000000000000e+00) < eps); + assert (fabs(__lpython_overloaded_3__pow( 2.29999999999999982e+00, - 1.50000000000000000e+00) - 2.86687162345994395e-01) < eps); + assert (fabs(__lpython_overloaded_6__pow(2, 3.39999999999999991e+00) - 1.05560632861831536e+01) < eps); + assert (fabs(__lpython_overloaded_6__pow(2, - 3.39999999999999991e+00) - 9.47322854068998882e-02) < eps); + assert (fabs(__lpython_overloaded_7__pow( 3.39999999999999991e+00, 9) - 6.07169927664639836e+04) < eps); + assert (fabs(__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); + assert (fabs(__lpython_overloaded_7__pow(- 4.23500000000000000e+03, 52) - 3.94800380598526379e+188) < eps); i = 7; j = 2; k = 5; diff --git a/tests/reference/llvm_dbg-expr_01-9fc5f30.json b/tests/reference/llvm_dbg-expr_01-9fc5f30.json index e541634d02..1752d17f89 100644 --- a/tests/reference/llvm_dbg-expr_01-9fc5f30.json +++ b/tests/reference/llvm_dbg-expr_01-9fc5f30.json @@ -5,9 +5,9 @@ "infile_hash": "4284fe3a1b4dd3e5d1de1357a79e9a25b426ca245b4cc91cf99e8547", "outfile": null, "outfile_hash": null, - "stdout": "llvm_dbg-expr_01-9fc5f30.stdout", - "stdout_hash": "bfee947cdf74468b9ae47a79c4f93a36d2dea1d313029b7bd7b7b7ca", - "stderr": null, - "stderr_hash": null, - "returncode": 0 + "stdout": null, + "stdout_hash": null, + "stderr": "llvm_dbg-expr_01-9fc5f30.stderr", + "stderr_hash": "00ddc89bd7b49589d524136cdf56c9b4d7661cab8637dc18c947809a", + "returncode": 109 } \ No newline at end of file diff --git a/tests/reference/llvm_dbg-expr_01-9fc5f30.stderr b/tests/reference/llvm_dbg-expr_01-9fc5f30.stderr new file mode 100644 index 0000000000..c4f4d77f69 --- /dev/null +++ b/tests/reference/llvm_dbg-expr_01-9fc5f30.stderr @@ -0,0 +1,2 @@ +The following argument was not expected: --debug-with-line-column +Run with --help for more information. diff --git a/tests/reference/llvm_dbg-expr_01-9fc5f30.stdout b/tests/reference/llvm_dbg-expr_01-9fc5f30.stdout deleted file mode 100644 index 6c1b3935a1..0000000000 --- a/tests/reference/llvm_dbg-expr_01-9fc5f30.stdout +++ /dev/null @@ -1,113 +0,0 @@ -; ModuleID = 'LFortran' -source_filename = "LFortran" - -%string_descriptor = type <{ i8*, i64 }> - -@0 = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 -@serialization_info = private unnamed_addr constant [3 x i8] c"I4\00", align 1 -@1 = private unnamed_addr constant [5 x i8] c"%s%s\00", align 1 - -define void @__module___main_____main__global_stmts() !dbg !3 { -.entry: - call void @__module___main___main0(), !dbg !6 - br label %return, !dbg !6 - -return: ; preds = %.entry - br label %FINALIZE_SYMTABLE___main__global_stmts, !dbg !6 - -FINALIZE_SYMTABLE___main__global_stmts: ; preds = %return - ret void, !dbg !6 -} - -define void @__module___main___main0() !dbg !7 { -.entry: - %x = alloca i32, align 4, !dbg !8 - call void @llvm.dbg.declare(metadata i32* %x, metadata !9, metadata !DIExpression()), !dbg !11 - %x2 = alloca i64, align 8 - call void @llvm.dbg.declare(metadata i64* %x2, metadata !12, metadata !DIExpression()), !dbg !14 - %y = alloca float, align 4 - call void @llvm.dbg.declare(metadata float* %y, metadata !15, metadata !DIExpression()), !dbg !17 - %y2 = alloca double, align 8 - call void @llvm.dbg.declare(metadata double* %y2, metadata !18, metadata !DIExpression()), !dbg !20 - store i32 25, i32* %x, align 4, !dbg !21 - %0 = alloca i64, align 8, !dbg !21 - %1 = call i8* (i8*, i64, i8*, i64*, i32, i32, ...) @_lcompilers_string_format_fortran(i8* null, i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @serialization_info, i32 0, i32 0), i64* %0, i32 0, i32 0, i32* %x), !dbg !21 - %2 = load i64, i64* %0, align 4, !dbg !21 - %stringFormat_desc = alloca %string_descriptor, align 8, !dbg !21 - %3 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0, !dbg !21 - store i8* %1, i8** %3, align 8, !dbg !21 - %4 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1, !dbg !21 - store i64 %2, i64* %4, align 4, !dbg !21 - %5 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 0, !dbg !21 - %6 = load i8*, i8** %5, align 8, !dbg !21 - %7 = getelementptr %string_descriptor, %string_descriptor* %stringFormat_desc, i32 0, i32 1, !dbg !21 - %8 = load i64, i64* %7, align 4, !dbg !21 - %9 = trunc i64 %8 to i32, !dbg !21 - call void @_lfortran_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @1, i32 0, i32 0), i8* %6, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @0, i32 0, i32 0), i32 1), !dbg !21 - call void @_lfortran_free(i8* %1), !dbg !21 - br label %return, !dbg !21 - -return: ; preds = %.entry - br label %FINALIZE_SYMTABLE_main0, !dbg !21 - -FINALIZE_SYMTABLE_main0: ; preds = %return - ret void, !dbg !21 -} - -; Function Attrs: nounwind readnone speculatable willreturn -declare void @llvm.dbg.declare(metadata, metadata, metadata) #0 - -declare i8* @_lcompilers_string_format_fortran(i8*, i64, i8*, i64*, i32, i32, ...) - -declare void @_lfortran_printf(i8*, i8*, i32, i8*, i32) - -declare void @_lfortran_free(i8*) - -define i32 @main(i32 %0, i8** %1) !dbg !22 { -.entry: - call void @_lpython_call_initial_functions(i32 %0, i8** %1), !dbg !25 - call void @__module___main_____main__global_stmts(), !dbg !25 - call void @_lpython_free_argv(), !dbg !25 - br label %return, !dbg !25 - -return: ; preds = %.entry - br label %FINALIZE_SYMTABLE_main_program, !dbg !25 - -FINALIZE_SYMTABLE_main_program: ; preds = %return - ret i32 0, !dbg !25 -} - -declare void @_lpython_call_initial_functions(i32, i8**) - -declare void @_lpython_free_argv() - -attributes #0 = { nounwind readnone speculatable willreturn } - -!llvm.dbg.cu = !{!0} - -!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "LPython Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) -!1 = !DIFile(filename: "tests/expr_01.py", directory: ".") -!2 = !{} -!3 = distinct !DISubprogram(name: "__main__global_stmts", scope: !1, file: !1, line: 1, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) -!4 = !DISubroutineType(types: !5) -!5 = !{null} -!6 = !DILocation(line: 9, column: 1, scope: !3) -!7 = distinct !DISubprogram(name: "main0", scope: !1, file: !1, line: 1, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) -!8 = !DILocation(line: 1, column: 1, scope: !7) -!9 = !DILocalVariable(name: "x", arg: 1, scope: !7, file: !1, line: 2, type: !10) -!10 = !DIBasicType(name: "integer", size: 32, encoding: DW_ATE_signed) -!11 = !DILocation(line: 2, scope: !7) -!12 = !DILocalVariable(name: "x2", arg: 2, scope: !7, file: !1, line: 3, type: !13) -!13 = !DIBasicType(name: "integer", size: 64, encoding: DW_ATE_signed) -!14 = !DILocation(line: 3, scope: !7) -!15 = !DILocalVariable(name: "y", arg: 3, scope: !7, file: !1, line: 4, type: !16) -!16 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) -!17 = !DILocation(line: 4, scope: !7) -!18 = !DILocalVariable(name: "y2", arg: 4, scope: !7, file: !1, line: 5, type: !19) -!19 = !DIBasicType(name: "double", size: 64, encoding: DW_ATE_float) -!20 = !DILocation(line: 5, scope: !7) -!21 = !DILocation(line: 6, column: 5, scope: !7) -!22 = distinct !DISubprogram(name: "main_program", scope: !1, file: !1, line: 1, type: !23, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) -!23 = !DISubroutineType(types: !24) -!24 = !{!10} -!25 = !DILocation(line: 1, column: 1, scope: !22) diff --git a/tests/reference/pass_print_list_tuple-print_02-09600eb.json b/tests/reference/pass_print_list_tuple-print_02-09600eb.json index 171e8ff3a4..bf60bbd5bb 100644 --- a/tests/reference/pass_print_list_tuple-print_02-09600eb.json +++ b/tests/reference/pass_print_list_tuple-print_02-09600eb.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "pass_print_list_tuple-print_02-09600eb.stdout", - "stdout_hash": "45287b2b8687c93c743646c0f46a1df04b98717114b36fe5ded301c3", + "stdout_hash": "41e70f047be117bcadd0d281fac364a8ec319b565a82a262d0cf6c45", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/pass_print_list_tuple-print_02-09600eb.stdout b/tests/reference/pass_print_list_tuple-print_02-09600eb.stdout index 0285cc6f12..7e0d4e8137 100644 --- a/tests/reference/pass_print_list_tuple-print_02-09600eb.stdout +++ b/tests/reference/pass_print_list_tuple-print_02-09600eb.stdout @@ -7220,7 +7220,9 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) (TupleConstant @@ -7231,13 +7233,17 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) )] (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) ) @@ -7250,7 +7256,9 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) (TupleConstant @@ -7261,13 +7269,17 @@ )] (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) )] (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) )] @@ -7275,7 +7287,9 @@ (List (Tuple [(Integer 4) - (String 1 (IntegerConstant 1 (Integer 4) Decimal) ExpressionLength DescriptorString)] + (Allocatable + (String 1 () DeferredLength DescriptorString) + )] ) ) ) diff --git a/tests/reference/run_dbg-test_assert_01-2f34744.json b/tests/reference/run_dbg-test_assert_01-2f34744.json index f8ac5ccbe9..570a13e706 100644 --- a/tests/reference/run_dbg-test_assert_01-2f34744.json +++ b/tests/reference/run_dbg-test_assert_01-2f34744.json @@ -8,6 +8,6 @@ "stdout": null, "stdout_hash": null, "stderr": "run_dbg-test_assert_01-2f34744.stderr", - "stderr_hash": "4811af471c73572b285e9ea01c8689abdd3cb32c717b3cd4876d2669", - "returncode": 1 + "stderr_hash": "00ddc89bd7b49589d524136cdf56c9b4d7661cab8637dc18c947809a", + "returncode": 109 } \ No newline at end of file diff --git a/tests/reference/run_dbg-test_assert_01-2f34744.stderr b/tests/reference/run_dbg-test_assert_01-2f34744.stderr index a7dc14d623..c4f4d77f69 100644 --- a/tests/reference/run_dbg-test_assert_01-2f34744.stderr +++ b/tests/reference/run_dbg-test_assert_01-2f34744.stderr @@ -1,7 +1,2 @@ - File "tests/runtime_errors/test_assert_01.py", line 1 - def test(): - File "tests/runtime_errors/test_assert_01.py", line 4 - test() - File "tests/runtime_errors/test_assert_01.py", line 2 - assert False -AssertionError +The following argument was not expected: --debug-with-line-column +Run with --help for more information. diff --git a/tests/reference/run_dbg-test_assert_03-bd7b7dd.json b/tests/reference/run_dbg-test_assert_03-bd7b7dd.json index f771107475..17522781dd 100644 --- a/tests/reference/run_dbg-test_assert_03-bd7b7dd.json +++ b/tests/reference/run_dbg-test_assert_03-bd7b7dd.json @@ -8,6 +8,6 @@ "stdout": null, "stdout_hash": null, "stderr": "run_dbg-test_assert_03-bd7b7dd.stderr", - "stderr_hash": "cae7dd955478787917e9dbb0bc1f63631317b13da1d892c3ebab9097", - "returncode": 1 + "stderr_hash": "00ddc89bd7b49589d524136cdf56c9b4d7661cab8637dc18c947809a", + "returncode": 109 } \ No newline at end of file diff --git a/tests/reference/run_dbg-test_assert_03-bd7b7dd.stderr b/tests/reference/run_dbg-test_assert_03-bd7b7dd.stderr index 65f2444ba9..c4f4d77f69 100644 --- a/tests/reference/run_dbg-test_assert_03-bd7b7dd.stderr +++ b/tests/reference/run_dbg-test_assert_03-bd7b7dd.stderr @@ -1,11 +1,2 @@ - File "tests/runtime_errors/test_assert_03.py", line 1 - def f(): - File "tests/runtime_errors/test_assert_03.py", line 10 - main() - File "tests/runtime_errors/test_assert_03.py", line 8 - f() - File "tests/runtime_errors/test_assert_03.py", line 2 - g() - File "tests/runtime_errors/test_assert_03.py", line 5 - assert False -AssertionError +The following argument was not expected: --debug-with-line-column +Run with --help for more information. diff --git a/tests/reference/run_dbg-test_quit_01-30889cc.json b/tests/reference/run_dbg-test_quit_01-30889cc.json index 37ce5d232a..befeaf9d82 100644 --- a/tests/reference/run_dbg-test_quit_01-30889cc.json +++ b/tests/reference/run_dbg-test_quit_01-30889cc.json @@ -8,6 +8,6 @@ "stdout": null, "stdout_hash": null, "stderr": "run_dbg-test_quit_01-30889cc.stderr", - "stderr_hash": "56a8b2a9b2ee213cbfab4c18870ed93ddbfaa37e421f171155d06d4f", - "returncode": 10 + "stderr_hash": "00ddc89bd7b49589d524136cdf56c9b4d7661cab8637dc18c947809a", + "returncode": 109 } \ No newline at end of file diff --git a/tests/reference/run_dbg-test_quit_01-30889cc.stderr b/tests/reference/run_dbg-test_quit_01-30889cc.stderr index 5fd4fe85c8..c4f4d77f69 100644 --- a/tests/reference/run_dbg-test_quit_01-30889cc.stderr +++ b/tests/reference/run_dbg-test_quit_01-30889cc.stderr @@ -1,7 +1,2 @@ - File "tests/runtime_errors/test_quit_01.py", line 1 - def test(): - File "tests/runtime_errors/test_quit_01.py", line 4 - test() - File "tests/runtime_errors/test_quit_01.py", line 2 - quit(10) -STOP 10 +The following argument was not expected: --debug-with-line-column +Run with --help for more information. diff --git a/tests/reference/run_dbg-test_raise_01-dfd86ca.json b/tests/reference/run_dbg-test_raise_01-dfd86ca.json index 2dbe004c7e..06e08e5af2 100644 --- a/tests/reference/run_dbg-test_raise_01-dfd86ca.json +++ b/tests/reference/run_dbg-test_raise_01-dfd86ca.json @@ -8,6 +8,6 @@ "stdout": null, "stdout_hash": null, "stderr": "run_dbg-test_raise_01-dfd86ca.stderr", - "stderr_hash": "76085f527077a81ba6457af8f982a497038168f555ab4027d0d6340e", - "returncode": 1 + "stderr_hash": "00ddc89bd7b49589d524136cdf56c9b4d7661cab8637dc18c947809a", + "returncode": 109 } \ No newline at end of file diff --git a/tests/reference/run_dbg-test_raise_01-dfd86ca.stderr b/tests/reference/run_dbg-test_raise_01-dfd86ca.stderr index 42bc707825..c4f4d77f69 100644 --- a/tests/reference/run_dbg-test_raise_01-dfd86ca.stderr +++ b/tests/reference/run_dbg-test_raise_01-dfd86ca.stderr @@ -1,7 +1,2 @@ - File "tests/runtime_errors/test_raise_01.py", line 1 - def test(): - File "tests/runtime_errors/test_raise_01.py", line 4 - test() - File "tests/runtime_errors/test_raise_01.py", line 2 - raise -ERROR STOP +The following argument was not expected: --debug-with-line-column +Run with --help for more information. diff --git a/tests/reference/wat-bool1-234bcd1.json b/tests/reference/wat-bool1-234bcd1.json index 4be1a3e7c1..8408a6a4e9 100644 --- a/tests/reference/wat-bool1-234bcd1.json +++ b/tests/reference/wat-bool1-234bcd1.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-bool1-234bcd1.stdout", - "stdout_hash": "1ac138f5c0fd3b21a75e6bf4e0024d5f0df2f0a6b195defd472677c2", + "stdout_hash": "2e3f8393736b812efe0611846f07c5b2cfbfad0c465f990b706c2681", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-bool1-234bcd1.stdout b/tests/reference/wat-bool1-234bcd1.stdout index b50b0ccd6a..5593fd2504 100644 --- a/tests/reference/wat-bool1-234bcd1.stdout +++ b/tests/reference/wat-bool1-234bcd1.stdout @@ -9,11 +9,13 @@ (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) - (global $2 (mut i64) (i64.const 0)) - (global $3 (mut f32) (f32.const 0.000000)) - (global $4 (mut f32) (f32.const 0.000000)) - (global $5 (mut f64) (f64.const 0.000000)) - (global $6 (mut f64) (f64.const 0.000000)) + (global $2 (mut i32) (i32.const 0)) + (global $3 (mut i64) (i64.const 0)) + (global $4 (mut i64) (i64.const 0)) + (global $5 (mut f32) (f32.const 0.000000)) + (global $6 (mut f32) (f32.const 0.000000)) + (global $7 (mut f64) (f64.const 0.000000)) + (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local) call 3 diff --git a/tests/reference/wat-expr14-5e0cb96.json b/tests/reference/wat-expr14-5e0cb96.json index 09741a198d..0e14e135e3 100644 --- a/tests/reference/wat-expr14-5e0cb96.json +++ b/tests/reference/wat-expr14-5e0cb96.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-expr14-5e0cb96.stdout", - "stdout_hash": "f8ff7eb9eb4bc533fc4d36c58a0378df6dfbf135313962dbf379d69a", + "stdout_hash": "6eedbad94110199fa8729d7142c869546f6cafc17267b2a6c055157e", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-expr14-5e0cb96.stdout b/tests/reference/wat-expr14-5e0cb96.stdout index 60c9b0a760..d77fbbcda6 100644 --- a/tests/reference/wat-expr14-5e0cb96.stdout +++ b/tests/reference/wat-expr14-5e0cb96.stdout @@ -6,11 +6,13 @@ (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) - (global $2 (mut i64) (i64.const 0)) - (global $3 (mut f32) (f32.const 0.000000)) - (global $4 (mut f32) (f32.const 0.000000)) - (global $5 (mut f64) (f64.const 0.000000)) - (global $6 (mut f64) (f64.const 0.000000)) + (global $2 (mut i32) (i32.const 0)) + (global $3 (mut i64) (i64.const 0)) + (global $4 (mut i64) (i64.const 0)) + (global $5 (mut f32) (f32.const 0.000000)) + (global $6 (mut f32) (f32.const 0.000000)) + (global $7 (mut f64) (f64.const 0.000000)) + (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local) i32.const 0 diff --git a/tests/reference/wat-expr2-8b17723.json b/tests/reference/wat-expr2-8b17723.json index ad73a311e7..29c8d8ed57 100644 --- a/tests/reference/wat-expr2-8b17723.json +++ b/tests/reference/wat-expr2-8b17723.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-expr2-8b17723.stdout", - "stdout_hash": "f8ff7eb9eb4bc533fc4d36c58a0378df6dfbf135313962dbf379d69a", + "stdout_hash": "6eedbad94110199fa8729d7142c869546f6cafc17267b2a6c055157e", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-expr2-8b17723.stdout b/tests/reference/wat-expr2-8b17723.stdout index 60c9b0a760..d77fbbcda6 100644 --- a/tests/reference/wat-expr2-8b17723.stdout +++ b/tests/reference/wat-expr2-8b17723.stdout @@ -6,11 +6,13 @@ (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) - (global $2 (mut i64) (i64.const 0)) - (global $3 (mut f32) (f32.const 0.000000)) - (global $4 (mut f32) (f32.const 0.000000)) - (global $5 (mut f64) (f64.const 0.000000)) - (global $6 (mut f64) (f64.const 0.000000)) + (global $2 (mut i32) (i32.const 0)) + (global $3 (mut i64) (i64.const 0)) + (global $4 (mut i64) (i64.const 0)) + (global $5 (mut f32) (f32.const 0.000000)) + (global $6 (mut f32) (f32.const 0.000000)) + (global $7 (mut f64) (f64.const 0.000000)) + (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local) i32.const 0 diff --git a/tests/reference/wat-print_str-385e953.json b/tests/reference/wat-print_str-385e953.json index de1714455f..f9be8cc565 100644 --- a/tests/reference/wat-print_str-385e953.json +++ b/tests/reference/wat-print_str-385e953.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-print_str-385e953.stdout", - "stdout_hash": "8e9a0f7a017cdd451f10e9b8686d3a9ba00c1c4088fbd01cfa2df1cc", + "stdout_hash": "2bb8bff1b8678e1dca9acefc6c48f2ea921e0f754d2f2f116d152c48", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-print_str-385e953.stdout b/tests/reference/wat-print_str-385e953.stdout index 9db655a5ed..f07e666890 100644 --- a/tests/reference/wat-print_str-385e953.stdout +++ b/tests/reference/wat-print_str-385e953.stdout @@ -9,11 +9,13 @@ (import "wasi_snapshot_preview1" "fd_write" (func (;1;) (type 1))) (global $0 (mut i32) (i32.const 0)) (global $1 (mut i32) (i32.const 0)) - (global $2 (mut i64) (i64.const 0)) - (global $3 (mut f32) (f32.const 0.000000)) - (global $4 (mut f32) (f32.const 0.000000)) - (global $5 (mut f64) (f64.const 0.000000)) - (global $6 (mut f64) (f64.const 0.000000)) + (global $2 (mut i32) (i32.const 0)) + (global $3 (mut i64) (i64.const 0)) + (global $4 (mut i64) (i64.const 0)) + (global $5 (mut f32) (f32.const 0.000000)) + (global $6 (mut f32) (f32.const 0.000000)) + (global $7 (mut f64) (f64.const 0.000000)) + (global $8 (mut f64) (f64.const 0.000000)) (func $2 (type 2) (param) (result) (local) call 3