argotorg / argotorg/solidity

[Sol->Yul] ICE because IR generator cannot parse location specification

Open
#13,653 2 comments 0 reactions 0 assignees View on GitHub
bug :bug: low impact medium effort
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

Repro:

1. Create a file called `p @src 0:` as follows

```
$ cat < p\ \@src\ 0:
contract C { }
EOF
```

2. Compile said file via IR

```
$ solc p\ @src\ 0\: --ir
```

throws

https://github.com/ethereum/solidity/blob/84cdcec2cfb1fe9d4a9171d3ed0ffefd6107ee42/libsolidity/codegen/ir/IRGenerator.cpp#L112

Contributor guide

Open the contributing guide

Research direction

Reproduce the ICE with the documented filename and `solc p\ @src\ 0\: --ir` command. Then inspect `libsolidity/codegen/ir/IRGenerator.cpp` around line 112 to trace how the location specification is parsed. Done means the same input compiles through IR without the internal compiler error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.