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
Describe the bug Running the following code:
f(_V0) when (not (not is_float(_V0))) =/= ((ok and ok) or true) -> ok. wrapper0() -> io:write(catch f(ok)).
with the following commands:
erlc -W0 ~/minimized/test812871.erl erl -pa . -noshell -s test812871 wrapper0 -s init stop
results in ok being printed.
ok
Expected behavior I would expect to see the guard fail because of an exception being thrown by ok and ok.
ok and ok
Affected versions
bad_typed_register
Additional context Adding +no_bool_opt to erlc makes this bug disappear: the output becomes
+no_bool_opt
erlc
{'EXIT',{function_clause,[{test812871,f,[ok],[{file,[47,104,111,109,101,47,114,109,111,114,105,115,115,101,116,47,109,105,110,105,109,105,122,101,100,47,116,101,115,116,56,49,50,56,55,49,46,101,114,108]},{line,7}]},{test812871,wrapper0,0,[{file,[47,104,111,109,101,47,114,109,111,114,105,115,115,101,116,47,109,105,110,105,109,105,122,101,100,47,116,101,115,116,56,49,50,56,55,49,46,101,114,108]},{line,11}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
Which is what I expect to see even with the bool_opt optimisation pass.
The text was updated successfully, but these errors were encountered:
Fix miscompilation of guard with or
or
c17f5de
Closes erlang#7370
Merge pull request #7378 from bjorng/bjorn/compiler/beam_ssa_bool-mis…
ef176ae
…compilation/GH-7370/OTP-18634 Fix miscompilation of guard with `or`
Merge branch 'bjorn/compiler/beam_ssa_bool-miscompilation/GH-7370/OTP…
10780bc
…-18634' into maint-26 * bjorn/compiler/beam_ssa_bool-miscompilation/GH-7370/OTP-18634: Fix miscompilation of guard with `or`
bjorng
Successfully merging a pull request may close this issue.
Describe the bug
Running the following code:
with the following commands:
results in
ok
being printed.Expected behavior
I would expect to see the guard fail because of an exception being thrown by
ok and ok
.Affected versions
bad_typed_register
failure #7355 + beam_ssa_throw: Exceptions may escape modules through funs #7357Additional context
Adding
+no_bool_opt
toerlc
makes this bug disappear: the output becomesWhich is what I expect to see even with the bool_opt optimisation pass.
The text was updated successfully, but these errors were encountered: