aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-12-08 06:23:21 +0100
committerTristan Gingold <tgingold@free.fr>2020-12-08 19:32:22 +0100
commit07a7f419eea89b3ab901642291650f49dfb24a36 (patch)
tree9b822b1730535ebcc5b5e26492aa4d86e0b4ab1d /src/vhdl/vhdl-sem.adb
parentebba3c77dc798f2e20ad6ba8a560a569faf1526b (diff)
downloadghdl-07a7f419eea89b3ab901642291650f49dfb24a36.tar.gz
ghdl-07a7f419eea89b3ab901642291650f49dfb24a36.tar.bz2
ghdl-07a7f419eea89b3ab901642291650f49dfb24a36.zip
vhdl: handle locally static attributes on entity/architecture/configurations
Attributes of entity/architecture/configurations are expected to be locally static so that they can be referenced from outside (so on the non-instantiated entity). But many designs break this assumption. In relaxed mode, non-locally static attributes are allowed but now cannot be referenced outside the entity. Locally static attributes can be referenced from outside. Fix #1528
Diffstat (limited to 'src/vhdl/vhdl-sem.adb')
-rw-r--r--src/vhdl/vhdl-sem.adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb
index f0934de0b..595f5d494 100644
--- a/src/vhdl/vhdl-sem.adb
+++ b/src/vhdl/vhdl-sem.adb
@@ -720,6 +720,7 @@ package body Vhdl.Sem is
Entity_Unit : Iir_Design_Unit;
begin
Xref_Decl (Decl);
+ Set_Is_Within_Flag (Decl, True);
-- LRM 1.3
-- The entity name identifies the name of the entity declaration that
@@ -758,6 +759,7 @@ package body Vhdl.Sem is
Sem_Block_Configuration (Get_Block_Configuration (Decl), Decl);
Close_Declarative_Region;
+ Set_Is_Within_Flag (Decl, False);
end Sem_Configuration_Declaration;
-- Analyze the block specification of a block statement or of a generate