* fixed source type information for values loaded in arrayconstructor after

r21069

git-svn-id: trunk@21350 -
This commit is contained in:
Jonas Maebe 2012-05-20 20:34:14 +00:00
parent 21573f50c5
commit 78bb3e323a
3 changed files with 27 additions and 1 deletions

1
.gitattributes vendored
View File

@ -9571,6 +9571,7 @@ tests/tbs/tb0577a.pp svneol=native#text/plain
tests/tbs/tb0578.pp svneol=native#text/pascal
tests/tbs/tb0579.pp svneol=native#text/pascal
tests/tbs/tb0580.pp svneol=native#text/pascal
tests/tbs/tb0581.pp svneol=native#text/plain
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/ub0060.pp svneol=native#text/plain
tests/tbs/ub0069.pp svneol=native#text/plain

View File

@ -1239,7 +1239,7 @@ implementation
end
else
{ todo: proper type information for hlcg }
hlcg.a_load_loc_ref(current_asmdata.CurrAsmList,voidpointertype,voidpointertype,hp.left.location,href);
hlcg.a_load_loc_ref(current_asmdata.CurrAsmList,hp.left.resultdef,voidpointertype,hp.left.location,href);
{ update href to the vtype field and write it }
dec(href.offset,sizeof(pint));
cg.a_load_const_ref(current_asmdata.CurrAsmList, OS_INT,vtype,href);

25
tests/tbs/tb0581.pp Normal file
View File

@ -0,0 +1,25 @@
{$mode objfpc}
procedure dirtystack;
var
s: shortstring;
begin
fillchar(s,sizeof(s),255);
end;
procedure test(const arr: array of const);
begin
if arr[0].vinteger<>ord('$') then
halt(1);
end;
procedure doit;
begin
test(['$']);
end;
begin
dirtystack;
doit;
end.