mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 01:09:06 +02:00
* add no internal flag when folding constants in taddnode.simplify, resolves #39308
This commit is contained in:
parent
099a927331
commit
00d4a6889d
@ -788,8 +788,6 @@ implementation
|
|||||||
else
|
else
|
||||||
internalerror(2008022101);
|
internalerror(2008022101);
|
||||||
end;
|
end;
|
||||||
if not forinline then
|
|
||||||
include(t.flags,nf_internal);
|
|
||||||
result:=t;
|
result:=t;
|
||||||
exit;
|
exit;
|
||||||
end
|
end
|
||||||
|
11
tests/webtbf/tw39308.pp
Normal file
11
tests/webtbf/tw39308.pp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{ %fail }
|
||||||
|
{ %opt=-Sew }
|
||||||
|
program project1;
|
||||||
|
var
|
||||||
|
a: byte;
|
||||||
|
begin
|
||||||
|
a:=1;
|
||||||
|
if 1 > 2 then
|
||||||
|
a := 0; // <= no warning
|
||||||
|
writeln(a);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user