diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 35f321208..c4de5b60c 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -7727,7 +7727,8 @@ class WidthVisitor final : public VNVisitor { // underp may change as a result of replacement UASSERT_OBJ(underp, parentp, "Node has no child"); underp = userIterateSubtreeReturnEdits(underp, WidthVP{SELF, BOTH}.p()); - UASSERT_OBJ(underp && underp->dtypep(), parentp, + UASSERT_OBJ(underp, parentp, "Node has no child"); + UASSERT_OBJ(underp->dtypep(), underp, "Node has no type"); // Perhaps forgot to do a prelim visit on it? // // For DOUBLE under a logical op, add implied test against zero, never a warning @@ -7779,7 +7780,8 @@ class WidthVisitor final : public VNVisitor { // Returns the new underp // Conversion to/from doubles and integers are before iterating. UASSERT_OBJ(stage == FINAL, parentp, "Bad state to iterateCheck"); - UASSERT_OBJ(underp && underp->dtypep(), parentp, + UASSERT_OBJ(underp, parentp, "Node has no child"); + UASSERT_OBJ(underp->dtypep(), underp, "Node has no type"); // Perhaps forgot to do a prelim visit on it? if (VN_IS(underp, NodeDType)) { // Note the node itself, not node's data type // Must be near top of these checks as underp->dtypep() will look normal diff --git a/test_regress/t/t_class_param_nested_bad.out b/test_regress/t/t_class_param_nested_bad.out index a4cc495ba..ec8a58f25 100644 --- a/test_regress/t/t_class_param_nested_bad.out +++ b/test_regress/t/t_class_param_nested_bad.out @@ -4,8 +4,8 @@ 51 | Wrap2 #(Wrap#(19)::PBASE * 2) w38; | ^~~~~ ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest -%Error: Internal Error: t/t_class_param_nested_bad.v:51:29: ../V3Width.cpp:#: Node has no type +%Error: Internal Error: t/t_class_param_nested_bad.v:51:23: ../V3Width.cpp:#: Node has no type : ... note: In instance 't' 51 | Wrap2 #(Wrap#(19)::PBASE * 2) w38; - | ^ + | ^~~~~ ... This fatal error may be caused by the earlier error(s); resolve those first. diff --git a/test_regress/t/t_dynarray_bits.out b/test_regress/t/t_dynarray_bits.out index f77395fad..d01da57a9 100644 --- a/test_regress/t/t_dynarray_bits.out +++ b/test_regress/t/t_dynarray_bits.out @@ -3,8 +3,8 @@ 12 | if ($bits(a) != 0) $stop; | ^~~~~ ... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest -%Error: Internal Error: t/t_dynarray_bits.v:12:20: ../V3Width.cpp:#: Node has no type +%Error: Internal Error: t/t_dynarray_bits.v:12:11: ../V3Width.cpp:#: Node has no type : ... note: In instance 't' 12 | if ($bits(a) != 0) $stop; - | ^~ + | ^~~~~ ... This fatal error may be caused by the earlier error(s); resolve those first. diff --git a/test_regress/t/t_stream_unpack_lhs.out b/test_regress/t/t_stream_unpack_lhs.out index 08b85723d..f6b32be22 100644 --- a/test_regress/t/t_stream_unpack_lhs.out +++ b/test_regress/t/t_stream_unpack_lhs.out @@ -15,8 +15,8 @@ : ... note: In instance 't' 117 | if (packed_siz_dout != '{8'h01, 8'h23, 8'h45, 8'h67}) $stop; | ^~ -%Error: Internal Error: t/t_stream_unpack_lhs.v:117:33: ../V3Width.cpp:#: Node has no type +%Error: Internal Error: t/t_stream_unpack_lhs.v:117:36: ../V3Width.cpp:#: Node has no type : ... note: In instance 't' 117 | if (packed_siz_dout != '{8'h01, 8'h23, 8'h45, 8'h67}) $stop; - | ^~ + | ^~ ... This fatal error may be caused by the earlier error(s); resolve those first.