aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_decls.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-10-05 03:30:32 +0200
committerTristan Gingold <tgingold@free.fr>2016-10-05 03:58:24 +0200
commit937c3e565b1f249bf86805c8cb6d8ff93fa8d4b8 (patch)
tree6ae41efb2838e0c4d8054317aa7fc6d97ae177b4 /src/vhdl/sem_decls.adb
parent05bdcc96e259b338328812f4b3c4fb68f3c13f3c (diff)
downloadghdl-937c3e565b1f249bf86805c8cb6d8ff93fa8d4b8.tar.gz
ghdl-937c3e565b1f249bf86805c8cb6d8ff93fa8d4b8.tar.bz2
ghdl-937c3e565b1f249bf86805c8cb6d8ff93fa8d4b8.zip
iirs: subtype indication is never a ref.
Diffstat (limited to 'src/vhdl/sem_decls.adb')
-rw-r--r--src/vhdl/sem_decls.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb
index 7d83c2e13..517d69c6c 100644
--- a/src/vhdl/sem_decls.adb
+++ b/src/vhdl/sem_decls.adb
@@ -128,7 +128,6 @@ package body Sem_Decls is
A_Type := Get_Subtype_Indication (Inter);
if A_Type = Null_Iir then
pragma Assert (Last /= Null_Iir);
- Set_Subtype_Indication (Inter, Get_Subtype_Indication (Last));
A_Type := Get_Type (Last);
Default_Value := Get_Default_Value (Last);
else
@@ -1741,6 +1740,9 @@ package body Sem_Decls is
end if;
else
Default_Value := Get_Default_Value (Last_Decl);
+ if Is_Valid (Default_Value) then
+ Set_Is_Ref (Decl, True);
+ end if;
Atype := Get_Type (Last_Decl);
end if;