mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:49:31 +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
|
||||
internalerror(2008022101);
|
||||
end;
|
||||
if not forinline then
|
||||
include(t.flags,nf_internal);
|
||||
result:=t;
|
||||
exit;
|
||||
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