mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 20:49:09 +02:00
* 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:
parent
a302cbeff1
commit
229cbca086
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
30
tests/webtbs/tw16874.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user