aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-08 16:36:57 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-09 06:40:20 +0100
commit5820aafb2a15383383a3b6cb124b193065dd5de6 (patch)
tree1c8e0a7bebadd37fc4b9277d190ad940ff0d382a
parentdfbc41e9850441a26a678c400d1e2e19491a68e6 (diff)
downloadghdl-5820aafb2a15383383a3b6cb124b193065dd5de6.tar.gz
ghdl-5820aafb2a15383383a3b6cb124b193065dd5de6.tar.bz2
ghdl-5820aafb2a15383383a3b6cb124b193065dd5de6.zip
synth: improve support of subtype attribute
-rw-r--r--src/synth/elab-vhdl_types.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/synth/elab-vhdl_types.adb b/src/synth/elab-vhdl_types.adb
index a7657ceac..c448672ce 100644
--- a/src/synth/elab-vhdl_types.adb
+++ b/src/synth/elab-vhdl_types.adb
@@ -779,13 +779,13 @@ package body Elab.Vhdl_Types is
when Iir_Kind_Subtype_Attribute =>
declare
Pfx : constant Node := Get_Prefix (Atype);
- Vt : Valtyp;
+ T : Type_Acc;
begin
Mark_Expr_Pool (Marker);
- Vt := Synth_Name (Syn_Inst, Pfx);
+ T := Exec_Name_Subtype (Syn_Inst, Pfx);
Release_Expr_Pool (Marker);
- pragma Assert (Vt.Typ.Is_Global);
- return Vt.Typ;
+ pragma Assert (T.Is_Global);
+ return T;
end;
when others =>
Error_Kind ("elab_declaration_type", Atype);