aboutsummaryrefslogtreecommitdiffstats
path: root/evaluation.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2013-12-24 07:57:55 +0100
committerTristan Gingold <tgingold@free.fr>2013-12-24 07:57:55 +0100
commitb129f499996d6d4f45ff468c114c3bb362ac021b (patch)
tree8d30bd40e034baa3cfbdfc9c1c378b990244fc03 /evaluation.adb
parente3cad42f2f816ed62c2a9d19f661e14a50672cb5 (diff)
downloadghdl-b129f499996d6d4f45ff468c114c3bb362ac021b.tar.gz
ghdl-b129f499996d6d4f45ff468c114c3bb362ac021b.tar.bz2
ghdl-b129f499996d6d4f45ff468c114c3bb362ac021b.zip
Fix mcode for i386 Darwin.
Diffstat (limited to 'evaluation.adb')
-rw-r--r--evaluation.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/evaluation.adb b/evaluation.adb
index f5b8870b7..5e47e8664 100644
--- a/evaluation.adb
+++ b/evaluation.adb
@@ -1188,7 +1188,7 @@ package body Evaluation is
return Null_Iir;
end Eval_Dyadic_Operator;
- -- Evaluate any array attribute
+ -- Evaluate any array attribute, return the type for the prefix.
function Eval_Array_Attribute (Attr : Iir) return Iir
is
Prefix : Iir;
@@ -2461,6 +2461,9 @@ package body Evaluation is
-- This linear search is O(n)!
S := Find_Name_In_List (Literal_List,
Name_Table.Get_Identifier (C));
+ if S = Null_Iir then
+ return -1;
+ end if;
when Iir_Kind_Bit_String_Literal =>
C := Str.Ptr (Idx + 1);
case C is