* arm: Include pi_needs_got to current_procinfo.flags when the GOT register is accessed. It forces proper initialization of the GOT register at the beginning of a procedure. This fixes storing of a double constant to a field in a packed record and other rare copy operations when PIC is enabled.

git-svn-id: trunk@41405 -
This commit is contained in:
yury 2019-02-20 20:06:32 +00:00
parent 3e8c7f66b7
commit 3a43ffd57b

View File

@ -2486,6 +2486,11 @@ unit cgcpu;
(tf_pic_uses_got in target_info.flags) and
assigned(ref.symbol) then
begin
{$ifdef EXTDEBUG}
if not (pi_needs_got in current_procinfo.flags) then
Comment(V_warning,'pi_needs_got not included');
{$endif EXTDEBUG}
Include(current_procinfo.flags,pi_needs_got);
reference_reset(tmpref,4,[]);
tmpref.base:=current_procinfo.got;
tmpref.index:=tmpreg;