mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 20:47:24 +02:00
Merge invalid typecast fix 39988
------------------------------------------------------------------------ r39988 | pierre | 2018-10-19 23:04:55 +0000 (Fri, 19 Oct 2018) | 1 line Fix wrong explicit typecast that lead to memory corruption in first_sqr_real ------------------------------------------------------------------------ --- Merging r39988 into '.': U compiler/ninl.pas --- Recording mergeinfo for merge of r39988 into '.': U . git-svn-id: branches/fixes_3_2@46238 -
This commit is contained in:
parent
ec4954111e
commit
cc46cc56e2
@ -4081,6 +4081,8 @@ implementation
|
||||
end;
|
||||
|
||||
function tinlinenode.first_sqr_real : tnode;
|
||||
var
|
||||
callnode : tcallnode;
|
||||
begin
|
||||
{$ifndef cpufpemu}
|
||||
{ this procedure might be only used for cpus definining cpufpemu else
|
||||
@ -4089,9 +4091,10 @@ implementation
|
||||
{$endif cpufpemu}
|
||||
{ create the call to the helper }
|
||||
{ on entry left node contains the parameter }
|
||||
result := ctypeconvnode.create(ccallnode.createintern('fpc_sqr_real',
|
||||
ccallparanode.create(left,nil)),resultdef);
|
||||
include(tcallnode(result).callnodeflags,cnf_check_fpu_exceptions);
|
||||
callnode:=ccallnode.createintern('fpc_sqr_real',
|
||||
ccallparanode.create(left,nil));
|
||||
result := ctypeconvnode.create(callnode,resultdef);
|
||||
include(callnode.callnodeflags,cnf_check_fpu_exceptions);
|
||||
left := nil;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user