aboutsummaryrefslogtreecommitdiffstats
path: root/ghw
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2021-04-23 20:59:04 +0200
committerumarcor <unai.martinezcorral@ehu.eus>2021-04-24 01:59:37 +0200
commitce49befde5e95066ee34469e043a48d94423c53b (patch)
treecaded57d16afffc86cb8f796c56939140e53707c /ghw
parent76404f71df0f7c1037b190a3cf23bad84bc4c84b (diff)
downloadghdl-ce49befde5e95066ee34469e043a48d94423c53b.tar.gz
ghdl-ce49befde5e95066ee34469e043a48d94423c53b.tar.bz2
ghdl-ce49befde5e95066ee34469e043a48d94423c53b.zip
GHW: handle unbounded record subtypes (#1743) Fix #1740
Diffstat (limited to 'ghw')
-rw-r--r--ghw/ghwlib.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ghw/ghwlib.c b/ghw/ghwlib.c
index 0d320ff07..cb90fbcdf 100644
--- a/ghw/ghwlib.c
+++ b/ghw/ghwlib.c
@@ -863,6 +863,19 @@ ghw_read_type (struct ghw_handler *h)
sr->nbr_scalars);
}
break;
+ case ghdl_rtik_subtype_unbounded_record:
+ {
+ struct ghw_subtype_unbounded_record *sur;
+
+ sur = malloc (sizeof (struct ghw_subtype_unbounded_record));
+ sur->kind = t;
+ sur->name = ghw_read_strid (h);
+ sur->base = (struct ghw_type_record *) ghw_read_typeid (h);
+ h->types[i] = (union ghw_type *) sur;
+ if (h->flag_verbose > 1)
+ printf ("subtype unbounded record: %s\n", sur->name);
+ }
+ break;
default:
fprintf (stderr, "ghw_read_type: unknown type %d\n", t);
return -1;
@@ -2092,6 +2105,7 @@ ghw_disp_subtype_definition (struct ghw_handler *h, union ghw_type *t)
ghw_disp_record_subtype_bounds (sr);
} break;
case ghdl_rtik_subtype_unbounded_array:
+ case ghdl_rtik_subtype_unbounded_record:
{
struct ghw_subtype_unbounded_record *sur = &t->sur;
@@ -2203,6 +2217,7 @@ ghw_disp_type (struct ghw_handler *h, union ghw_type *t)
case ghdl_rtik_subtype_scalar:
case ghdl_rtik_subtype_record:
case ghdl_rtik_subtype_unbounded_array:
+ case ghdl_rtik_subtype_unbounded_record:
{
struct ghw_type_common *c = &t->common;
printf ("subtype %s is ", c->name);