diff --git a/.gitattributes b/.gitattributes index 04ef8aa384..4277ca0e9f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13308,6 +13308,7 @@ tests/tbs/tb0671.pp svneol=native#text/pascal tests/tbs/tb0672.pp svneol=native#text/pascal tests/tbs/tb0673.pp svneol=native#text/pascal tests/tbs/tb0674.pp svneol=native#text/pascal +tests/tbs/tb0675.pp svneol=native#text/pascal tests/tbs/ub0060.pp svneol=native#text/plain tests/tbs/ub0069.pp svneol=native#text/plain tests/tbs/ub0119.pp svneol=native#text/plain diff --git a/compiler/defcmp.pas b/compiler/defcmp.pas index d48c51bb79..27dc29c45b 100644 --- a/compiler/defcmp.pas +++ b/compiler/defcmp.pas @@ -835,7 +835,14 @@ implementation { the orddef < currency (then it will get convert l3, } { and conversion to float is favoured) } doconv:=tc_int_2_real; - eq:=te_convert_l2; + if is_extended(def_to) then + eq:=te_convert_l2 + else if is_double(def_to) then + eq:=te_convert_l3 + else if is_single(def_to) then + eq:=te_convert_l4 + else + eq:=te_convert_l2; end; end; floatdef : @@ -856,7 +863,12 @@ implementation { do we lose precision? } if (def_to.size 2 then + Halt(1); +{$ifdef FPC_HAS_TYPE_EXTENDED} + if Test2(a) <> 3 then + Halt(2); +{$endif} +end.