diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-03-16 06:57:24 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-03-16 06:57:24 +0100 |
commit | 278802df9706d2b8ffa6731da110cdfb9be1ce7a (patch) | |
tree | ba2b1af33e5daa9d4599d42a39cd63bb5d1eab86 /src | |
parent | acdeb6ad78f9b170c7742e8e7266c6632cc63750 (diff) | |
download | ghdl-278802df9706d2b8ffa6731da110cdfb9be1ce7a.tar.gz ghdl-278802df9706d2b8ffa6731da110cdfb9be1ce7a.tar.bz2 ghdl-278802df9706d2b8ffa6731da110cdfb9be1ce7a.zip |
Allow function declaration to be a prefix of array attribute.
Fix #320
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/sem_names.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index ca882c8db..674ffb4ec 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -982,6 +982,14 @@ package body Sem_Names is Prefix := Sem_Type_Mark (Prefix_Name); else Prefix := Finish_Sem_Name (Prefix_Name, Get_Prefix (Attr)); + -- Convert function declaration to call. + if Get_Kind (Prefix) in Iir_Kinds_Denoting_Name + and then + (Get_Kind (Get_Named_Entity (Prefix)) + = Iir_Kind_Function_Declaration) + then + Prefix := Function_Declaration_To_Call (Prefix); + end if; end if; Set_Prefix (Attr, Prefix); |