aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-16 05:33:53 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-16 05:33:53 +0200
commitc2475bd22f647ebea751171fc6376e0b2c872fb7 (patch)
tree057c8b8c38d86dc45ab091dfe9f64c1ea63f0929
parentbb4d537126f7c14f34017231cc519d0f60d00bef (diff)
downloadghdl-c2475bd22f647ebea751171fc6376e0b2c872fb7.tar.gz
ghdl-c2475bd22f647ebea751171fc6376e0b2c872fb7.tar.bz2
ghdl-c2475bd22f647ebea751171fc6376e0b2c872fb7.zip
vhdl-sem_specs: use by_name assoc for port default association
-rw-r--r--src/vhdl/vhdl-sem_specs.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_specs.adb b/src/vhdl/vhdl-sem_specs.adb
index 810e390cc..38a808440 100644
--- a/src/vhdl/vhdl-sem_specs.adb
+++ b/src/vhdl/vhdl-sem_specs.adb
@@ -1918,14 +1918,17 @@ package body Vhdl.Sem_Specs is
Found : Natural;
Comp_Chain : Iir;
Ent_Chain : Iir;
+ Assoc_Kind : Iir_Kind;
begin
case Kind is
when Map_Generic =>
Ent_Chain := Get_Generic_Chain (Entity);
Comp_Chain := Get_Generic_Chain (Comp);
+ Assoc_Kind := Iir_Kind_Association_Element_By_Expression;
when Map_Port =>
Ent_Chain := Get_Port_Chain (Entity);
Comp_Chain := Get_Port_Chain (Comp);
+ Assoc_Kind := Iir_Kind_Association_Element_By_Name;
end case;
-- No error found yet.
@@ -1965,7 +1968,8 @@ package body Vhdl.Sem_Specs is
& " declared at %l", +Comp_El);
Report_End_Group;
end if;
- Assoc := Create_Iir (Iir_Kind_Association_Element_By_Expression);
+
+ Assoc := Create_Iir (Assoc_Kind);
Location_Copy (Assoc, Parent);
Name := Build_Simple_Name (Comp_El, Comp_El);
Set_Type (Name, Get_Type (Comp_El));