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
I expected to see this happen: in the code above, fn1 and fn2 just simply call each other, and there is indeed a infinitely recursion. I expect that when the main is executed, the call to f1 inside main should never return, and the stack will be overflowed at some point.
Instead, this happened: when I enable lto or set opt-level to 1 or higher, the call to f1 suprisingly returns, and the return value is always zero.
I tried this code:
I expected to see this happen: in the code above,
fn1
andfn2
just simply call each other, and there is indeed a infinitely recursion. I expect that when themain
is executed, the call tof1
insidemain
should never return, and the stack will be overflowed at some point.Instead, this happened: when I enable
lto
or setopt-level
to 1 or higher, the call tof1
suprisingly returns, and the return value is always zero.Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: