diff --git a/elab_type.cc b/elab_type.cc index 4641b1507..ae9b5f39a 100644 --- a/elab_type.cc +++ b/elab_type.cc @@ -158,6 +158,18 @@ ivl_type_s* parray_type_t::elaborate_type_raw(Design*des, NetScope*scope) const if (dims.get()) evaluate_ranges(des, scope, this, packed, *dims); + if (base_type->figure_packed_base_type() == IVL_VT_NO_TYPE) { + cerr << this->get_fileline() << " error: Packed array "; + if (!name.nil()) + cerr << "`" << name << "` "; + cerr << "base-type `"; + if (base_type->name.nil()) + cerr << *base_type; + else + cerr << base_type->name; + cerr << "` is not packed." << endl; + des->errors++; + } ivl_type_t etype = base_type->elaborate_type(des, scope); return new netparray_t(packed, etype); diff --git a/pform.cc b/pform.cc index 65fe6ebcb..5aa4eb4ef 100644 --- a/pform.cc +++ b/pform.cc @@ -3549,9 +3549,6 @@ static void pform_set_integer_2atom(const struct vlltype&li, uint64_t width, boo template static void pform_set2_data_type(const struct vlltype&li, T*data_type, perm_string name, NetNet::Type net_type, list*attr) { ivl_variable_type_t base_type = data_type->figure_packed_base_type(); - if (base_type == IVL_VT_NO_TYPE) { - VLerror(li, "Compound type is not PACKED in this context."); - } PWire*net = pform_get_make_wire_in_scope(li, name, net_type, NetNet::NOT_A_PORT, base_type); assert(net);