* propagate pi_has_assembler_block and pi_uses_exceptions flags from inlined

routines to their host, as in this case the stack frame cannot be omitted
    (mantis #16874)

git-svn-id: trunk@15535 -
This commit is contained in:
Jonas Maebe 2010-07-08 20:34:17 +00:00
parent a302cbeff1
commit 229cbca086
3 changed files with 36 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10526,6 +10526,7 @@ tests/webtbs/tw16803.pp svneol=native#text/plain
tests/webtbs/tw1681.pp svneol=native#text/plain
tests/webtbs/tw16820.pp svneol=native#text/plain
tests/webtbs/tw16861.pp svneol=native#text/plain
tests/webtbs/tw16874.pp svneol=native#text/plain
tests/webtbs/tw1696.pp svneol=native#text/plain
tests/webtbs/tw1699.pp svneol=native#text/plain
tests/webtbs/tw1709.pp svneol=native#text/plain

View File

@ -39,7 +39,11 @@ unit procinfo;
;
const
inherited_inlining_flags : tprocinfoflags = [pi_do_call];
inherited_inlining_flags : tprocinfoflags =
[pi_do_call,
{ the stack frame can't be removed in this case }
pi_has_assembler_block,
pi_uses_exceptions];
type

30
tests/webtbs/tw16874.pp Normal file
View File

@ -0,0 +1,30 @@
{ %opt=-Si }
program project1;
{$mode objfpc}{$H+}
var
global: boolean;
function TestInlineExcept : boolean; inline;
begin
try
result := true;
except
result := false;
end;
global:=true;
end;
begin
writeln('before');
if TestInlineExcept then begin
writeln('TestInlineExcept: true');
end else begin
writeln('TestInlineExcept: false');
end;
writeln('after');
if not global then
halt(1);
end.