Browse Source

* test for bug report 15370

git-svn-id: trunk@14447 -
pierre 15 years ago
parent
commit
d294e80eea
2 changed files with 36 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 35 0
      tests/webtbs/tw15370.pp

+ 1 - 0
.gitattributes

@@ -10140,6 +10140,7 @@ tests/webtbs/tw15293a.pp svneol=native#text/plain
 tests/webtbs/tw15304.pp svneol=native#text/plain
 tests/webtbs/tw15304.pp svneol=native#text/plain
 tests/webtbs/tw1532.pp svneol=native#text/plain
 tests/webtbs/tw1532.pp svneol=native#text/plain
 tests/webtbs/tw15364.pp svneol=native#text/plain
 tests/webtbs/tw15364.pp svneol=native#text/plain
+tests/webtbs/tw15370.pp svneol=native#text/plain
 tests/webtbs/tw1539.pp svneol=native#text/plain
 tests/webtbs/tw1539.pp svneol=native#text/plain
 tests/webtbs/tw1567.pp svneol=native#text/plain
 tests/webtbs/tw1567.pp svneol=native#text/plain
 tests/webtbs/tw1573.pp svneol=native#text/plain
 tests/webtbs/tw1573.pp svneol=native#text/plain

+ 35 - 0
tests/webtbs/tw15370.pp

@@ -0,0 +1,35 @@
+{%CPU=i386}
+
+
+program test_word_ref;
+
+var
+  loc : word;
+{$asmmode att}
+procedure TestAtt(w : word);
+
+begin
+  asm
+      movw w,%ax
+      movw %ax,loc
+  end;
+end;
+
+{$asmmode intel}
+procedure TestIntel(w : word);
+
+begin
+  asm
+      mov ax,[w]
+      mov [loc],ax
+  end;
+end;
+
+begin
+  TestAtt(6);
+  if loc<>6 then
+    halt(1);
+  TestIntel(46);
+  if loc<>46 then
+    halt(1);
+end.