* also don't put a value in registers if it is converted from a type that can

be held in one kind of register to a type that can be held in another kind
    of register (mantis #25361)

git-svn-id: trunk@26128 -
This commit is contained in:
Jonas Maebe 2013-11-24 12:49:23 +00:00
parent 34702dbfc5
commit 7be4e20307
3 changed files with 20 additions and 2 deletions

1
.gitattributes vendored
View File

@ -13716,6 +13716,7 @@ tests/webtbs/tw25289.pp svneol=native#text/plain
tests/webtbs/tw25318.pp svneol=native#text/pascal
tests/webtbs/tw25349.pp svneol=native#text/plain
tests/webtbs/tw2536.pp svneol=native#text/plain
tests/webtbs/tw25361.pp svneol=native#text/plain
tests/webtbs/tw2540.pp svneol=native#text/plain
tests/webtbs/tw2561.pp svneol=native#text/plain
tests/webtbs/tw2588.pp svneol=native#text/plain

View File

@ -2103,8 +2103,8 @@ implementation
if (nf_absolute in flags) then
begin
convtype:=tc_equal;
if not(tstoreddef(resultdef).is_intregable) and
not(tstoreddef(resultdef).is_fpuregable) then
if (tstoreddef(resultdef).is_intregable<>tstoreddef(left.resultdef).is_intregable) or
(tstoreddef(resultdef).is_fpuregable<>tstoreddef(left.resultdef).is_fpuregable) then
make_not_regable(left,[ra_addr_regable]);
exit;
end;

17
tests/webtbs/tw25361.pp Normal file
View File

@ -0,0 +1,17 @@
{ %norun }
type
float64=record
high,low: longint;
end;
procedure foo(x: double);
var
a: float64 absolute x;
begin
writeln(a.low);
end;
begin
end.