aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_specs.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/sem_specs.adb')
-rw-r--r--src/vhdl/sem_specs.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb
index 8d0eb03a8..8c9cd2391 100644
--- a/src/vhdl/sem_specs.adb
+++ b/src/vhdl/sem_specs.adb
@@ -379,14 +379,23 @@ package body Sem_Specs is
-- Note: ENT and DECL are different for aliases.
function Sem_Named_Entity1 (Ent : Iir; Decl : Iir) return Boolean
is
+ use Tokens;
Ent_Id : constant Name_Id := Get_Identifier (Ent);
begin
if (not Is_Designator or else Ent_Id = Get_Identifier (Name))
and then Ent_Id /= Null_Identifier
then
if Is_Designator then
+ -- The designator is neither ALL nor OTHERS.
Set_Named_Entity (Name, Ent);
Xref_Ref (Name, Ent);
+
+ if Get_Entity_Class (Attr) = Tok_Label then
+ -- Concurrent or sequential statements appear later in the
+ -- AST, but their label are considered to appear before
+ -- other items in the declarative part.
+ Set_Is_Forward_Ref (Name, True);
+ end if;
end if;
if Get_Visible_Flag (Ent) = False then
Error_Msg_Sem (+Attr, "%n is not yet visible", +Ent);