Procházet zdrojové kódy

* reverted r46220 as it is fixed now properly

git-svn-id: trunk@46276 -
florian před 5 roky
rodič
revize
e14a3f17e6
3 změnil soubory, kde provedl 8 přidání a 2 odebrání
  1. 1 0
      .gitattributes
  2. 2 2
      compiler/nadd.pas
  3. 5 0
      tests/webtbs/tw37493.pp

+ 1 - 0
.gitattributes

@@ -18407,6 +18407,7 @@ tests/webtbs/tw3742.pp svneol=native#text/plain
 tests/webtbs/tw37427.pp svneol=native#text/pascal
 tests/webtbs/tw37449.pp svneol=native#text/pascal
 tests/webtbs/tw37468.pp svneol=native#text/pascal
+tests/webtbs/tw37493.pp svneol=native#text/pascal
 tests/webtbs/tw3751.pp svneol=native#text/plain
 tests/webtbs/tw3758.pp svneol=native#text/plain
 tests/webtbs/tw3764.pp svneol=native#text/plain

+ 2 - 2
compiler/nadd.pas

@@ -1440,10 +1440,10 @@ implementation
                     case nodetype of
                       andn,orn:
                         begin
-                          { full boolean evaluation is only useful if the nodes are not too complex and if no flags/jumps must be converted,
+                          { full boolean evaluation is only useful if the nodes are not too complex and if no jumps must be converted,
                             further, we need to know the expectloc }
                           if (node_complexity(right)<=2) and
-                            not(left.expectloc in [LOC_FLAGS,LOC_JUMP,LOC_INVALID]) and not(right.expectloc in [LOC_FLAGS,LOC_JUMP,LOC_INVALID]) then
+                            not(left.expectloc in [LOC_JUMP,LOC_INVALID]) and not(right.expectloc in [LOC_JUMP,LOC_INVALID]) then
                             begin
                               { we need to copy the whole tree to force another pass_1 }
                               include(localswitches,cs_full_boolean_eval);

+ 5 - 0
tests/webtbs/tw37493.pp

@@ -0,0 +1,5 @@
+{ %OPT=-O3 }
+var a : integer;
+begin
+    write(not((1 in[a]) and (a > a) and (a in[1])))
+end.