mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 02:59:13 +02:00
* never use the target_specific_explicit_typeconv() code for non-tc_equal
type conversions (those are/can be intercepted in the specific handlers) git-svn-id: branches/jvmbackend@18623 -
This commit is contained in:
parent
325b5cae6b
commit
6f2b7ca830
@ -664,6 +664,11 @@ implementation
|
|||||||
toarrtype: char;
|
toarrtype: char;
|
||||||
begin
|
begin
|
||||||
resnode:=nil;
|
resnode:=nil;
|
||||||
|
if convtype<>tc_equal then
|
||||||
|
begin
|
||||||
|
result:=false;
|
||||||
|
exit
|
||||||
|
end;
|
||||||
{ This routine is only called for explicit typeconversions of same-sized
|
{ This routine is only called for explicit typeconversions of same-sized
|
||||||
entities that aren't handled by normal type conversions -> bit pattern
|
entities that aren't handled by normal type conversions -> bit pattern
|
||||||
reinterpretations. In the JVM, many of these also need special
|
reinterpretations. In the JVM, many of these also need special
|
||||||
@ -757,8 +762,7 @@ implementation
|
|||||||
except for a few special cases }
|
except for a few special cases }
|
||||||
|
|
||||||
{ float to int/enum explicit type conversion: get the bits }
|
{ float to int/enum explicit type conversion: get the bits }
|
||||||
if (convtype<>tc_int_2_real) and
|
if (left.resultdef.typ=floatdef) and
|
||||||
(left.resultdef.typ=floatdef) and
|
|
||||||
(is_integer(resultdef) or
|
(is_integer(resultdef) or
|
||||||
(resultdef.typ=enumdef)) then
|
(resultdef.typ=enumdef)) then
|
||||||
begin
|
begin
|
||||||
@ -772,16 +776,13 @@ implementation
|
|||||||
(left.resultdef.typ=enumdef)) and
|
(left.resultdef.typ=enumdef)) and
|
||||||
(resultdef.typ=floatdef) then
|
(resultdef.typ=floatdef) then
|
||||||
begin
|
begin
|
||||||
if (convtype<>tc_int_2_real) then
|
if not check_only then
|
||||||
begin
|
begin
|
||||||
if (left.resultdef.typ=enumdef) then
|
if (left.resultdef.typ=enumdef) then
|
||||||
inserttypeconv_explicit(left,s32inttype);
|
inserttypeconv_explicit(left,s32inttype);
|
||||||
if not check_only then
|
resnode:=int_real_explicit_typecast(tfloatdef(resultdef),'INTBITSTOFLOAT','LONGBITSTODOUBLE');
|
||||||
resnode:=int_real_explicit_typecast(tfloatdef(resultdef),'INTBITSTOFLOAT','LONGBITSTODOUBLE');
|
end;
|
||||||
result:=true;
|
result:=true;
|
||||||
end
|
|
||||||
else
|
|
||||||
result:=false;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user