* fixed LLVM vecn typed constant evaluation if the lower bound is <> 0

git-svn-id: trunk@33959 -
This commit is contained in:
Jonas Maebe 2016-06-12 09:21:00 +00:00
parent b8ed0fac5d
commit 22c31ca004

View File

@ -583,10 +583,14 @@ implementation
ai: taillvm;
aityped: tai;
eledef: tdef;
vecindex: asizeint;
begin
{ update range checking info }
inherited;
ai:=taillvm.getelementptr_reg_tai_size_const(NR_NO,nil,ptrsinttype,index.svalue,true);
vecindex:=index.svalue;
if def.typ=arraydef then
dec(vecindex,tarraydef(def).lowrange);
ai:=taillvm.getelementptr_reg_tai_size_const(NR_NO,nil,ptrsinttype,vecindex,true);
case def.typ of
arraydef:
eledef:=tarraydef(def).elementdef;