Unable to parse struct copy
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 624
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
See the following code:
typedef struct {
float x;
float y;
} MyStruct;
void test() {
MyStruct a = {0, 0};
MyStruct b = {1, 1};
a = b;
}
mlir-clang will get the following error:
mlir-clang: ../tools/mlir-clang/Lib/ValueCategory.cc:44: mlir::Value ValueCategory::getValue(mlir::OpBuilder &) const: Assertion `mt.getShape().size() == 1 && "must have shape 1"' failed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run mlir-clang on the reported C struct-assignment snippet and inspect the assertion in tools/mlir-clang/Lib/ValueCategory.cc:44. Done means the example parses without triggering the shape assertion and produces the expected frontend result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100