diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-09-15 08:06:13 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-09-15 08:06:13 +0200 |
commit | a7e39eb0fe99f709cb333aa3198e868faf441540 (patch) | |
tree | e14498762723a4bb016c1453eac15b8438e170fe /src/vhdl | |
parent | 655e52ad5d04e20fcbbd25e9f455a4ed3cd35f97 (diff) | |
download | ghdl-a7e39eb0fe99f709cb333aa3198e868faf441540.tar.gz ghdl-a7e39eb0fe99f709cb333aa3198e868faf441540.tar.bz2 ghdl-a7e39eb0fe99f709cb333aa3198e868faf441540.zip |
vhdl08: handle new visibility rule of generic interface list.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/sem_decls.adb | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb index 74cbbbfeb..659c460fd 100644 --- a/src/vhdl/sem_decls.adb +++ b/src/vhdl/sem_decls.adb @@ -434,6 +434,10 @@ package body Sem_Decls is procedure Sem_Interface_Chain (Interface_Chain: Iir; Interface_Kind : Interface_Kind_Type) is + Immediately_Visible : constant Boolean := + Interface_Kind = Generic_Interface_List + and then Flags.Vhdl_Std >= Vhdl_08; + Inter : Iir; -- LAST is the last interface declaration that has a type. This is @@ -454,6 +458,15 @@ package body Sem_Decls is when Iir_Kind_Interface_Type_Declaration => Sem_Interface_Type_Declaration (Inter); end case; + + -- LRM08 6.5.6 Interface lists + -- A name that denotes an interface declaration in a generic + -- interface list may appear in an interface declaration within the + -- interface list containing the denoted interface declaration. + if Immediately_Visible then + Name_Visible (Inter); + end if; + Inter := Get_Chain (Inter); end loop; @@ -468,11 +481,13 @@ package body Sem_Decls is -- GHDL: this is achieved by making the interface object visible after -- having analyzed the interface list. - Inter := Interface_Chain; - while Inter /= Null_Iir loop - Name_Visible (Inter); - Inter := Get_Chain (Inter); - end loop; + if not Immediately_Visible then + Inter := Interface_Chain; + while Inter /= Null_Iir loop + Name_Visible (Inter); + Inter := Get_Chain (Inter); + end loop; + end if; end Sem_Interface_Chain; -- LRM93 7.2.2 |