diff options
| author | Tristan Gingold <tgingold@free.fr> | 2022-09-25 06:53:12 +0200 | 
|---|---|---|
| committer | Tristan Gingold <tgingold@free.fr> | 2022-09-25 11:43:31 +0200 | 
| commit | 0a33c7864ef98e93f316036314f7a081190f4352 (patch) | |
| tree | 35d8cd9b7d9e5866a49f421ccf5be01bf653aba1 /src | |
| parent | 00e3aafd8df24a670e583e3429b6fdeb509735a4 (diff) | |
| download | ghdl-0a33c7864ef98e93f316036314f7a081190f4352.tar.gz ghdl-0a33c7864ef98e93f316036314f7a081190f4352.tar.bz2 ghdl-0a33c7864ef98e93f316036314f7a081190f4352.zip | |
vhdl-sem_decls: handle protected type subtypes
Fix #2196
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/vhdl-sem_decls.adb | 5 | 
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); | 
