diff options
author | Brian Drummond <brian@shapes.demon.co.uk> | 2013-12-02 17:32:20 +0000 |
---|---|---|
committer | Brian Drummond <brian@shapes.demon.co.uk> | 2013-12-02 17:32:20 +0000 |
commit | 17dd49c8643f08dff78900e9a9db56a0ade75c55 (patch) | |
tree | f39cb0111b9687452542986a07fa2780897c4727 | |
parent | 1b8811469be10b058724a83f9dad8702de47d582 (diff) | |
download | ghdl-17dd49c8643f08dff78900e9a9db56a0ade75c55.tar.gz ghdl-17dd49c8643f08dff78900e9a9db56a0ade75c55.tar.bz2 ghdl-17dd49c8643f08dff78900e9a9db56a0ade75c55.zip |
Fix for https://gna.org/bugs/?18351
-rw-r--r-- | sem_names.adb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sem_names.adb b/sem_names.adb index 9b33a5808..9f16b365f 100644 --- a/sem_names.adb +++ b/sem_names.adb @@ -2085,6 +2085,7 @@ package body Sem_Names is procedure Sem_Selected_By_All_Name (Name : Iir_Selected_By_All_Name) is Prefix : Iir; + Prefix_Name : Iir; Res : Iir; procedure Sem_As_Selected_By_All_Name (Sub_Name : Iir) @@ -2107,6 +2108,7 @@ package body Sem_Names is begin Prefix := Get_Prefix (Name); Sem_Name (Prefix, True); + Prefix_Name := Prefix; Prefix := Get_Named_Entity (Prefix); if Prefix = Null_Iir then return; @@ -2116,7 +2118,18 @@ package body Sem_Names is when Iir_Kinds_Object_Declaration | Iir_Kind_Selected_Element | Iir_Kind_Dereference - | Iir_Kind_Indexed_Name => + | Iir_Kind_Indexed_Name + -- Iir_Kind_Function_Call added to resolve testcase 2 in + -- https://gna.org/bugs/?18351 + | Iir_Kind_Function_Call => + Sem_As_Selected_By_All_Name (Prefix); + -- when clause added to resolve testcases 3-6 in + -- https://gna.org/bugs/?18351 + when Iir_Kinds_Function_Declaration => + -- or Iir_Kind_Function_Declaration to exclude implicit functions + Prefix := Sem_As_Function_Call (Name => Prefix_Name, + Spec => Prefix, + Assoc_Chain => Null_Iir); Sem_As_Selected_By_All_Name (Prefix); when Iir_Kind_Error => Set_Named_Entity (Name, Error_Mark); |