diff --git a/.gitattributes b/.gitattributes index 18211c99e4..353491b95e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index 4dea2639d4..d797075b05 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -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; diff --git a/tests/webtbs/tw25361.pp b/tests/webtbs/tw25361.pp new file mode 100644 index 0000000000..02f1da0163 --- /dev/null +++ b/tests/webtbs/tw25361.pp @@ -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. +