Example:
fromltypesimportf64deff() ->f64:
return5.5defmain():
t1: f64=f()*1e6print(t1)
main()
This generates:
$ lpython --show-c a.py...void _xx_lcompilers_changed_main_xx(){ double t1 = f()* 1.00000000000000000e+06; t1 = f()* 1.00000000000000000e+06; printf("%lf\n", t1);}...Which is wrong, it should only be initialized once.
Example:
This generates:
Which is wrong, it should only be initialized once.