Fix array slicing of non-const indexes, bug1006.

Signed-off-by: Wilson Snyder <[email protected]>
This commit is contained in:
Johan Bjork
2015-11-24 21:28:04 -05:00
committed by Wilson Snyder
parent 2102f86909
commit 5613758ee3
3 changed files with 15 additions and 3 deletions
+2
View File
@@ -36,6 +36,7 @@
#include "V3Inst.h"
#include "V3Ast.h"
#include "V3Changed.h"
#include "V3Const.h"
//######################################################################
// Inst state, as a visitor of each AstNode
@@ -250,6 +251,7 @@ private:
if (!arrp->subDTypep()->castIfaceRefDType())
return;
V3Const::constifyParamsEdit(arrselp->rhsp());
AstConst *constp = arrselp->rhsp()->castConst();
if (!constp) {
nodep->v3error("Unsupported: Non-constant index when passing interface to module");