From a05da1ca082dfca031232ddb845be0b917171ed6 Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 30 Jun 2025 16:24:23 -0700 Subject: [PATCH] Only synth when the R-value is valid --- elaborate.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elaborate.cc b/elaborate.cc index 321375ffc..ed682b22d 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2024 Stephen Williams (steve@icarus.com) + * Copyright (c) 1998-2025 Stephen Williams (steve@icarus.com) * Copyright CERN 2013 / Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it @@ -265,6 +265,7 @@ NetNet *elaborate_unpacked_array(Design *des, NetScope *scope, const LineInfo &l return nullptr; } else if (dynamic_cast (expr)) { auto net_expr = elaborate_rval_expr(des, scope, lval->array_type(), expr); + if (! net_expr) return nullptr; expr_net = net_expr->synthesize(des, scope, net_expr); } else { cout << loc.get_fileline() << ": error: Can not assign"