aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-sem_decls.adb3
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb
index 19fd36b75..f79f0def0 100644
--- a/src/vhdl/vhdl-sem_decls.adb
+++ b/src/vhdl/vhdl-sem_decls.adb
@@ -2528,7 +2528,8 @@ package body Vhdl.Sem_Decls is
"%n is never referenced", +El);
end if;
when Iir_Kind_Signal_Declaration
- | Iir_Kind_Variable_Declaration =>
+ | Iir_Kind_Variable_Declaration
+ | Iir_Kind_Component_Declaration =>
if not Get_Use_Flag (El) then
Warning_Msg_Sem (Warnid_Unused, +El,
"%n is never referenced", +El);
diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb
index 8c16b6cea..dff5f256b 100644
--- a/src/vhdl/vhdl-sem_stmts.adb
+++ b/src/vhdl/vhdl-sem_stmts.adb
@@ -1875,6 +1875,7 @@ package body Vhdl.Sem_Stmts is
-- Already analyzed before, while trying to separate
-- concurrent procedure calls from instantiation stmts.
pragma Assert (Get_Kind (Comp) = Iir_Kind_Component_Declaration);
+ Set_Use_Flag (Comp, True);
return Comp;
end if;
@@ -1896,6 +1897,8 @@ package body Vhdl.Sem_Stmts is
return Null_Iir;
end if;
+ Set_Use_Flag (Comp, True);
+
return Comp;
end if;
end Sem_Instantiated_Unit;