Fix assertion failure on assignment to part of variable member (GitHub issue #226)

For now, output a "sorry" message, as the compiler doesn't support this.
This commit is contained in:
Martin Whitaker 2019-01-26 17:36:19 +00:00
parent 2ff6af254b
commit dc5429e5e7
1 changed files with 6 additions and 1 deletions

View File

@ -1194,7 +1194,12 @@ bool PEIdent::elaborate_lval_net_packed_member_(Design*des, NetScope*scope,
if (!name_tail.index.empty())
use_sel = name_tail.index.back().sel;
ivl_assert(*this, use_sel == index_component_t::SEL_NONE || use_sel == index_component_t::SEL_BIT);
if (use_sel != index_component_t::SEL_NONE && use_sel != index_component_t::SEL_BIT) {
cerr << get_fileline() << ": sorry: Assignments to part selects of "
"a struct member are not yet supported." << endl;
des->errors += 1;
return false;
}
if (! name_tail.index.empty()) {