aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/sem_types.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-12-05 20:53:20 +0100
committerTristan Gingold <tgingold@free.fr>2018-12-05 20:53:20 +0100
commit8d517a183b1081c8abfa3e25f88c39bd4f5a173f (patch)
treea188bf506ec19cf2b9d6674f24fcab33f1ec9e50 /src/vhdl/sem_types.adb
parent962db30624215804452afa70ce2d1d32e497cc02 (diff)
downloadghdl-8d517a183b1081c8abfa3e25f88c39bd4f5a173f.tar.gz
ghdl-8d517a183b1081c8abfa3e25f88c39bd4f5a173f.tar.bz2
ghdl-8d517a183b1081c8abfa3e25f88c39bd4f5a173f.zip
sem_expr: add constraints to record aggregates.
Fix #646
Diffstat (limited to 'src/vhdl/sem_types.adb')
-rw-r--r--src/vhdl/sem_types.adb15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb
index a38ae68a2..1018e8a8d 100644
--- a/src/vhdl/sem_types.adb
+++ b/src/vhdl/sem_types.adb
@@ -727,18 +727,18 @@ package body Sem_Types is
-- Return the constraint state from CONST (the initial state) and EL_TYPE,
-- as if ATYPE was a new element of a record.
- function Update_Record_Constraint (Const : Iir_Constraint; El_Type : Iir)
- return Iir_Constraint is
+ function Update_Record_Constraint
+ (Constraint : Iir_Constraint; El_Type : Iir) return Iir_Constraint is
begin
if Get_Kind (El_Type) not in Iir_Kinds_Composite_Type_Definition then
- return Const;
+ return Constraint;
end if;
- case Const is
+ case Constraint is
when Fully_Constrained
| Unconstrained =>
- if Get_Constraint_State (El_Type) = Const then
- return Const;
+ if Get_Constraint_State (El_Type) = Constraint then
+ return Constraint;
else
return Partially_Constrained;
end if;
@@ -1392,8 +1392,7 @@ package body Sem_Types is
-- Analyze the constraint DEF + RESOLUTION for type TYPE_MARK. The
-- result is always a subtype definition.
function Sem_Subtype_Constraint
- (Def : Iir; Type_Mark : Iir; Resolution : Iir)
- return Iir;
+ (Def : Iir; Type_Mark : Iir; Resolution : Iir) return Iir;
function Copy_Record_Element_Declaration (El : Iir; Parent : Iir) return Iir
is