You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Comparing lists using the == and != operators leads to an LLVM code generation error #2676
(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py; ModuleID = 'LFortran'source_filename = "LFortran"%list = type { i32, i32, i32* }...declare void @_lpython_call_initial_functions(i32, i8**)attributes #0 = { argmemonly nounwind willreturn }asr_to_llvm: module failed verification. Error:Basic Block in function '__module___main_____main__global_stmts' does not have terminator!label %.entrycode generation error: asr_to_llvm: module failed verification. Error:Basic Block in function '__module___main_____main__global_stmts' does not have terminator!label %.entryNote: Please report unclear or confusing messages as bugs athttps://github.com/lcompilers/lpython/issues.
The issue is the same for !=. It does not occur for > and <.
changed the title [-]Bug: Comparing lists using the `==` and `!=` operators leads to an LLVM code generation error.[/-][+]Bug: Comparing lists using the `==` and `!=` operators leads to an LLVM code generation error[/+]on Apr 30, 2024
Activity
[-]Bug: Comparing lists using the `==` and `!=` operators leads to an LLVM code generation error.[/-][+]Bug: Comparing lists using the `==` and `!=` operators leads to an LLVM code generation error[/+]ubaidsk commentedon May 1, 2024
It seems this happens only for global list variables.
kmr-srbh commentedon May 1, 2024
Thanks for confirming this @Shaikh-Ubaid!