mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 14:27:11 +01:00
- disable inlining of routines that contain a call to a C-style varargs
function, as we don't save/restore the synthetic paravarsyms that
are created for this
git-svn-id: trunk@29584 -
This commit is contained in:
parent
fde6448063
commit
eb419b58c5
@ -617,7 +617,9 @@ interface
|
||||
{ allocates memory on stack, so stack is unbalanced on exit }
|
||||
pi_has_stack_allocs,
|
||||
{ set if the stack frame of the procedure is estimated }
|
||||
pi_estimatestacksize
|
||||
pi_estimatestacksize,
|
||||
{ the routine calls a C-style varargs function }
|
||||
pi_calls_c_varargs
|
||||
);
|
||||
tprocinfoflags=set of tprocinfoflag;
|
||||
|
||||
|
||||
@ -2837,6 +2837,7 @@ implementation
|
||||
end;
|
||||
if (i>0) then
|
||||
begin
|
||||
include(current_procinfo.flags,pi_calls_c_varargs);
|
||||
varargsparas:=tvarargsparalist.create;
|
||||
pt:=tcallparanode(left);
|
||||
while assigned(pt) do
|
||||
|
||||
@ -155,6 +155,12 @@ implementation
|
||||
Message(parser_h_inlining_disabled);
|
||||
exit;
|
||||
end;
|
||||
if pi_calls_c_varargs in current_procinfo.flags then
|
||||
begin
|
||||
Message1(parser_h_not_supported_for_inline,'called C-style varargs functions');
|
||||
Message(parser_h_inlining_disabled);
|
||||
exit;
|
||||
end;
|
||||
{ the compiler cannot handle inherited in inlined subroutines because
|
||||
it tries to search for self in the symtable, however, the symtable
|
||||
is not available }
|
||||
|
||||
@ -1266,7 +1266,9 @@ const
|
||||
(mask:pi_has_stack_allocs;
|
||||
str:' allocates memory on stack, so stack may be unbalanced on exit '),
|
||||
(mask:pi_estimatestacksize;
|
||||
str:' stack size is estimated before subroutine is compiled ')
|
||||
str:' stack size is estimated before subroutine is compiled '),
|
||||
(mask:pi_calls_c_varargs;
|
||||
str:' calls function with C-style varargs ')
|
||||
);
|
||||
var
|
||||
procinfooptions : tprocinfoflags;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user