mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 02:00:34 +02:00
* setelement nodes itself should not be considered, since setelement
nodes generate no code except loading data into registers, this does not hurt, resolves #23342 git-svn-id: trunk@23039 -
This commit is contained in:
parent
fcc6d3dcd9
commit
4aca018f62
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13004,6 +13004,7 @@ tests/webtbs/tw2323.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw23270.pp svneol=native#text/pascal
|
tests/webtbs/tw23270.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2328.pp svneol=native#text/plain
|
tests/webtbs/tw2328.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2332.pp svneol=native#text/plain
|
tests/webtbs/tw2332.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw23342.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw2351.pp svneol=native#text/plain
|
tests/webtbs/tw2351.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2363.pp svneol=native#text/plain
|
tests/webtbs/tw2363.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2377.pp svneol=native#text/plain
|
tests/webtbs/tw2377.pp svneol=native#text/plain
|
||||||
|
@ -158,8 +158,12 @@ unit optcse;
|
|||||||
{ same for voiddef }
|
{ same for voiddef }
|
||||||
not(is_void(n.resultdef)) and
|
not(is_void(n.resultdef)) and
|
||||||
{ adding tempref and callpara nodes itself is worthless but
|
{ adding tempref and callpara nodes itself is worthless but
|
||||||
their complexity is probably <= 1 anyways }
|
their complexity is probably <= 1 anyways
|
||||||
not(n.nodetype in [temprefn,callparan]) and
|
|
||||||
|
neither add setelementn nodes because the compiler sometimes depends on the fact
|
||||||
|
that a certain node stays a setelementn, this does not hurt either because
|
||||||
|
setelementn nodes itself generate no real code (except moving data into register) }
|
||||||
|
not(n.nodetype in [temprefn,callparan,setelementn]) and
|
||||||
|
|
||||||
{ node worth to add?
|
{ node worth to add?
|
||||||
|
|
||||||
|
17
tests/webtbs/tw23342.pp
Normal file
17
tests/webtbs/tw23342.pp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
uses
|
||||||
|
classes;
|
||||||
|
|
||||||
|
procedure foo(Shift: TShiftState);
|
||||||
|
var
|
||||||
|
ssMultiSelect: TShiftStateEnum;
|
||||||
|
ATest: Boolean;
|
||||||
|
begin
|
||||||
|
ssMultiSelect := ssCtrl;
|
||||||
|
// ATest := (Shift = [ssLeft, ssMultiSelect]); // compiles
|
||||||
|
// ATest := ATest or (Shift = [ssMultiSelect]); // compiles
|
||||||
|
ATest := (Shift = [ssLeft, ssMultiSelect]) or (Shift = [ssMultiSelect]); // fatal internal error 200203302 with -O2 or -O3
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user