opaque attribute handling issues
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@[email protected]_stream_struc", (memref<?xi8>, i32, memref<?x!llvm.struct<(i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, array<1 x i8>, ptr, i64, ptr, ptr, ptr, ptr, i64, i32, array<20 x i8>)>>, memref<?xi8>, i32, i64, i32, i32)>>' does not match type 'memref<1x!llvm.struct<"polygeist@[email protected]_stream_struc", (memref<?xi8>, i32, memref<?x!llvm.struct<(i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, array<1 x i8>, ptr, i64, ptr, ptr, ptr, ptr, i64, i32, array<20 x i8>)>>, memref<?xi8>, 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);