"exit" in an inlined routine is interpreted as an exit from the calling routine by DFA
Original Reporter info from Mantis: Jonas @jmaebe
-
Reporter name: Jonas Maebe
Original Reporter info from Mantis: Jonas @jmaebe
- Reporter name: Jonas Maebe
Description:
If an inlined procedure calls "exit", the DFA interprets this as an exit from the caller of this inlined routine. Happens with both 3.2.0 and trunk.
Steps to reproduce:
Compile this program with -O3 -vw
{$mode objfpc}
{$inline on}
procedure test; inline;
begin
exit;
end;
function f: longint;
begin
test; // tt.pp(11,3) Warning: Function result variable does not seem to be initialized
result:=4;
end;
begin
end.
Additional information:
This bug breaks "make cycle" with -O3 or higher on libc-based platforms, because of the following warning:
cutils.pas(1201,10) Warning: Function result variable does not seem to be initialized
(triggered by rtl/inc/cgeneric.inc:30)