From 98148ccf5ad3b7686b824991a9dd0884f7753277 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 9 May 2015 22:00:52 +0200 Subject: Report incorrect use of 'Base. --- src/vhdl/sem_decls.adb | 3 +++ src/vhdl/sem_names.adb | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/vhdl/sem_decls.adb b/src/vhdl/sem_decls.adb index 1332ff9..a1b39c3 100644 --- a/src/vhdl/sem_decls.adb +++ b/src/vhdl/sem_decls.adb @@ -2364,6 +2364,9 @@ package body Sem_Decls is null; when Iir_Kind_Terminal_Declaration => null; + when Iir_Kind_Base_Attribute => + Error_Msg_Sem ("base attribute not allowed in alias", Alias); + return; when others => Error_Kind ("sem_non_object_alias_declaration", N_Entity); end case; diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index 87f9402..ad1b17d 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -3692,8 +3692,10 @@ package body Sem_Names is | Iir_Kind_Implicit_Dereference | Iir_Kind_Dereference | Iir_Kind_Attribute_Value - | Iir_Kind_Function_Call - | Iir_Kinds_Attribute => + | Iir_Kind_Function_Call => + return True; + when Iir_Kinds_Expression_Attribute => + -- All expression attributes are a name. return True; when Iir_Kind_Simple_Name | Iir_Kind_Selected_Name => -- cgit