Skip to content
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

Match expressions panic during SSA flattening if they're on a runtime value with > 2 branches #7323

Open
jfecher opened this issue Feb 7, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented Feb 7, 2025

Aim

fn main(x: Field) {
    match x {
        1 => println(1),
        2 => println(1),
        3 => println(3),
        x => println(x),
    }
}

Expected Behavior

The value of x to be printed

Bug

The application panicked (crashed).
Message:  internal error: entered unreachable code: return encountered before a join point was found. This can only happen if early-return was added to the language without implementing it by jmping to a join block first
Location: compiler/noirc_evaluator/src/ssa/opt/flatten_cfg/branch_analysis.rs:105

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jfecher jfecher added the bug Something isn't working label Feb 7, 2025
@jfecher jfecher self-assigned this Feb 7, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant