Browse Source

* correctly check left.location instead of left.expectloc when generating
code for not nodes, resolves #30208

git-svn-id: trunk@33906 -

florian 9 years ago
parent
commit
49f63d67b2
3 changed files with 13 additions and 1 deletions
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/x86/nx86mat.pas
  3. 11 0
      tests/webtbs/tw30208.pp

+ 1 - 0
.gitattributes

@@ -15115,6 +15115,7 @@ tests/webtbs/tw30166.pp svneol=native#text/plain
 tests/webtbs/tw30179.pp svneol=native#text/pascal
 tests/webtbs/tw30202.pp svneol=native#text/pascal
 tests/webtbs/tw30203.pp svneol=native#text/pascal
+tests/webtbs/tw30208.pp svneol=native#text/pascal
 tests/webtbs/tw3023.pp svneol=native#text/plain
 tests/webtbs/tw3028.pp svneol=native#text/plain
 tests/webtbs/tw3038.pp svneol=native#text/plain

+ 1 - 1
compiler/x86/nx86mat.pas

@@ -242,7 +242,7 @@ interface
            { if it is a register variable, so we've to do      }
            { this before the case statement                    }
            secondpass(left);
-           case left.expectloc of
+           case left.location.loc of
              LOC_FLAGS :
                begin
                  location_reset(location,LOC_FLAGS,OS_NO);

+ 11 - 0
tests/webtbs/tw30208.pp

@@ -0,0 +1,11 @@
+var R: bitpacked record
+    A, B: boolean;
+    end;
+begin
+    R.A := true;
+    R.B := false;    
+    if not R.B then
+      writeln('ok')
+    else
+      halt(1);
+end.