Handle unpacked dimensions for struct and union members
Unpacked dimensions for struct or union members are currently silently
discarded. E.g.
```
struct packed { int x[2]; } s;
```
will elaborate successfully as a struct with a non-array int typed field.
This should instead elaborate to an unpacked array of ints typed field. And
subsequently, since unpacked arrays are not allowed in a packed struct or
union, result in an error instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
62b1f44104
commit
832917008c
|
|
@ -215,7 +215,8 @@ ivl_type_t struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const
|
|||
|
||||
netstruct_t::member_t memb;
|
||||
memb.name = namep->name;
|
||||
memb.net_type = mem_vec;
|
||||
memb.net_type = elaborate_array_type(des, scope, *this,
|
||||
mem_vec, namep->index);
|
||||
res->append_member(des, memb);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue