aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-18 17:40:57 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-18 17:40:57 +0200
commit0f5343eaf219d8901375c1b92e9bdd35bb12947e (patch)
tree70b4d62007c1b685d87b09681829df8e75d87195 /src
parentfcbe1aea8d144a2595ee02e387866c9e4d12bdde (diff)
downloadghdl-0f5343eaf219d8901375c1b92e9bdd35bb12947e.tar.gz
ghdl-0f5343eaf219d8901375c1b92e9bdd35bb12947e.tar.bz2
ghdl-0f5343eaf219d8901375c1b92e9bdd35bb12947e.zip
synth-expr: synth_subtype_conversion: add more assertions.
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-expr.adb13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 953c6e0e9..a4dd36ea7 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -822,6 +822,7 @@ package body Synth.Expr is
or else Vtype.Kind = Type_Slice);
return Vt;
when Type_Record =>
+ pragma Assert (Vtype.Kind = Type_Record);
-- TODO: handle elements.
return Vt;
when Type_Unbounded_Record =>
@@ -829,12 +830,12 @@ package body Synth.Expr is
return Vt;
when Type_Access =>
return Vt;
- when Type_File =>
- pragma Assert (Vtype = Dtype);
- return Vt;
- when Type_Protected =>
- pragma Assert (Vtype = Dtype);
- return Vt;
+ when Type_File
+ | Type_Protected =>
+ -- No conversion expected.
+ -- As the subtype is identical, it is already handled by the
+ -- above check.
+ raise Internal_Error;
end case;
end Synth_Subtype_Conversion;