aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-08-30 03:22:40 +0200
committerTristan Gingold <tgingold@free.fr>2019-08-30 03:22:40 +0200
commitcb3588fbe3918342e0f84445136d5612566ce70c (patch)
tree5aa0c84719bb6b2f537fc5b81a52e534ac14250c
parent5d797c187b2d3b17253a002fdad1557951aa4e85 (diff)
downloadghdl-cb3588fbe3918342e0f84445136d5612566ce70c.tar.gz
ghdl-cb3588fbe3918342e0f84445136d5612566ce70c.tar.bz2
ghdl-cb3588fbe3918342e0f84445136d5612566ce70c.zip
synth: handle enumeration subtype in ranges.
-rw-r--r--src/synth/synth-expr.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 0badb844b..5c6f957c7 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -588,7 +588,8 @@ package body Synth.Expr is
case Get_Kind (Bound) is
when Iir_Kind_Range_Expression =>
return Synth_Discrete_Range_Expression (Syn_Inst, Bound);
- when Iir_Kind_Integer_Subtype_Definition =>
+ when Iir_Kind_Integer_Subtype_Definition
+ | Iir_Kind_Enumeration_Subtype_Definition =>
if Get_Type_Declarator (Bound) /= Null_Node then
-- This is a named subtype, so it has been evaluated.
return Get_Value_Type (Syn_Inst, Bound).Drange;