aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-sem_decls.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/vhdl-sem_decls.adb')
-rw-r--r--src/vhdl/vhdl-sem_decls.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb
index 55cc4b793..a9c686707 100644
--- a/src/vhdl/vhdl-sem_decls.adb
+++ b/src/vhdl/vhdl-sem_decls.adb
@@ -835,10 +835,13 @@ package body Vhdl.Sem_Decls is
return;
end if;
- if not Is_Anonymous_Type_Definition (Def) then
+ if not Is_Anonymous_Type_Definition (Def)
+ and then Get_Kind (Def) /= Iir_Kind_Protected_Type_Declaration
+ then
-- There is no added constraints and therefore the subtype
-- declaration is in fact an alias of the type. Create a copy so
-- that it has its own type declarator.
+ -- (Except for protected types).
Def := Copy_Subtype_Indication (Def);
Location_Copy (Def, Decl);
Set_Subtype_Type_Mark (Def, Ind);