Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bjorng
Copy link
Contributor

@bjorng bjorng commented Mar 4, 2023

Consider this code:

-module(t).
-export([foo/0, bar/4]).

foo() ->
    bar(ok, 0 div 0, node(), [-1]).

bar(_, _, _, _) -> ok.

It fails to compile when some optimizations are turned off:

$ erlc +no_copt +no_ssa_opt t.erl
t:1: function foo/0+7:
  Internal consistency check failed - please report this bug.
  Instruction: {test_heap,2,2}
  Error:       {{x,0},not_live}:

Consider this code:

    -module(t).
    -export([foo/0, bar/4]).

    foo() ->
        bar(ok, 0 div 0, node(), [-1]).

    bar(_, _, _, _) -> ok.

It fails to compile when some optimizations are turned off:

    $ erlc +no_copt +no_ssa_opt t.erl
    t:1: function foo/0+7:
      Internal consistency check failed - please report this bug.
      Instruction: {test_heap,2,2}
      Error:       {{x,0},not_live}:
@bjorng bjorng added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Mar 4, 2023
@bjorng bjorng self-assigned this Mar 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2023

CT Test Results

       2 files     296 suites   12m 5s ⏱️
   764 tests    762 ✔️ 2 💤 0
4 821 runs  4 819 ✔️ 2 💤 0

Results for commit 482d643.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng merged commit 8c62548 into erlang:master Mar 6, 2023
@bjorng bjorng deleted the bjorn/compiler/fix-bad-test_heap branch March 6, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant