aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_stmts.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-09-30 21:58:53 +0200
committerTristan Gingold <tgingold@free.fr>2021-09-30 21:58:53 +0200
commitb354560f68b56701874d16a9d1c5ee69394a59ac (patch)
tree3d4fb26f2d49b75f4327e21ffff6bd2f6d687c21 /src/vhdl/vhdl-sem_stmts.adb
parentc26973e620349e8ceb87b22c89c92ae82b8a75f9 (diff)
downloadghdl-b354560f68b56701874d16a9d1c5ee69394a59ac.tar.gz
ghdl-b354560f68b56701874d16a9d1c5ee69394a59ac.tar.bz2
ghdl-b354560f68b56701874d16a9d1c5ee69394a59ac.zip
vhdl: warns on unused component declarations
Diffstat (limited to 'src/vhdl/vhdl-sem_stmts.adb')
-rw-r--r--src/vhdl/vhdl-sem_stmts.adb3
1 files changed, 3 insertions, 0 deletions
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;