* set nf_internal for if nodes generated by assert, prevent warning for assert(true); resolves #26467

git-svn-id: trunk@29293 -
This commit is contained in:
florian 2014-12-14 19:41:22 +00:00
parent f630fb94b5
commit c9ba9665dd
3 changed files with 21 additions and 0 deletions

1
.gitattributes vendored
View File

@ -14133,6 +14133,7 @@ tests/webtbs/tw2631.pp svneol=native#text/plain
tests/webtbs/tw26408.pp svneol=native#text/pascal
tests/webtbs/tw2643.pp svneol=native#text/plain
tests/webtbs/tw2645.pp svneol=native#text/plain
tests/webtbs/tw26467.pp svneol=native#text/pascal
tests/webtbs/tw2647.pp svneol=native#text/plain
tests/webtbs/tw26482.pp svneol=native#text/pascal
tests/webtbs/tw2649.pp svneol=native#text/plain

View File

@ -4117,6 +4117,7 @@ implementation
{$endif}
result:=cifnode.create(cnotnode.create(tcallparanode(left).left),
ccallnode.createintern('fpc_assert',paras),nil);
include(result.flags,nf_internal);
tcallparanode(left).left:=nil;
tcallparanode(left).right:=nil;
end;

19
tests/webtbs/tw26467.pp Normal file
View File

@ -0,0 +1,19 @@
{ %OPT=-Sew}
{$INLINE ON}
{$ASSERTIONS ON}
program test;
procedure TestFunc();
begin
Assert(True);
end;
procedure TestFuncInline(); inline;
begin
Assert(True);
end;
begin
TestFunc();
TestFuncInline(); // Warning: unreachable code
end.