aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_types.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-10 07:59:08 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-10 07:59:08 +0100
commit63bfd5f5f928660b20382da9f7b2d61ae7077962 (patch)
tree3ba508d11e10b6a4bb670c41d1d77c97920fc6c9 /src/vhdl/vhdl-sem_types.adb
parentd908ceeed38b7eab75cb8316c873d69ab0cbcc96 (diff)
downloadghdl-63bfd5f5f928660b20382da9f7b2d61ae7077962.tar.gz
ghdl-63bfd5f5f928660b20382da9f7b2d61ae7077962.tar.bz2
ghdl-63bfd5f5f928660b20382da9f7b2d61ae7077962.zip
vhdl-sem_types.adb(Set_Type_Has_Signal): generalize.
In case of subtype, mark the parent type. Fix #2267
Diffstat (limited to 'src/vhdl/vhdl-sem_types.adb')
-rw-r--r--src/vhdl/vhdl-sem_types.adb9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb
index dbc4230fb..a6f8e0223 100644
--- a/src/vhdl/vhdl-sem_types.adb
+++ b/src/vhdl/vhdl-sem_types.adb
@@ -90,13 +90,8 @@ package body Vhdl.Sem_Types is
| Iir_Kind_Record_Subtype_Definition =>
Set_Type_Has_Signal (Get_Base_Type (Atype));
Mark_Resolution_Function (Atype);
- declare
- Tm : constant Iir := Get_Subtype_Type_Mark (Atype);
- begin
- if Tm /= Null_Iir then
- Set_Type_Has_Signal (Get_Type (Get_Named_Entity (Tm)));
- end if;
- end;
+ -- Mark all the hierarchy.
+ Set_Type_Has_Signal (Get_Parent_Type (Atype));
when others =>
null;
end case;