* fixed wrong class cast in case arrays/records are passed to a_loadfpu*()

(fixes tests/webtbs/tw26993.pp for llvm)

git-svn-id: trunk@34280 -
This commit is contained in:
Jonas Maebe 2016-08-12 13:35:31 +00:00
parent 4e8bda76cb
commit f4015f6ac9

View File

@ -1157,8 +1157,12 @@ implementation
(since that's their storage size and internally they also are int64). (since that's their storage size and internally they also are int64).
Solve this by changing the type to s80real once they are loaded into Solve this by changing the type to s80real once they are loaded into
a register. } a register. }
fromcompcurr:=tfloatdef(fromsize).floattype in [s64comp,s64currency]; fromcompcurr:=
tocompcurr:=tfloatdef(tosize).floattype in [s64comp,s64currency]; (fromsize.typ=floatdef) and
(tfloatdef(fromsize).floattype in [s64comp,s64currency]);
tocompcurr:=
(tosize.typ=floatdef) and
(tfloatdef(tosize).floattype in [s64comp,s64currency]);
if tocompcurr then if tocompcurr then
tosize:=s80floattype; tosize:=s80floattype;
{ don't generate different code for loading e.g. extended into cextended, { don't generate different code for loading e.g. extended into cextended,
@ -1194,8 +1198,12 @@ implementation
tocompcurr: boolean; tocompcurr: boolean;
begin begin
{ see comment in a_loadfpu_ref_reg } { see comment in a_loadfpu_ref_reg }
fromcompcurr:=tfloatdef(fromsize).floattype in [s64comp,s64currency]; fromcompcurr:=
tocompcurr:=tfloatdef(tosize).floattype in [s64comp,s64currency]; (fromsize.typ=floatdef) and
(tfloatdef(fromsize).floattype in [s64comp,s64currency]);
tocompcurr:=
(tosize.typ=floatdef) and
(tfloatdef(tosize).floattype in [s64comp,s64currency]);
if fromcompcurr then if fromcompcurr then
fromsize:=s80floattype; fromsize:=s80floattype;
href:=make_simple_ref(list,ref,tosize); href:=make_simple_ref(list,ref,tosize);