opaque attribute handling issues
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 624
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
When a pointer to a structure is passed through a function parameter, the type of the pointer is incremented with the
opaque tag, which results in a compilation failure. The error message is as follows
`error: 'memref.get_global' op result type 'memref<1x!llvm.struct<"opaque@polygeist@mlir@struct.bit_stream_struc", (memref, i32, memref, ptr, i64, ptr, ptr, ptr, ptr, i64, i32, array<20 x i8>)>>, memref, i32, i64, i32, i32)>>' does not match type 'memref<1x!llvm.struct<"polygeist@mlir@struct.bit_stream_struc", (memref, i32, memref, ptr, i64, ptr, ptr, ptr, ptr, i64, i32, array<20 x i8>)>>, memref, i32, i64, i32, i32)>>' of the global memref @bs`
```
static Bit_stream_struc bs;
void lame_init_params(lame_global_flags *gfp)
{
...
init_bit_stream_w(&bs);
```
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
No source file or test is named. Start by reproducing the compilation failure with the provided C example involving the global Bit_stream_struc and init_bit_stream_w; trace opaque attribute handling for the pointer passed through the function parameter. Done means the generated global memref and function parameter types match without the opaque tag mismatch.
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
- Needs clarification
- Newbie friendliness
- 35/100