This function seems to inter infinite loop:
LFORTRAN_APIint32_t_lpython_bit_length1(int8_tnum)
{
int32_tres=0;
num=abs(num);
for(; num; num >>= 1, res++);
returnres;
}On Apple M1, using conda-forge. Steps to reproduce (with #1824):
mamba create -n t1 lpython python numpy
conda activate t1
cd integration_tests
./run_tests.py
It will hang in test_bit_length. This patch makes it pass:
--- a/integration_tests/test_bit_length.py+++ b/integration_tests/test_bit_length.py@@ -43,6 +43,6 @@ def ff5():
ff()
ff1()
ff2()
-ff3()+#ff3()
ff4()
ff5()
And a debugger says it hangs in _lpython_bit_length1.
This function seems to inter infinite loop:
On Apple M1, using conda-forge. Steps to reproduce (with #1824):
It will hang in
test_bit_length. This patch makes it pass:And a debugger says it hangs in
_lpython_bit_length1.