Browse Source

* forgot to commit

git-svn-id: trunk@6694 -
Jonas Maebe 18 years ago
parent
commit
3f3aa08b28
2 changed files with 31 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 30 0
      tests/test/trecreg4.pp

+ 1 - 0
.gitattributes

@@ -6813,6 +6813,7 @@ tests/test/trangeob.pp svneol=native#text/plain
 tests/test/trecreg.pp -text
 tests/test/trecreg2.pp svneol=native#text/plain
 tests/test/trecreg3.pp -text
+tests/test/trecreg4.pp svneol=native#text/plain
 tests/test/tresstr.pp svneol=native#text/plain
 tests/test/trtti1.pp svneol=native#text/plain
 tests/test/trtti2.pp svneol=native#text/plain

+ 30 - 0
tests/test/trecreg4.pp

@@ -0,0 +1,30 @@
+{$bitpacking on}
+
+type
+  tr = packed record
+    b1, b2, b3, b4: -129..127;
+  end;
+
+procedure t;
+var
+  r: tr;
+  l: longint;
+begin
+  r.b4 := -5;
+  r.b3 := -128;
+  r.b2 := 127;
+  r.b1 := -1;
+  if (r.b1 <> -1) or
+     (r.b2 <> 127) or
+     (r.b3 <> -128) or
+     (r.b4 <> -5) then
+    begin
+      writeln('error');
+      halt(1);
+    end;
+end;
+
+begin
+  t;
+end.
+