V0.8: Fail on a zero width repeat
This patch mirrors what was done in development to fail for zero width repeats. Actually development supports them in some contexts, this is allowed in 1364-2005, but V0.8 doesn't support them at all.
This commit is contained in:
parent
7dc473db8d
commit
bb92974839
|
|
@ -444,6 +444,13 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope, bool) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (rep->value().is_zero()) {
|
||||
cerr << get_line() << ": error: Concatenation repeat "
|
||||
<< "may not be zero." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
repeat = rep;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1357,6 +1357,13 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
|
|||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (erep->value().is_zero()) {
|
||||
cerr << get_line() << ": error: Concatenation repeat "
|
||||
<< "may not be zero." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* The operands of the concatenation must contain all
|
||||
|
|
|
|||
Loading…
Reference in New Issue