From 1a36e05cc62123f983e98fd6fab6bb4dc380b958 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 4 Aug 2019 14:14:28 -0400 Subject: [PATCH] Fix core dump on v3Number replace'ed assertions. --- src/V3AstNodes.h | 1 + test_regress/t/t_math_shift_over_bad.out | 1 + 2 files changed, 2 insertions(+) diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index 24c86e195..8ed952de9 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -58,6 +58,7 @@ private: dtypeSetLogicUnsized(m_num.width(), (m_num.sized() ? 0 : m_num.widthMin()), AstNumeric::fromBool(m_num.isSigned())); } + m_num.nodep(this); } public: AstConst(FileLine* fl, const V3Number& num) diff --git a/test_regress/t/t_math_shift_over_bad.out b/test_regress/t/t_math_shift_over_bad.out index 84450f13b..0054d0ccb 100644 --- a/test_regress/t/t_math_shift_over_bad.out +++ b/test_regress/t/t_math_shift_over_bad.out @@ -1,4 +1,5 @@ %Error: t/t_math_shift_over_bad.v:18: Value too wide for 32-bits expected in this context 64'h123456789abcdef + : ... In instance t assign o = i << 64'h01234567_89abcdef; ^~~~~~~~~~~~~~~~~~~~~ %Error: Exiting due to