8000 UU compiler project (GH-6599) · Issue #7342 · erlang/otp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UU compiler project (GH-6599) #7342

New issue

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

Open
bjorng opened this issue Jun 1, 2023 · 1 comment
Open

UU compiler project (GH-6599) #7342

bjorng opened this issue Jun 1, 2023 · 1 comment
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@bjorng
Copy link
Contributor
bjorng commented Jun 1, 2023

Here are the examples from #6599 that were not fixed by #7330.

To Reproduce
Compile one the following examples:

%% Never finishes.
f(X) when true; X ->
    - maybe
        <<>> ?= X,
        f(maybe
            0 ?= ([] =< ok)
        end),
        <<>> ?= ok
    else
        false  ->
            X;
        0  ->
            X
    end.
%% Never finishes.
f(_, []) ->
    0;
f(X, _) ->
    ?MODULE:foo(
        <<>> =
            try f(ok, X) + 0 of
                X ->
                    X
            catch
                _ ->
                    X
            end
    );
f(_, _) ->
    ok.

EDITED: Moved an example to #7354.

@bjorng
Copy link
Contributor Author
bjorng commented Jun 7, 2023

Additional examples from #7360 with some optimizations disabled.

Compiling with erlc +no_ssa_opt:

f(_V0) ->
    [0 || not (_V0 > (0 bsl erlang:adler32(true = (_V7 = (ok < _V0))))), _V7].

results in the following message:

test21380:1: function f/1+20:
  Internal consistency check failed - please report this bug.
  Instruction: {test,is_eq_exact,{f,10},[{y,0},{atom,true}]}
  Error:       {type_conflict,{t_atom,[ok]},none}:

Compile with erlc +no_copt +no_ssa_opt:

f() ->
    <<_V0/utf32>> = foo,
    [
        0
     || _ <- bar,
        _V4 = (_V2 = _V0) > baz,
        _V4 =
            case _V2 bxor _V2 of
                _ -> ok
            end
    ].

Compile with erlc +no_ssa_opt:

f(_V3) ->
    case foo =< _V3 of
        _V4 when _V4 andalso {trunc(_V3), _V4 orelse bar} ->
            ok
    end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants
0