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
-module(is_eq_exact).
-compile([export_all]).
f(V) when ((V / V) < (V orelse true)); V; V ->
((V = (a /= V)) orelse 0).
erlc (either built from master as of today including the recent fixes to #6163, #6164, and #6169, or a slightly older version from a few weeks ago) crashes with the following error message:
is_eq_exact:1: function f/1+12:
Internal consistency check failed - please report this bug.
Instruction: {test,is_eq_exact,{f,9},[{x,1},{atom,true}]}
Error: {type_conflict,{t_atom,[true]},{t_atom,[a]}}:
The text was updated successfully, but these errors were encountered:
When attempting to compile the following code:
foo(V) when (V / V < (V orelse true)); V; V ->
(V = (a =/= V)) orelse 0.
the `beam_validator` pass produces the following message:
t:1: function foo/1+12:
Internal consistency check failed - please report this bug.
Instruction: {test,is_eq_exact,{f,9},[{x,1},{atom,true}]}
Error: {type_conflict,{t_atom,[true]},{t_atom,[a]}}:
The type conflict mentioned refers to the expression `a =/= V`. At
the point of its evaluation, `V` is known to `beam_validator` to be
the atom `true`; thus, evaluation of `a =/= V` is redundant because the
result is always `false`.
The root cause of the problem is that `beam_validator` has a stronger
type analysis for `=/=` expressions than `beam_ssa_type`. By
strengthening the type analysis for `=/=` in `beam_ssa_type`, the
offending redundant tests are removed and `beam_validator` is again
silent.
Fixeserlang#6183
On the following code:
erlc (either built from master as of today including the recent fixes to #6163, #6164, and #6169, or a slightly older version from a few weeks ago) crashes with the following error message:
The text was updated successfully, but these errors were encountered: