* fixed LLVM type checking of typed files in ISO mode (fixes webtbs/tw34848)

git-svn-id: branches/debug_eh@42205 -
This commit is contained in:
Jonas Maebe 2019-06-10 13:36:57 +00:00
parent 9a327f1fcd
commit f1b66a9741

View File

@ -86,7 +86,16 @@ class function tllvmtypeconvnode.target_specific_need_equal_typeconv(fromdef, to
(todef.typ=procvardef)) or
{ same for two different specialisations }
((df_specialization in fromdef.defoptions) and
(df_specialization in todef.defoptions))
(df_specialization in todef.defoptions)) or
{ typed from/to untyped filedef in ISO mode: have to keep because of
the get/put buffer }
((fromdef.typ=filedef) and
(tfiledef(fromdef).filetyp=ft_typed) and
(todef.typ=filedef) and
(tfiledef(todef).filetyp=ft_typed) and
(not equal_defs(tfiledef(fromdef).typedfiledef, tfiledef(todef).typedfiledef) or
target_specific_need_equal_typeconv(tfiledef(fromdef).typedfiledef, tfiledef(todef).typedfiledef))
)
);
end;
@ -278,7 +287,8 @@ procedure tllvmtypeconvnode.second_nothing;
(left.resultdef.typ=filedef) and
(tfiledef(left.resultdef).filetyp=ft_typed) and
(resultdef.typ=filedef) and
(tfiledef(resultdef).filetyp=ft_untyped)
(tfiledef(resultdef).filetyp in [ft_untyped,ft_typed]) and
(resultdef.size<left.resultdef.size)
) and
{ anything else with different size that ends up here is an error }
(left.resultdef.size<>resultdef.size) then