aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/vhdl-utils.adb15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb
index 578576e1e..46c9bcd72 100644
--- a/src/vhdl/vhdl-utils.adb
+++ b/src/vhdl/vhdl-utils.adb
@@ -1088,11 +1088,16 @@ package body Vhdl.Utils is
| Iir_Kind_Interface_Variable_Declaration
| Iir_Kind_Interface_Signal_Declaration
| Iir_Kind_Object_Alias_Declaration =>
- if (Get_Kind (Get_Subtype_Indication (Base))
- = Iir_Kind_Subtype_Attribute)
- then
- return True;
- end if;
+ declare
+ Ind : constant Iir := Get_Subtype_Indication (Base);
+ begin
+ -- Note: an object alias may not have subtype indication.
+ if Ind /= Null_Iir
+ and then Get_Kind (Ind) = Iir_Kind_Subtype_Attribute
+ then
+ return True;
+ end if;
+ end;
when Iir_Kind_Dereference
| Iir_Kind_Implicit_Dereference =>
null;