We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Came across this error when trying out benchmarks. Error occurs only when compiling with the --fast optimization.
--fast
def func() -> i32: return 30 def test() -> i32: temp: i32 = func() return temp x : i32 x = test() print(x)
(lp) sarthak@pop-os:~/lpython$ lpython examples/test.py 30
(lp) sarthak@pop-os:~/lpython$ lpython --fast examples/test.py ASR verify pass error: ASR verify: Block ~empty_block should resolve in current scope. Internal Compiler Error: Unhandled exception Traceback (most recent call last): Binary file "/home/sarthak/lpython/src/bin/lpython", in _start() File "./csu/../csu/libc-start.c", line 392, in __libc_start_main_impl() File "./csu/../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main() File "/home/sarthak/lpython/src/bin/lpython.cpp", line 1750, in ?? err = compile_python_to_object_file(arg_file, tmp_o, runtime_library_dir, File "/home/sarthak/lpython/src/bin/lpython.cpp", line 750, in ?? res = fe.get_llvm3(*asr, pass_manager, diagnostics, infile); File "/home/sarthak/lpython/src/lpython/python_evaluator.cpp", line 58, in LCompilers::PythonCompiler::get_llvm3(LCompilers::ASR::TranslationUnit_t&, LCompilers::PassManager&, LCompilers::diag::Diagnostics&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) run_fn, infile); File "/home/sarthak/lpython/src/libasr/codegen/asr_to_llvm.cpp", line 7027, in LCompilers::asr_to_llvm(LCompilers::ASR::TranslationUnit_t&, LCompilers::diag::Diagnostics&, llvm::LLVMContext&, Allocator&, LCompilers::PassManager&, LCompilers::CompilerOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) pass_manager.apply_passes(al, &asr, pass_options, diagnostics); File "/home/sarthak/lpython/src/libasr/pass/pass_manager.h", line 214, in LCompilers::PassManager::apply_passes(Allocator&, LCompilers::ASR::TranslationUnit_t*, LCompilers::PassOptions&, LCompilers::diag::Diagnostics&) _apply_passes(al, asr, _with_optimization_passes, pass_options, LCompilersException: Verify failed
The text was updated successfully, but these errors were encountered:
Thanks for reporting it, I added this to #1600. I think we need to start testing with --fast in our integration_tests to catch this earlier (#1669).
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Came across this error when trying out benchmarks. Error occurs only when compiling with the
--fast
optimization.The text was updated successfully, but these errors were encountered: