diff --git a/Changes b/Changes index 3bb344cc4..6471e8a93 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ The contributors that suggested a given feature are shown in []. Thanks! **** Fix $fread extra semicolon inside statements. [Leendert van Doorn] +**** Fix class extends with VM_PARALLEL_BUILDS (#2775). [Iru Cai] + **** Fix examples not flushing vcd (#2787). [Richard E George] diff --git a/src/V3EmitC.cpp b/src/V3EmitC.cpp index 16936bb2d..99f1f7361 100644 --- a/src/V3EmitC.cpp +++ b/src/V3EmitC.cpp @@ -3080,6 +3080,13 @@ void EmitCImp::emitIntTop(AstNodeModule*) { void EmitCImp::emitInt(AstNodeModule* modp) { puts("\n//==========\n\n"); + + if (AstClass* classp = VN_CAST(modp, Class)) { + if (classp->extendsp()) + puts("#include \"" + prefixNameProtect(classp->extendsp()->classp()->classOrPackagep()) + + ".h\"\n"); + } + emitModCUse(modp, VUseType::INT_INCLUDE); // Declare foreign instances up front to make C++ happy diff --git a/test_regress/t/t_class_extends.pl b/test_regress/t/t_class_extends.pl index aabcde63e..696e24d17 100755 --- a/test_regress/t/t_class_extends.pl +++ b/test_regress/t/t_class_extends.pl @@ -11,6 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di scenarios(simulator => 1); compile( + make_flags => 'VM_PARALLEL_BUILDS=1', # bug2775 ); execute(