From 2885c2ce97ead38dab644b732361719b07c702e1 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 15 May 2020 19:27:11 -0400 Subject: [PATCH] Fix coredump on countbits. --- src/verilog.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/verilog.y b/src/verilog.y index 5c3693047..b69c92e5f 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -3396,7 +3396,8 @@ system_f_call_or_t: // IEEE: part of system_tf_call (can be task or func) | yD_COUNTBITS '(' expr ',' expr ',' expr ')' { $$ = new AstCountBits($1,$3,$5,$7); } | yD_COUNTBITS '(' expr ',' expr ',' expr ',' expr ')' { $$ = new AstCountBits($1,$3,$5,$7,$9); } | yD_COUNTBITS '(' expr ',' expr ',' expr ',' expr ',' exprList ')' - {$11->v3error("Unsupported: $countbits with more than 3 control fields"); } + { $$ = new AstCountBits($1, $3, $5, $7, $9); + $11->v3error("Unsupported: $countbits with more than 3 control fields"); } | yD_COUNTONES '(' expr ')' { $$ = new AstCountOnes($1,$3); } | yD_DIMENSIONS '(' exprOrDataType ')' { $$ = new AstAttrOf($1,AstAttrType::DIM_DIMENSIONS,$3); } | yD_EXP '(' expr ')' { $$ = new AstExpD($1,$3); }