diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-11-28 20:12:37 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-11-28 20:12:37 +0100 |
commit | 1b6ba4e94ce97cd1be347bfcb32508da535d7c64 (patch) | |
tree | bfc900c39e8df4031747067e07efa8d4693fc07c | |
parent | 0c0a05aecfab3ef42592166881cb5a253ea14709 (diff) | |
download | ghdl-1b6ba4e94ce97cd1be347bfcb32508da535d7c64.tar.gz ghdl-1b6ba4e94ce97cd1be347bfcb32508da535d7c64.tar.bz2 ghdl-1b6ba4e94ce97cd1be347bfcb32508da535d7c64.zip |
parser: strenghten.
-rw-r--r-- | src/vhdl/parse.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb index 77fd71604..a6b3bc88d 100644 --- a/src/vhdl/parse.adb +++ b/src/vhdl/parse.adb @@ -356,8 +356,12 @@ package body Parse is Def : Iir; begin Def := Create_Iir (Iir_Kind_Subtype_Definition); - Location_Copy (Def, Type_Mark); - Set_Subtype_Type_Mark (Def, Type_Mark); + if Type_Mark /= Null_Iir then + Location_Copy (Def, Type_Mark); + Set_Subtype_Type_Mark (Def, Type_Mark); + else + Set_Location (Def); + end if; Set_Range_Constraint (Def, Parse_Range_Constraint); Set_Resolution_Indication (Def, Resolution_Indication); Set_Tolerance (Def, Parse_Tolerance_Aspect_Opt); |