aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-12-28 16:38:39 +0100
committerTristan Gingold <tgingold@free.fr>2021-12-28 19:03:35 +0100
commit32845f733d21d7330f095df1209ea829148867d6 (patch)
tree12965ad8c507903f8bd27f33d1f02c3f6ee3b504 /src/vhdl
parentc2ab0b7be948f9dc16da8185232fcb621f075b9f (diff)
downloadghdl-32845f733d21d7330f095df1209ea829148867d6.tar.gz
ghdl-32845f733d21d7330f095df1209ea829148867d6.tar.bz2
ghdl-32845f733d21d7330f095df1209ea829148867d6.zip
vhdl-sem_decls: copy subtype indication also for files. Fix #1936
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-sem_decls.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb
index 9d7f3b20d..a78f482c1 100644
--- a/src/vhdl/vhdl-sem_decls.adb
+++ b/src/vhdl/vhdl-sem_decls.adb
@@ -1167,6 +1167,9 @@ package body Vhdl.Sem_Decls is
Atype := Create_Error_Type (Get_Type (Decl));
end if;
else
+ Set_Is_Ref (Decl, True);
+ Atype := Get_Subtype_Indication (Last_Decl);
+ Set_Subtype_Indication (Decl, Atype);
Atype := Get_Type (Last_Decl);
end if;
Set_Type (Decl, Atype);