aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2013-12-29 14:42:30 +0100
committerTristan Gingold <tgingold@free.fr>2013-12-29 14:42:30 +0100
commitc3aaf322e299e5c4f9611446c5184eb9d4f6938c (patch)
treed16181c6331f67ad26790de833508d26f0afc7b5
parent2c70ace5754bc18a151e7b4d4bde7018dd64c2af (diff)
downloadghdl-c3aaf322e299e5c4f9611446c5184eb9d4f6938c.tar.gz
ghdl-c3aaf322e299e5c4f9611446c5184eb9d4f6938c.tar.bz2
ghdl-c3aaf322e299e5c4f9611446c5184eb9d4f6938c.zip
Fix two crashes (bug18810 and bug15933).
-rw-r--r--sem_decls.adb5
-rw-r--r--sem_names.adb3
2 files changed, 5 insertions, 3 deletions
diff --git a/sem_decls.adb b/sem_decls.adb
index 1209960e4..3636491f9 100644
--- a/sem_decls.adb
+++ b/sem_decls.adb
@@ -1369,7 +1369,8 @@ package body Sem_Decls is
| Iir_Kind_Architecture_Declaration
| Iir_Kind_Package_Declaration
| Iir_Kind_Package_Body
- | Iir_Kind_Block_Statement =>
+ | Iir_Kind_Block_Statement
+ | Iir_Kind_Generate_Statement =>
if not Get_Shared_Flag (Decl) then
Error_Msg_Sem
("non shared variable declaration not allowed here",
@@ -1393,7 +1394,7 @@ package body Sem_Decls is
-- in sem_protected_type_declaration.
null;
when others =>
- Error_Kind ("parse_declarative_part(2)", Parent);
+ Error_Kind ("sem_object_declaration(2)", Parent);
end case;
if Flags.Vhdl_Std >= Vhdl_00 then
diff --git a/sem_names.adb b/sem_names.adb
index c6ccf68e6..51232a05e 100644
--- a/sem_names.adb
+++ b/sem_names.adb
@@ -1642,7 +1642,8 @@ package body Sem_Names is
when Iir_Kind_Type_Declaration
| Iir_Kind_Subtype_Declaration
| Iir_Kind_Concurrent_Procedure_Call_Statement
- | Iir_Kind_Component_Instantiation_Statement =>
+ | Iir_Kind_Component_Instantiation_Statement
+ | Iir_Kind_Slice_Name =>
Error_Msg_Sem
(Disp_Node (Prefix) & " cannot be selected by name", Prefix_Loc);