diff --git a/src/libasr/asr_utils.cpp b/src/libasr/asr_utils.cpp index b988b83f19..cb02443863 100644 --- a/src/libasr/asr_utils.cpp +++ b/src/libasr/asr_utils.cpp @@ -616,7 +616,9 @@ bool use_overloaded(ASR::expr_t* left, ASR::expr_t* right, } } } - current_function_dependencies.push_back(al, s2c(al, matched_func_name)); + if (ASRUtils::symbol_parent_symtab(a_name)->get_counter() != curr_scope->get_counter()) { + ADD_ASR_DEPENDENCIES_WITH_NAME(curr_scope, a_name, current_function_dependencies, s2c(al, matched_func_name)); + } ASRUtils::insert_module_dependency(a_name, al, current_module_dependencies); ASRUtils::set_absent_optional_arguments_to_null(a_args, func, al); asr = ASRUtils::make_FunctionCall_t_util(al, loc, a_name, sym, @@ -699,7 +701,9 @@ void process_overloaded_unary_minus_function(ASR::symbol_t* proc, ASR::expr_t* o } } } - current_function_dependencies.push_back(al, s2c(al, matched_func_name)); + if (ASRUtils::symbol_parent_symtab(a_name)->get_counter() != curr_scope->get_counter()) { + ADD_ASR_DEPENDENCIES_WITH_NAME(curr_scope, a_name, current_function_dependencies, s2c(al, matched_func_name)); + } ASRUtils::insert_module_dependency(a_name, al, current_module_dependencies); ASRUtils::set_absent_optional_arguments_to_null(a_args, func, al); asr = ASRUtils::make_FunctionCall_t_util(al, loc, a_name, proc, @@ -870,7 +874,9 @@ void process_overloaded_assignment_function(ASR::symbol_t* proc, ASR::expr_t* ta if( a_name == nullptr ) { err("Unable to resolve matched subroutine for assignment overloading, " + matched_subrout_name, loc); } - current_function_dependencies.push_back(al, s2c(al, matched_subrout_name)); + if (ASRUtils::symbol_parent_symtab(a_name)->get_counter() != curr_scope->get_counter()) { + ADD_ASR_DEPENDENCIES_WITH_NAME(curr_scope, a_name, current_function_dependencies, s2c(al, matched_subrout_name)); + } ASRUtils::insert_module_dependency(a_name, al, current_module_dependencies); ASRUtils::set_absent_optional_arguments_to_null(a_args, subrout, al); asr = ASRUtils::make_SubroutineCall_t_util(al, loc, a_name, sym, @@ -1010,7 +1016,9 @@ bool use_overloaded(ASR::expr_t* left, ASR::expr_t* right, } else { return_type = ASRUtils::expr_type(func->m_return_var); } - current_function_dependencies.push_back(al, s2c(al, matched_func_name)); + if (ASRUtils::symbol_parent_symtab(a_name)->get_counter() != curr_scope->get_counter()) { + ADD_ASR_DEPENDENCIES_WITH_NAME(curr_scope, a_name, current_function_dependencies, s2c(al, matched_func_name)); + } ASRUtils::insert_module_dependency(a_name, al, current_module_dependencies); ASRUtils::set_absent_optional_arguments_to_null(a_args, func, al); asr = ASRUtils::make_FunctionCall_t_util(al, loc, a_name, sym, diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index 9284ca6c97..06e42e7fd9 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -14,6 +14,28 @@ #include +#define ADD_ASR_DEPENDENCIES(current_scope, final_sym, current_function_dependencies) ASR::symbol_t* asr_owner_sym = nullptr; \ + if(current_scope->asr_owner && ASR::is_a(*current_scope->asr_owner) ) { \ + asr_owner_sym = ASR::down_cast(current_scope->asr_owner); \ + } \ + SymbolTable* temp_scope = current_scope; \ + if (asr_owner_sym && temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(final_sym)->get_counter() && \ + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*final_sym) && \ + !ASR::is_a(*final_sym)) { \ + current_function_dependencies.push_back(al, ASRUtils::symbol_name(final_sym)); \ + } \ + +#define ADD_ASR_DEPENDENCIES_WITH_NAME(current_scope, final_sym, current_function_dependencies, dep_name) ASR::symbol_t* asr_owner_sym = nullptr; \ + if(current_scope->asr_owner && ASR::is_a(*current_scope->asr_owner) ) { \ + asr_owner_sym = ASR::down_cast(current_scope->asr_owner); \ + } \ + SymbolTable* temp_scope = current_scope; \ + if (asr_owner_sym && temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(final_sym)->get_counter() && \ + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*final_sym) && \ + !ASR::is_a(*final_sym)) { \ + current_function_dependencies.push_back(al, dep_name); \ + } \ + namespace LCompilers { namespace ASRUtils { @@ -554,6 +576,17 @@ static inline std::pair symbol_dependencies(const ASR::symbol_t } } +static inline bool is_present_in_current_scope(ASR::ExternalSymbol_t* external_symbol, SymbolTable* current_scope) { + SymbolTable* scope = external_symbol->m_parent_symtab; + while (scope != nullptr) { + if (scope->get_counter() == current_scope->get_counter()) { + return true; + } + scope = scope->parent; + } + return false; + } + static inline SymbolTable *symbol_parent_symtab(const ASR::symbol_t *f) { switch (f->type) { @@ -3189,7 +3222,9 @@ class ReplaceArgVisitor: public ASR::BaseExprReplacer { default: break; } - current_function_dependencies.push_back(al, ASRUtils::symbol_name(new_es)); + if (ASRUtils::symbol_parent_symtab(new_es)->get_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES(current_scope, new_es, current_function_dependencies); + } ASRUtils::insert_module_dependency(new_es, al, current_module_dependencies); x->m_name = new_es; } diff --git a/src/libasr/asr_verify.cpp b/src/libasr/asr_verify.cpp index bdfd11c0d9..785478765d 100644 --- a/src/libasr/asr_verify.cpp +++ b/src/libasr/asr_verify.cpp @@ -441,6 +441,20 @@ class VerifyVisitor : public BaseWalkVisitor verify_unique_dependencies(x.m_dependencies, x.n_dependencies, x.m_name, x.base.base.loc); + // Get the x symtab. + SymbolTable *x_symtab = x.m_symtab; + + // Dependencies of the function should be from function's parent symbol table. + for( size_t i = 0; i < x.n_dependencies; i++ ) { + std::string found_dep = x.m_dependencies[i]; + + // Get the symbol of the found_dep. + ASR::symbol_t* dep_sym = x_symtab->resolve_symbol(found_dep); + + require(dep_sym != nullptr, + "Dependency " + found_dep + " is inside symbol table " + std::string(x.m_name)); + } + // Check if there are unnecessary dependencies // present in the dependency list of the function for( size_t i = 0; i < x.n_dependencies; i++ ) { @@ -870,7 +884,19 @@ class VerifyVisitor : public BaseWalkVisitor } } - function_dependencies.push_back(std::string(ASRUtils::symbol_name(x.m_name))); + ASR::symbol_t* asr_owner_sym = nullptr; + if(current_symtab->asr_owner && ASR::is_a(*current_symtab->asr_owner) ) { + asr_owner_sym = ASR::down_cast(current_symtab->asr_owner); + } + + SymbolTable* temp_scope = current_symtab; + + if (temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(x.m_name)->get_counter() && + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*x.m_name) && + !ASR::is_a(*x.m_name)) { + function_dependencies.push_back(std::string(ASRUtils::symbol_name(x.m_name))); + } + if( ASR::is_a(*x.m_name) ) { ASR::ExternalSymbol_t* x_m_name = ASR::down_cast(x.m_name); if( x_m_name->m_external && ASR::is_a(*ASRUtils::get_asr_owner(x_m_name->m_external)) ) { @@ -1003,7 +1029,19 @@ class VerifyVisitor : public BaseWalkVisitor void visit_FunctionCall(const FunctionCall_t &x) { require(x.m_name, "FunctionCall::m_name must be present"); - function_dependencies.push_back(std::string(ASRUtils::symbol_name(x.m_name))); + ASR::symbol_t* asr_owner_sym = nullptr; + if(current_symtab->asr_owner && ASR::is_a(*current_symtab->asr_owner) ) { + asr_owner_sym = ASR::down_cast(current_symtab->asr_owner); + } + + SymbolTable* temp_scope = current_symtab; + + if (asr_owner_sym && temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(x.m_name)->get_counter() && + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*x.m_name) && + !ASR::is_a(*x.m_name)) { + function_dependencies.push_back(std::string(ASRUtils::symbol_name(x.m_name))); + } + if( ASR::is_a(*x.m_name) ) { ASR::ExternalSymbol_t* x_m_name = ASR::down_cast(x.m_name); if( x_m_name->m_external && ASR::is_a(*ASRUtils::get_asr_owner(x_m_name->m_external)) ) { diff --git a/src/libasr/pass/instantiate_template.cpp b/src/libasr/pass/instantiate_template.cpp index 7b47a2827b..14144170c3 100644 --- a/src/libasr/pass/instantiate_template.cpp +++ b/src/libasr/pass/instantiate_template.cpp @@ -305,8 +305,6 @@ class SymbolInstantiator : public ASR::BaseExprStmtDuplicatorm_v); ASR::symbol_t* sym = duplicate_symbol(x->m_v); @@ -430,9 +428,9 @@ class SymbolInstantiator : public ASR::BaseExprStmtDuplicatorget_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES(current_scope, name, dependencies); + } return ASRUtils::make_FunctionCall_t_util(al, x->base.base.loc, name, x->m_original_name, args.p, args.size(), type, value, dt); } @@ -474,10 +472,10 @@ class SymbolInstantiator : public ASR::BaseExprStmtDuplicatorbase.base.loc, name, + if (ASRUtils::symbol_parent_symtab(name)->get_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES(current_scope, name, dependencies); + } + return ASRUtils::make_SubroutineCall_t_util(al, x->base.base.loc, name /* change this */, x->m_original_name, args.p, args.size(), dt, nullptr, false); } @@ -651,6 +649,8 @@ void check_restriction(std::map type_subs, {f->m_args[i]->base.loc}), diag::Label("Function's parameter " + avar + " of type " + atype, {arg->m_args[i]->base.loc}) + + } )); throw SemanticAbort(); diff --git a/src/libasr/pass/pass_utils.h b/src/libasr/pass/pass_utils.h index 714f78a355..dddd00b3b7 100644 --- a/src/libasr/pass/pass_utils.h +++ b/src/libasr/pass/pass_utils.h @@ -262,6 +262,7 @@ namespace LCompilers { bool fill_function_dependencies; bool fill_module_dependencies; bool fill_variable_dependencies; + SymbolTable* current_scope; public: @@ -273,10 +274,13 @@ namespace LCompilers { function_dependencies.n = 0; module_dependencies.n = 0; variable_dependencies.n = 0; + current_scope = nullptr; } void visit_Function(const ASR::Function_t& x) { ASR::Function_t& xx = const_cast(x); + SymbolTable* current_scope_copy = current_scope; + current_scope = xx.m_symtab; SetChar function_dependencies_copy; function_dependencies_copy.from_pointer_n_copy(al, function_dependencies.p, function_dependencies.size()); function_dependencies.n = 0; @@ -291,6 +295,7 @@ namespace LCompilers { function_dependencies_copy.p, function_dependencies_copy.size() ); + current_scope = current_scope_copy; } void visit_Module(const ASR::Module_t& x) { @@ -327,9 +332,21 @@ namespace LCompilers { } void visit_FunctionCall(const ASR::FunctionCall_t& x) { - if( fill_function_dependencies ) { - function_dependencies.push_back(al, ASRUtils::symbol_name(x.m_name)); + if (fill_function_dependencies) { + ASR::symbol_t* asr_owner_sym = nullptr; + if (current_scope->asr_owner && ASR::is_a(*current_scope->asr_owner)) { + asr_owner_sym = ASR::down_cast(current_scope->asr_owner); + } + + SymbolTable* temp_scope = current_scope; + + if (asr_owner_sym && temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(x.m_name)->get_counter() && + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*x.m_name) && + !ASR::is_a(*x.m_name)) { + function_dependencies.push_back(al, ASRUtils::symbol_name(x.m_name)); + } } + if( ASR::is_a(*x.m_name) && fill_module_dependencies ) { ASR::ExternalSymbol_t* x_m_name = ASR::down_cast(x.m_name); @@ -341,9 +358,21 @@ namespace LCompilers { } void visit_SubroutineCall(const ASR::SubroutineCall_t& x) { - if( fill_function_dependencies ) { - function_dependencies.push_back(al, ASRUtils::symbol_name(x.m_name)); + if (fill_function_dependencies) { + ASR::symbol_t* asr_owner_sym = nullptr; + if (current_scope->asr_owner && ASR::is_a(*current_scope->asr_owner)) { + asr_owner_sym = ASR::down_cast(current_scope->asr_owner); + } + + SymbolTable* temp_scope = current_scope; + + if (asr_owner_sym && temp_scope->get_counter() != ASRUtils::symbol_parent_symtab(x.m_name)->get_counter() && + !ASR::is_a(*asr_owner_sym) && !ASR::is_a(*x.m_name) && + !ASR::is_a(*x.m_name)) { + function_dependencies.push_back(al, ASRUtils::symbol_name(x.m_name)); + } } + if( ASR::is_a(*x.m_name) && fill_module_dependencies ) { ASR::ExternalSymbol_t* x_m_name = ASR::down_cast(x.m_name); @@ -360,6 +389,30 @@ namespace LCompilers { visit_stmt(*(block->m_body[i])); } } + + void visit_AssociateBlock(const ASR::AssociateBlock_t& x) { + SymbolTable *parent_symtab = current_scope; + current_scope = x.m_symtab; + for (auto &a : x.m_symtab->get_scope()) { + this->visit_symbol(*a.second); + } + for (size_t i=0; iget_scope()) { + this->visit_symbol(*a.second); + } + for (size_t i=0; i { args_new.reserve(al, func->n_args); visit_expr_list_with_cast(func->m_args, func->n_args, args_new, args, !ASRUtils::is_intrinsic_function2(func)); - dependencies.push_back(al, ASRUtils::symbol_name(stemp)); + + if (ASRUtils::symbol_parent_symtab(stemp)->get_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES(current_scope, stemp, dependencies); + } + return ASRUtils::make_FunctionCall_t_util(al, loc, stemp, s_generic, args_new.p, args_new.size(), a_type, value, nullptr); @@ -1195,7 +1199,11 @@ class CommonVisitor : public AST::BaseVisitor { Vec args_new; args_new.reserve(al, func->n_args); visit_expr_list_with_cast(func->m_args, func->n_args, args_new, args); - dependencies.push_back(al, ASRUtils::symbol_name(stemp)); + + if (ASRUtils::symbol_parent_symtab(stemp)->get_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES(current_scope, stemp, dependencies); + } + return ASRUtils::make_SubroutineCall_t_util(al, loc, stemp, s_generic, args_new.p, args_new.size(), nullptr, nullptr, false); } @@ -1457,7 +1465,10 @@ class CommonVisitor : public AST::BaseVisitor { target_scope, target_scope, new_f, f); } dependencies.erase(s2c(al, func_name)); - dependencies.push_back(al, s2c(al, new_func_name)); + + if (ASRUtils::symbol_parent_symtab(sym)->get_counter() != current_scope->get_counter()) { + ADD_ASR_DEPENDENCIES_WITH_NAME(current_scope, sym, dependencies, s2c(al, new_func_name)); + } return t; } @@ -5471,6 +5482,7 @@ class BodyVisitor : public CommonVisitor { SymbolTable *parent_scope = current_scope; current_scope = al.make_new(parent_scope); + current_scope->asr_owner = parent_scope->asr_owner; transform_stmts(body, x.n_body, x.m_body); int32_t total_syms = current_scope->get_scope().size(); if( total_syms > 0 ) { diff --git a/tests/reference/asr-array_01_decl-39cf894.stderr b/tests/reference/asr-array_01_decl-39cf894.stderr new file mode 100644 index 0000000000..2ef3142ddf --- /dev/null +++ b/tests/reference/asr-array_01_decl-39cf894.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/array_01_decl.py:2:1 + | +2 | from numpy import empty, int16, int32, int64, float32, float64, complex64, complex128 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-array_02_decl-e8f6874.stderr b/tests/reference/asr-array_02_decl-e8f6874.stderr new file mode 100644 index 0000000000..143230f959 --- /dev/null +++ b/tests/reference/asr-array_02_decl-e8f6874.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/array_02_decl.py:2:1 + | +2 | from numpy import empty, int32, int64, float32, float64, complex64, complex128 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-bindc_02-bc1a7ea.stderr b/tests/reference/asr-bindc_02-bc1a7ea.stderr new file mode 100644 index 0000000000..0366febb6a --- /dev/null +++ b/tests/reference/asr-bindc_02-bc1a7ea.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/bindc_02.py:2:1 + | +2 | from numpy import empty, int16, array + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-callback_01-df40fd5.json b/tests/reference/asr-callback_01-df40fd5.json index bd4b1b73fc..cfd5db0657 100644 --- a/tests/reference/asr-callback_01-df40fd5.json +++ b/tests/reference/asr-callback_01-df40fd5.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-callback_01-df40fd5.stdout", - "stdout_hash": "5be73c5b09034604701853c55fffbdca38993aa3f92782e89a50c91e", + "stdout_hash": "d8283ff4af45372de119998a592b0995335f8d6ada869664e3306a22", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-callback_01-df40fd5.stdout b/tests/reference/asr-callback_01-df40fd5.stdout index 2151b35be2..85ec941f5a 100644 --- a/tests/reference/asr-callback_01-df40fd5.stdout +++ b/tests/reference/asr-callback_01-df40fd5.stdout @@ -506,7 +506,7 @@ [] .false. ) - [func] + [] [(Var 6 func) (Var 6 arg)] [(= diff --git a/tests/reference/asr-cast-435c233.json b/tests/reference/asr-cast-435c233.json index 5189688348..e72cca7a11 100644 --- a/tests/reference/asr-cast-435c233.json +++ b/tests/reference/asr-cast-435c233.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-cast-435c233.stdout", - "stdout_hash": "8fcabb60b55c6549ff83adbe13925dc2af02456a07c732506ffb210d", + "stdout_hash": "7706a2702e0eaf323a113deb332715ff149affcc6f3e3558160ad4c7", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-cast-435c233.stderr b/tests/reference/asr-cast-435c233.stderr new file mode 100644 index 0000000000..74531e3791 --- /dev/null +++ b/tests/reference/asr-cast-435c233.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/cast.py:5:9 + | +5 | x = list(s) + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-cast-435c233.stdout b/tests/reference/asr-cast-435c233.stdout index a89057e7ee..b934be6b92 100644 --- a/tests/reference/asr-cast-435c233.stdout +++ b/tests/reference/asr-cast-435c233.stdout @@ -126,7 +126,7 @@ [] .false. ) - [list] + [] [] [(= (Var 3 s) diff --git a/tests/reference/asr-complex1-f26c460.json b/tests/reference/asr-complex1-f26c460.json index d46a43e8ad..8b7e35bd00 100644 --- a/tests/reference/asr-complex1-f26c460.json +++ b/tests/reference/asr-complex1-f26c460.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-complex1-f26c460.stdout", - "stdout_hash": "37ada4aa867bb639fc2760870e6b1cafc0dcc7e2d04400168d4d0fbb", + "stdout_hash": "b4eca9e059405fb89e3d02ac8e4e22fa3e40efdac4f91c696afdebaa", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-complex1-f26c460.stderr b/tests/reference/asr-complex1-f26c460.stderr new file mode 100644 index 0000000000..b6f4d1d8f0 --- /dev/null +++ b/tests/reference/asr-complex1-f26c460.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/complex1.py:11:13 + | +11 | c = c32(complex()) + | ^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-complex1-f26c460.stdout b/tests/reference/asr-complex1-f26c460.stdout index bb76076109..e11ea64043 100644 --- a/tests/reference/asr-complex1-f26c460.stdout +++ b/tests/reference/asr-complex1-f26c460.stdout @@ -368,12 +368,7 @@ [] .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) diff --git a/tests/reference/asr-constants1-5828e8a.json b/tests/reference/asr-constants1-5828e8a.json index 75650b1281..428f30e56d 100644 --- a/tests/reference/asr-constants1-5828e8a.json +++ b/tests/reference/asr-constants1-5828e8a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-constants1-5828e8a.stdout", - "stdout_hash": "2c950a25d6525933ab4f2b7cf1861c0654e94a54876a995bfcf5ef78", + "stdout_hash": "2ac6a82a6b1fd28fc9f55f49af5ab2019948547619b8ef7a60c3bf70", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-constants1-5828e8a.stderr b/tests/reference/asr-constants1-5828e8a.stderr new file mode 100644 index 0000000000..d831d31282 --- /dev/null +++ b/tests/reference/asr-constants1-5828e8a.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/constants1.py:5:9 + | +5 | b = bin(5) + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-constants1-5828e8a.stdout b/tests/reference/asr-constants1-5828e8a.stdout index 3f30d0e665..4c5ea28e4d 100644 --- a/tests/reference/asr-constants1-5828e8a.stdout +++ b/tests/reference/asr-constants1-5828e8a.stdout @@ -80,7 +80,7 @@ [] .false. ) - [complex@__lpython_overloaded_5__complex] + [] [] [(= (Var 5 a) @@ -306,7 +306,7 @@ [] .false. ) - [complex@__lpython_overloaded_9__complex] + [] [] [(= (Var 7 a) @@ -510,9 +510,7 @@ [] .false. ) - [bin - oct - hex] + [] [] [(= (Var 3 b) @@ -846,7 +844,7 @@ [] .false. ) - [divmod] + [] [] [(= (Var 12 a) diff --git a/tests/reference/asr-elemental_01-b58df26.json b/tests/reference/asr-elemental_01-b58df26.json index 86e02e2cb9..d3528e63c2 100644 --- a/tests/reference/asr-elemental_01-b58df26.json +++ b/tests/reference/asr-elemental_01-b58df26.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-elemental_01-b58df26.stdout", - "stdout_hash": "49d26cae5fff4cf639407607ac69cd989c26d915e5da7ce2368d6126", + "stdout_hash": "6555dc71f6d6443676246f628d0c911e5bb0759afc1f67ae8e815e09", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-elemental_01-b58df26.stderr b/tests/reference/asr-elemental_01-b58df26.stderr new file mode 100644 index 0000000000..464e01fed8 --- /dev/null +++ b/tests/reference/asr-elemental_01-b58df26.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/elemental_01.py:2:1 + | +2 | from numpy import empty, sin, cos, reshape, int32, float32, float64 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-elemental_01-b58df26.stdout b/tests/reference/asr-elemental_01-b58df26.stdout index d123cb4c36..084fe11044 100644 --- a/tests/reference/asr-elemental_01-b58df26.stdout +++ b/tests/reference/asr-elemental_01-b58df26.stdout @@ -190,8 +190,7 @@ [] .false. ) - [cos@__lpython_overloaded_0__cos - verify2d] + [verify2d] [] [(= (Var 217 array2d) @@ -885,9 +884,7 @@ [] .false. ) - [sin@__lpython_overloaded_1__sin - verify1d - sin@__lpython_overloaded_0__sin + [verify1d verifynd] [] [(= @@ -1771,8 +1768,7 @@ [] .false. ) - [sin@__lpython_overloaded_1__sin - cos@__lpython_overloaded_1__cos] + [] [] [(= (Var 218 eps) @@ -2365,7 +2361,7 @@ [] .false. ) - [sin@__lpython_overloaded_1__sin] + [] [(Var 209 array) (Var 209 result) (Var 209 size)] @@ -3197,7 +3193,7 @@ [] .false. ) - [cos@__lpython_overloaded_0__cos] + [] [(Var 211 array) (Var 211 result) (Var 211 size1) @@ -3572,7 +3568,7 @@ [] .false. ) - [sin@__lpython_overloaded_0__sin] + [] [(Var 210 array) (Var 210 result) (Var 210 size1) diff --git a/tests/reference/asr-expr10-efcbb1b.json b/tests/reference/asr-expr10-efcbb1b.json index 57a6bc4984..d156bee312 100644 --- a/tests/reference/asr-expr10-efcbb1b.json +++ b/tests/reference/asr-expr10-efcbb1b.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr10-efcbb1b.stdout", - "stdout_hash": "a9005fa84c32298d2950d36c1e34f0e7e07fd1801a0cb6f5207268a0", + "stdout_hash": "c5ed7ae39603a5bd33ffdf01f65d4b6a4c9b2048ae68b147a8822a61", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr10-efcbb1b.stderr b/tests/reference/asr-expr10-efcbb1b.stderr new file mode 100644 index 0000000000..e35c34b037 --- /dev/null +++ b/tests/reference/asr-expr10-efcbb1b.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/expr10.py:28:14 + | +28 | c = +c32(complex(1, 2)) + | ^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-expr10-efcbb1b.stdout b/tests/reference/asr-expr10-efcbb1b.stdout index 17fd3631ef..8abb2fc1b9 100644 --- a/tests/reference/asr-expr10-efcbb1b.stdout +++ b/tests/reference/asr-expr10-efcbb1b.stdout @@ -170,7 +170,7 @@ [] .false. ) - [complex@__lpython_overloaded_13__complex] + [] [] [(= (Var 3 a) diff --git a/tests/reference/asr-expr13-81bdb5a.json b/tests/reference/asr-expr13-81bdb5a.json index 0c935be1bc..fd380688ce 100644 --- a/tests/reference/asr-expr13-81bdb5a.json +++ b/tests/reference/asr-expr13-81bdb5a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr13-81bdb5a.stdout", - "stdout_hash": "3e97f08c1c5804c80b6e520eade29cdc7a3fc0720ec2249211492946", + "stdout_hash": "52fbcfcf2affa3cdaedd2221c4cc552b0d6f9656dccb3c40f294d5d4", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr13-81bdb5a.stderr b/tests/reference/asr-expr13-81bdb5a.stderr new file mode 100644 index 0000000000..d05293f0a0 --- /dev/null +++ b/tests/reference/asr-expr13-81bdb5a.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/expr13.py:9:9 + | +9 | a = complex(3, 4) == complex(3., 4.) + | ^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-expr13-81bdb5a.stdout b/tests/reference/asr-expr13-81bdb5a.stdout index cab0937de6..66d4a36070 100644 --- a/tests/reference/asr-expr13-81bdb5a.stdout +++ b/tests/reference/asr-expr13-81bdb5a.stdout @@ -74,8 +74,7 @@ [] .false. ) - [complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_5__complex] + [] [] [(= (Var 3 a) diff --git a/tests/reference/asr-expr7-480ba2f.json b/tests/reference/asr-expr7-480ba2f.json index 7ba775395b..f19c904af9 100644 --- a/tests/reference/asr-expr7-480ba2f.json +++ b/tests/reference/asr-expr7-480ba2f.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr7-480ba2f.stdout", - "stdout_hash": "54a30b266a7706923ab4c087907212dadfd84ede8c484230ca432fc4", + "stdout_hash": "80d1d0b83919300e41f4130929820d827d95ec1e37c11b61e1118c60", "stderr": "asr-expr7-480ba2f.stderr", "stderr_hash": "6e9790ac88db1a9ead8f64a91ba8a6605de67167037908a74b77be0c", "returncode": 0 diff --git a/tests/reference/asr-expr7-480ba2f.stdout b/tests/reference/asr-expr7-480ba2f.stdout index 76601580e3..b984067c5c 100644 --- a/tests/reference/asr-expr7-480ba2f.stdout +++ b/tests/reference/asr-expr7-480ba2f.stdout @@ -165,7 +165,7 @@ [] .false. ) - [pow@__lpython_overloaded_0__pow] + [] [] [(= (Var 3 a) @@ -300,7 +300,7 @@ [] .false. ) - [pow@__lpython_overloaded_0__pow] + [] [(Var 4 a) (Var 4 b)] [(= diff --git a/tests/reference/asr-expr8-6beda60.stderr b/tests/reference/asr-expr8-6beda60.stderr new file mode 100644 index 0000000000..6e9d8d0f32 --- /dev/null +++ b/tests/reference/asr-expr8-6beda60.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/expr8.py:22:13 + | +22 | x = i32(b1//b1) + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-expr_05-3a37324.json b/tests/reference/asr-expr_05-3a37324.json index e07677942f..4d95dcbd3c 100644 --- a/tests/reference/asr-expr_05-3a37324.json +++ b/tests/reference/asr-expr_05-3a37324.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-expr_05-3a37324.stdout", - "stdout_hash": "1eccc1af00f66ddd377b0112074319f74dc3c4a7ea27d76380f94adc", + "stdout_hash": "f51978a9f1e69972ca659433fe4f3f262bd8ea9765963728e3cf48b9", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-expr_05-3a37324.stderr b/tests/reference/asr-expr_05-3a37324.stderr new file mode 100644 index 0000000000..a8b017fcee --- /dev/null +++ b/tests/reference/asr-expr_05-3a37324.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/expr_05.py:7:12 + | +7 | return a%b + | ^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-expr_05-3a37324.stdout b/tests/reference/asr-expr_05-3a37324.stdout index 3e0b6a8b35..0c0e85b5f6 100644 --- a/tests/reference/asr-expr_05-3a37324.stdout +++ b/tests/reference/asr-expr_05-3a37324.stdout @@ -287,10 +287,7 @@ .false. ) [test_multiply - test_mod - _mod@__lpython_overloaded_2___mod - _mod@__lpython_overloaded_9___mod - _mod@__lpython_overloaded_4___mod] + test_mod] [] [(= (Var 5 a) @@ -1490,7 +1487,7 @@ [] .false. ) - [_mod@__lpython_overloaded_2___mod] + [] [(Var 4 a) (Var 4 b)] [(= diff --git a/tests/reference/asr-generics_array_01-682b1b2.stderr b/tests/reference/asr-generics_array_01-682b1b2.stderr new file mode 100644 index 0000000000..91024d158c --- /dev/null +++ b/tests/reference/asr-generics_array_01-682b1b2.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/generics_array_01.py:2:1 + | +2 | from numpy import empty, int32 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-generics_array_02-22c8dc1.stderr b/tests/reference/asr-generics_array_02-22c8dc1.stderr new file mode 100644 index 0000000000..252a42ae21 --- /dev/null +++ b/tests/reference/asr-generics_array_02-22c8dc1.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/generics_array_02.py:2:1 + | +2 | from numpy import empty, int32, float32 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-generics_array_03-fb3706c.stderr b/tests/reference/asr-generics_array_03-fb3706c.stderr new file mode 100644 index 0000000000..873e342ad1 --- /dev/null +++ b/tests/reference/asr-generics_array_03-fb3706c.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/generics_array_03.py:2:1 + | +2 | from numpy import empty, int32, float32 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-modules_02-ec92e6f.json b/tests/reference/asr-modules_02-ec92e6f.json index c5fb14dbf6..ac3d363723 100644 --- a/tests/reference/asr-modules_02-ec92e6f.json +++ b/tests/reference/asr-modules_02-ec92e6f.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-modules_02-ec92e6f.stdout", - "stdout_hash": "20ce6ad550f4e6b83356075795a39dafee13dc48bebf2eaf65d13edd", + "stdout_hash": "f7012d14107bdb4c7c6c6c9a8b3fee327d4da2ed164751399357e1eb", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-modules_02-ec92e6f.stdout b/tests/reference/asr-modules_02-ec92e6f.stdout index 7497bd6280..70d458cbc6 100644 --- a/tests/reference/asr-modules_02-ec92e6f.stdout +++ b/tests/reference/asr-modules_02-ec92e6f.stdout @@ -90,7 +90,7 @@ [] .false. ) - [f] + [] [] [(= (Var 7 x) @@ -189,7 +189,7 @@ [] .false. ) - [g] + [] [] [(SubroutineCall 3 g diff --git a/tests/reference/asr-structs_05-fa98307.stderr b/tests/reference/asr-structs_05-fa98307.stderr new file mode 100644 index 0000000000..ffff18de12 --- /dev/null +++ b/tests/reference/asr-structs_05-fa98307.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/structs_05.py:2:1 + | +2 | from numpy import empty + | ^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_bool_binop-f856ef0.stderr b/tests/reference/asr-test_bool_binop-f856ef0.stderr new file mode 100644 index 0000000000..725d3bd642 --- /dev/null +++ b/tests/reference/asr-test_bool_binop-f856ef0.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_bool_binop.py:14:13 + | +14 | i = i32(True // True) + | ^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.json b/tests/reference/asr-test_builtin_bin-52ba9fa.json index 39f4d568b8..59395a4441 100644 --- a/tests/reference/asr-test_builtin_bin-52ba9fa.json +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_bin-52ba9fa.stdout", - "stdout_hash": "b97a86d49e3f729ede8617120bbbea9caf9cf722b41570f7681d8812", + "stdout_hash": "5d3860eec54d8b3d02d591fac9218c8a82507da0fe5f1ab9a5001563", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.stderr b/tests/reference/asr-test_builtin_bin-52ba9fa.stderr new file mode 100644 index 0000000000..06b339838a --- /dev/null +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_builtin_bin.py:6:12 + | +6 | assert bin(i) == "0b101" + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout index ded6a951de..379bb293a7 100644 --- a/tests/reference/asr-test_builtin_bin-52ba9fa.stdout +++ b/tests/reference/asr-test_builtin_bin-52ba9fa.stdout @@ -90,7 +90,7 @@ [] .false. ) - [bin] + [] [] [(= (Var 3 i) diff --git a/tests/reference/asr-test_builtin_bool-330223a.json b/tests/reference/asr-test_builtin_bool-330223a.json index 1700e17079..4b46b88bb1 100644 --- a/tests/reference/asr-test_builtin_bool-330223a.json +++ b/tests/reference/asr-test_builtin_bool-330223a.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_bool-330223a.stdout", - "stdout_hash": "55b71d09ac27f2046e7aa66a8e210dd7ce9a2bb75c035f7224392b29", + "stdout_hash": "98f3a326f1d3e8ad110b1d3452036ecca9cd4b347d66d9d876029f92", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_bool-330223a.stderr b/tests/reference/asr-test_builtin_bool-330223a.stderr new file mode 100644 index 0000000000..6061f4823c --- /dev/null +++ b/tests/reference/asr-test_builtin_bool-330223a.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_builtin_bool.py:56:13 + | +56 | c = c32(complex(2, 3)) + | ^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_bool-330223a.stdout b/tests/reference/asr-test_builtin_bool-330223a.stdout index d503f1af1e..0fb0e6464a 100644 --- a/tests/reference/asr-test_builtin_bool-330223a.stdout +++ b/tests/reference/asr-test_builtin_bool-330223a.stdout @@ -254,8 +254,7 @@ [] .false. ) - [complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_13__complex] + [] [] [(= (Var 3 a) diff --git a/tests/reference/asr-test_builtin_hex-64bd268.json b/tests/reference/asr-test_builtin_hex-64bd268.json index 1f5f9a78cc..6873ad94c3 100644 --- a/tests/reference/asr-test_builtin_hex-64bd268.json +++ b/tests/reference/asr-test_builtin_hex-64bd268.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_hex-64bd268.stdout", - "stdout_hash": "ee5c3747934937e52b616b50585c89558a675270b2ae49aa1b1011e3", + "stdout_hash": "68d17e2bc0d604fef0be0c0c170c4bf27b20195008467579affd682e", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_hex-64bd268.stderr b/tests/reference/asr-test_builtin_hex-64bd268.stderr new file mode 100644 index 0000000000..40dc59a4e9 --- /dev/null +++ b/tests/reference/asr-test_builtin_hex-64bd268.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_builtin_hex.py:6:12 + | +6 | assert hex(i) == "0x22" + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_hex-64bd268.stdout b/tests/reference/asr-test_builtin_hex-64bd268.stdout index 3785269878..c4e27ab101 100644 --- a/tests/reference/asr-test_builtin_hex-64bd268.stdout +++ b/tests/reference/asr-test_builtin_hex-64bd268.stdout @@ -90,7 +90,7 @@ [] .false. ) - [hex] + [] [] [(= (Var 3 i) diff --git a/tests/reference/asr-test_builtin_oct-20b9066.json b/tests/reference/asr-test_builtin_oct-20b9066.json index c3d8fc8918..a1fdae9477 100644 --- a/tests/reference/asr-test_builtin_oct-20b9066.json +++ b/tests/reference/asr-test_builtin_oct-20b9066.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_oct-20b9066.stdout", - "stdout_hash": "644a6a54370c52021d12efeb18cfe9a074a1be972e8ef583b726b237", + "stdout_hash": "0c387ee657c68e4b0dfa88365ef68b8f5b41e86b46ba8c6c64bbc405", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_oct-20b9066.stderr b/tests/reference/asr-test_builtin_oct-20b9066.stderr new file mode 100644 index 0000000000..8bde6da6dc --- /dev/null +++ b/tests/reference/asr-test_builtin_oct-20b9066.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_builtin_oct.py:6:12 + | +6 | assert oct(i) == "0o42" + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_oct-20b9066.stdout b/tests/reference/asr-test_builtin_oct-20b9066.stdout index f1fdce440c..a643189e5a 100644 --- a/tests/reference/asr-test_builtin_oct-20b9066.stdout +++ b/tests/reference/asr-test_builtin_oct-20b9066.stdout @@ -90,7 +90,7 @@ [] .false. ) - [oct] + [] [] [(= (Var 3 i) diff --git a/tests/reference/asr-test_builtin_pow-f02fcda.json b/tests/reference/asr-test_builtin_pow-f02fcda.json index 1a656ac5b9..a8047e7681 100644 --- a/tests/reference/asr-test_builtin_pow-f02fcda.json +++ b/tests/reference/asr-test_builtin_pow-f02fcda.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_pow-f02fcda.stdout", - "stdout_hash": "e015ccee39b664c51d401513656a774e58f5f076e6eb4be0f262e294", + "stdout_hash": "c543a298dce8076489dd47f639245a3766604167d487d6371b87f30b", "stderr": "asr-test_builtin_pow-f02fcda.stderr", "stderr_hash": "859ce76c74748f2d32c7eab92cfbba789a78d4cbf5818646b99806ea", "returncode": 0 diff --git a/tests/reference/asr-test_builtin_pow-f02fcda.stdout b/tests/reference/asr-test_builtin_pow-f02fcda.stdout index bb85c9715e..e84ccea854 100644 --- a/tests/reference/asr-test_builtin_pow-f02fcda.stdout +++ b/tests/reference/asr-test_builtin_pow-f02fcda.stdout @@ -502,19 +502,7 @@ [] .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) diff --git a/tests/reference/asr-test_builtin_round-7417a21.json b/tests/reference/asr-test_builtin_round-7417a21.json index 3b767e0954..e040546a97 100644 --- a/tests/reference/asr-test_builtin_round-7417a21.json +++ b/tests/reference/asr-test_builtin_round-7417a21.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_builtin_round-7417a21.stdout", - "stdout_hash": "2b38c6de72ee72a3f10cf28966e8c6fefe9021030b3b770386037ae9", + "stdout_hash": "daa107175f28069c0297bd7cc86b989667df02426dfecb6c114a46e0", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_builtin_round-7417a21.stderr b/tests/reference/asr-test_builtin_round-7417a21.stderr new file mode 100644 index 0000000000..570365512c --- /dev/null +++ b/tests/reference/asr-test_builtin_round-7417a21.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_builtin_round.py:6:12 + | +6 | assert round(f) == 6 + | ^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_builtin_round-7417a21.stdout b/tests/reference/asr-test_builtin_round-7417a21.stdout index 1b86cfbd89..41262577a0 100644 --- a/tests/reference/asr-test_builtin_round-7417a21.stdout +++ b/tests/reference/asr-test_builtin_round-7417a21.stdout @@ -256,13 +256,7 @@ [] .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) diff --git a/tests/reference/asr-test_complex_01-a6def58.json b/tests/reference/asr-test_complex_01-a6def58.json index 6a087477dd..6c547762cf 100644 --- a/tests/reference/asr-test_complex_01-a6def58.json +++ b/tests/reference/asr-test_complex_01-a6def58.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_complex_01-a6def58.stdout", - "stdout_hash": "b32fd371ee1e9d4d1e4c183cbb8355e09e54433cf6ca73d70af1098f", + "stdout_hash": "413be8dda53bafec80f0a34ea2c1cfbf54a68748cfc4c621a297f7e9", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_complex_01-a6def58.stderr b/tests/reference/asr-test_complex_01-a6def58.stderr new file mode 100644 index 0000000000..f87f59ca76 --- /dev/null +++ b/tests/reference/asr-test_complex_01-a6def58.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_complex_01.py:17:9 + | +17 | x = complex(4.5, 6.7) + | ^^^^^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_complex_01-a6def58.stdout b/tests/reference/asr-test_complex_01-a6def58.stdout index a985f9b935..239db7e1ab 100644 --- a/tests/reference/asr-test_complex_01-a6def58.stdout +++ b/tests/reference/asr-test_complex_01-a6def58.stdout @@ -359,16 +359,7 @@ [] .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) @@ -1097,7 +1088,7 @@ [] .false. ) - [complex@__lpython_overloaded_9__complex] + [] [] [(= (Var 6 c) @@ -1297,9 +1288,7 @@ [] .false. ) - [complex@__lpython_overloaded_13__complex - complex@__lpython_overloaded_9__complex - complex@__lpython_overloaded_5__complex] + [] [] [(= (Var 5 c) diff --git a/tests/reference/asr-test_complex_02-782ba2d.json b/tests/reference/asr-test_complex_02-782ba2d.json index 9f3d8d3db5..929d8dad68 100644 --- a/tests/reference/asr-test_complex_02-782ba2d.json +++ b/tests/reference/asr-test_complex_02-782ba2d.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_complex_02-782ba2d.stdout", - "stdout_hash": "1530dca26a1748f3b05a899adc53fdd8f5c49a047ae5f8ea4b3e83bf", + "stdout_hash": "a045cd28e792ea5970e5e9cd8d26f16bbe9116222e257c5891881bc4", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_complex_02-782ba2d.stderr b/tests/reference/asr-test_complex_02-782ba2d.stderr new file mode 100644 index 0000000000..b61ce381bd --- /dev/null +++ b/tests/reference/asr-test_complex_02-782ba2d.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_complex_02.py:5:13 + | +5 | x = c32(complex(3, 4)) + | ^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_complex_02-782ba2d.stdout b/tests/reference/asr-test_complex_02-782ba2d.stdout index fad8776ed5..9c5faf6972 100644 --- a/tests/reference/asr-test_complex_02-782ba2d.stdout +++ b/tests/reference/asr-test_complex_02-782ba2d.stdout @@ -182,7 +182,7 @@ [] .false. ) - [complex@__lpython_overloaded_9__complex] + [] [] [(= (Var 3 x) diff --git a/tests/reference/asr-test_max_min-3c2fc51.json b/tests/reference/asr-test_max_min-3c2fc51.json index bef398e563..3ee9415031 100644 --- a/tests/reference/asr-test_max_min-3c2fc51.json +++ b/tests/reference/asr-test_max_min-3c2fc51.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_max_min-3c2fc51.stdout", - "stdout_hash": "134997b2df4eb5392b33659a063c0305050e8cff91f1f83fe2b4dca1", + "stdout_hash": "96ed5fcfc8bdf6ce1767b4c129e97164760147f3dc1f9bcae482f1ac", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-test_max_min-3c2fc51.stderr b/tests/reference/asr-test_max_min-3c2fc51.stderr new file mode 100644 index 0000000000..15c4a4ff5a --- /dev/null +++ b/tests/reference/asr-test_max_min-3c2fc51.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/../integration_tests/test_max_min.py:7:12 + | +7 | assert max(a, b) == b + | ^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_max_min-3c2fc51.stdout b/tests/reference/asr-test_max_min-3c2fc51.stdout index 09eb54b9b1..ea1dd43466 100644 --- a/tests/reference/asr-test_max_min-3c2fc51.stdout +++ b/tests/reference/asr-test_max_min-3c2fc51.stdout @@ -199,8 +199,7 @@ [] .false. ) - [max@__lpython_overloaded_2__max - max@__lpython_overloaded_3__max] + [] [] [(= (Var 4 d) @@ -368,8 +367,7 @@ [] .false. ) - [max@__lpython_overloaded_0__max - max@__lpython_overloaded_1__max] + [] [] [(= (Var 3 a) diff --git a/tests/reference/asr-test_numpy_03-e600a49.stderr b/tests/reference/asr-test_numpy_03-e600a49.stderr new file mode 100644 index 0000000000..74f788b4cf --- /dev/null +++ b/tests/reference/asr-test_numpy_03-e600a49.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/test_numpy_03.py:2:1 + | +2 | from numpy import reshape, empty, int32, float64 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_numpy_04-ecbb614.stderr b/tests/reference/asr-test_numpy_04-ecbb614.stderr new file mode 100644 index 0000000000..7bc395d1fc --- /dev/null +++ b/tests/reference/asr-test_numpy_04-ecbb614.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/test_numpy_04.py:2:1 + | +2 | from numpy import array + | ^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr-test_pow-3f5d550.json b/tests/reference/asr-test_pow-3f5d550.json index d210e30fef..ab1c1bd421 100644 --- a/tests/reference/asr-test_pow-3f5d550.json +++ b/tests/reference/asr-test_pow-3f5d550.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-test_pow-3f5d550.stdout", - "stdout_hash": "cd90c1d3c2dd214aef1599cf49fa19d7cc6df47d2a46b555f6cafbb4", + "stdout_hash": "7e194b32fd24e0d73584562429627d77c8aadddd1d3bfcebd0de49b4", "stderr": "asr-test_pow-3f5d550.stderr", "stderr_hash": "3d950301563cce75654f28bf41f6f53428ed1f5ae997774345f374a3", "returncode": 0 diff --git a/tests/reference/asr-test_pow-3f5d550.stdout b/tests/reference/asr-test_pow-3f5d550.stdout index 49a85735e0..cf14e5d84f 100644 --- a/tests/reference/asr-test_pow-3f5d550.stdout +++ b/tests/reference/asr-test_pow-3f5d550.stdout @@ -84,7 +84,7 @@ [] .false. ) - [pow@__lpython_overloaded_0__pow] + [] [] [(Print () diff --git a/tests/reference/asr-vec_01-66ac423.stderr b/tests/reference/asr-vec_01-66ac423.stderr new file mode 100644 index 0000000000..0371022cc6 --- /dev/null +++ b/tests/reference/asr-vec_01-66ac423.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/vec_01.py:2:1 + | +2 | from numpy import empty, float64 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/asr_json-modules_02-53952e6.json b/tests/reference/asr_json-modules_02-53952e6.json index 9948a65e7c..bd3349e2e8 100644 --- a/tests/reference/asr_json-modules_02-53952e6.json +++ b/tests/reference/asr_json-modules_02-53952e6.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr_json-modules_02-53952e6.stdout", - "stdout_hash": "c97d528fedb41f6d0e8bfa0cee1c0c9333844130b7694cb0cd5e2c4c", + "stdout_hash": "e892b3c18edf8029365b57a801ed88b5f7eb43f2d12d0ed21a53538f", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr_json-modules_02-53952e6.stdout b/tests/reference/asr_json-modules_02-53952e6.stdout index f04f24c482..38570da3b1 100644 --- a/tests/reference/asr_json-modules_02-53952e6.stdout +++ b/tests/reference/asr_json-modules_02-53952e6.stdout @@ -188,9 +188,7 @@ "last_column": 7 } }, - "dependencies": [ - "f" - ], + "dependencies": [], "args": [], "body": [ { @@ -711,9 +709,7 @@ "last_column": 16 } }, - "dependencies": [ - "g" - ], + "dependencies": [], "args": [], "body": [ { diff --git a/tests/reference/cpp-expr15-1661c0d.stderr b/tests/reference/cpp-expr15-1661c0d.stderr new file mode 100644 index 0000000000..9b4deb20d2 --- /dev/null +++ b/tests/reference/cpp-expr15-1661c0d.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/expr15.py:11:9 + | +11 | x = complex(2, 2) + | ^^^^^^^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/cpp-expr8-704cece.stderr b/tests/reference/cpp-expr8-704cece.stderr new file mode 100644 index 0000000000..6e9d8d0f32 --- /dev/null +++ b/tests/reference/cpp-expr8-704cece.stderr @@ -0,0 +1,11 @@ +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> tests/expr8.py:22:13 + | +22 | x = i32(b1//b1) + | ^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/pass_loop_vectorise-vec_01-be9985e.json b/tests/reference/pass_loop_vectorise-vec_01-be9985e.json index b2a241b0fa..ee10a1201a 100644 --- a/tests/reference/pass_loop_vectorise-vec_01-be9985e.json +++ b/tests/reference/pass_loop_vectorise-vec_01-be9985e.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "pass_loop_vectorise-vec_01-be9985e.stdout", - "stdout_hash": "cb9b13ca52d6c9ae208015c3fbd5007d5eb44187be1232d6636d0ee0", + "stdout_hash": "00276d79d08a473e1e39d5a40747ec12d8111ae29d6ab0e90a19ca1f", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/pass_loop_vectorise-vec_01-be9985e.stderr b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stderr new file mode 100644 index 0000000000..0371022cc6 --- /dev/null +++ b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stderr @@ -0,0 +1,17 @@ +warning: The module 'numpy' located in $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py cannot be loaded + --> tests/../integration_tests/vec_01.py:2:1 + | +2 | from numpy import empty, float64 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ imported here + +warning: The module 'lpython_builtin' located in $DIR/src/bin/../runtime/lpython_builtin.py cannot be loaded + --> $DIR/src/bin/../runtime/lpython_intrinsic_numpy.py:364:12 + | +364 | return x1 % x2 + | ^^^^^^^ imported here + +semantic error: The symbol '_lpython_floordiv' not found in the module 'lpython_builtin' + --> $DIR/src/bin/../runtime/lpython_builtin.py:209:15 + | +209 | if (n_ - (n_ // 2)*2) == 0: + | ^^^^^^^ diff --git a/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout index cd4fd6fda2..a4f7321979 100644 --- a/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout +++ b/tests/reference/pass_loop_vectorise-vec_01-be9985e.stdout @@ -352,7 +352,7 @@ [] .false. ) - [vector_copy_f64[9216]f64[9216]i32@IntrinsicOptimization] + [] [] [(= (Var 209 a)