mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 15:39:26 +01:00
* 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:
parent
f630fb94b5
commit
c9ba9665dd
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
||||
@ -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
19
tests/webtbs/tw26467.pp
Normal 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.
|
||||
Loading…
Reference in New Issue
Block a user