From cef7610b14a3c5997018843e08f4bc15ecbdb784 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 27 Nov 2020 20:02:17 -0500 Subject: [PATCH] Fix crash on virtual interfaces. --- src/verilog.y | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/verilog.y b/src/verilog.y index 515bda060..e77ea9086 100644 --- a/src/verilog.y +++ b/src/verilog.y @@ -1837,8 +1837,10 @@ data_typeNoRef: // ==IEEE: data_type, excluding class_type etc referenc // // IEEE has ['.' modport] but that will conflict with port // // declarations which decode '.' modport themselves, so // // instead see data_typeVar - | yVIRTUAL__INTERFACE yINTERFACE id/*interface*/ { $$ = nullptr; BBUNSUP($1, "Unsupported: virtual interface"); } - | yVIRTUAL__anyID id/*interface*/ { $$ = nullptr; BBUNSUP($1, "Unsupported: virtual data type"); } + | yVIRTUAL__INTERFACE yINTERFACE id/*interface*/ + { $$ = new AstBasicDType($1, AstBasicDTypeKwd::CHANDLE); BBUNSUP($1, "Unsupported: virtual interface"); } + | yVIRTUAL__anyID id/*interface*/ + { $$ = new AstBasicDType($1, AstBasicDTypeKwd::CHANDLE); BBUNSUP($1, "Unsupported: virtual data type"); } | type_reference { $$ = $1; } // // IEEE: class_scope: see data_type above // // IEEE: class_type: see data_type above