mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 04:49:07 +02:00
* don't internalerror when typecasting voidpointer^ or formaldef
git-svn-id: branches/hlcgllvm@28208 -
This commit is contained in:
parent
27e350fa9a
commit
9fada1a238
@ -60,7 +60,7 @@ uses
|
||||
globtype,verbose,
|
||||
aasmdata,
|
||||
llvmbase,aasmllvm,
|
||||
symdef,defutil,
|
||||
symconst,symdef,defutil,
|
||||
cgbase,cgutils,hlcgobj;
|
||||
|
||||
{ tllvmtypeconvnode }
|
||||
@ -129,7 +129,10 @@ procedure tllvmtypeconvnode.second_nothing;
|
||||
begin
|
||||
if left.resultdef<>resultdef then
|
||||
begin
|
||||
if left.resultdef.size<>resultdef.size then
|
||||
{ handle sometype(voidptr^) }
|
||||
if not is_void(left.resultdef) and
|
||||
(left.resultdef.typ<>formaldef) and
|
||||
(left.resultdef.size<>resultdef.size) then
|
||||
internalerror(2014012216);
|
||||
hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef);
|
||||
hreg:=hlcg.getaddressregister(current_asmdata.CurrAsmList,getpointerdef(resultdef));
|
||||
|
Loading…
Reference in New Issue
Block a user