ICE in the codegen when using .slot
on a mapping reference in assembly: InternalCompilerError: Invalid stack item name: slot
#13259
Labels
Description
Sometimes compiling via IR results in the following error (with Foundry):
As the error implies, it seems to be related to storing variables that point to storage slots.
Environment
Steps to Reproduce
In my case, I was able to resolve this by changing the following code from this:
to this:
Link to commit with issue present: https://github.com/jameswenzel/bound-layerable/blob/91b7096cfedd20bb422f5ed1f83c7e50261c2bcc/src/token/ERC721A.sol#L694
Link to commit with issue fixed: https://github.com/jameswenzel/bound-layerable/blob/770ded9df31d624f38e1db6c32d0d5c6f7e64132/src/token/ERC721A.sol#L694
While the code I changed is copied from the ERC721A repo, I'm able to build the code at that commit as-is without issues, with the IR pipeline enabled.
The text was updated successfully, but these errors were encountered: