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

Internal compiler error: An attempt to get register for unknown Value. #4631

Closed
ewynx opened this issue Jun 5, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ewynx
Copy link

ewynx commented Jun 5, 2023

When trying to compile the predicate in this repo https://github.com/hashcloak/fuel-crypto/tree/wallet_predicate/predicate, using forc 0.40.1 it gives the following error:

error: Internal compiler error: An attempt to get register for unknown Value.
Please file an issue on the repository and include the code that triggered this error.

The predicate code starts here: https://github.com/hashcloak/fuel-crypto/blob/wallet_predicate/predicate/src/main.sw#L51

If we copy some of the functionality directly in the main function (instead of calling them from a library), it's possible to get a little bit further, but then eventually will bump into the error posted in this other issue: #4625

@IGI-111 IGI-111 added the bug Something isn't working label Jun 6, 2023
@vaivaswatha
Copy link
Contributor

vaivaswatha commented Jun 6, 2023

The error reported here should be solved by #4628. However just as with #4511 and #4625 , after the fix, I'm seeing

error: Internal compiler error: The allocator cannot resolve a register mapping for this program. This is a temporary artifact of the early stage version of this compiler.  Using #[inline(never)] on some functions may help.
Please file an issue on the repository and include the code that triggered this error.

I'm going to close this as there are two other tracking the same problem.

@vaivaswatha
Copy link
Contributor

On second thought, I'll leave the issue open and close it after it all works, just to be sure.

@vaivaswatha vaivaswatha reopened this Jun 6, 2023
@man2706kum
Copy link

Since #4628 was merged in master, the predicate should get compiled by forc build from source but the error error: The allocator cannot resolve a register mapping for this program.... is still showing up.

JoshuaBatty added a commit that referenced this issue Jul 7, 2023
## Description
This PR includes a spiller for the register allocator and other changes
to the algorithm itself.

Fixes #3429, #2657 #4631, #4511.

---------

Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
@IGI-111 IGI-111 closed this as completed Jul 11, 2023
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
None yet
Development

No branches or pull requests

4 participants