From f190d128021b08be58924c0b52e676ea1d3b3641 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 21 Mar 2017 18:22:32 -0400 Subject: [PATCH] Internals: Avoid coredump debugging bug1135. --- src/V3Inline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index 87bba97ea..0c1a11ef1 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -510,6 +510,7 @@ private: // delete it in later optimizations. AstVar* pinOldVarp = pinp->modVarp(); AstVar* pinNewVarp = pinOldVarp->clonep(); + if (!pinNewVarp) pinOldVarp->v3fatalSrc("Cloning failed"); AstNode* connectRefp = pinp->exprp(); if (!connectRefp->castConst() && !connectRefp->castVarRef()) {