Browse Source

* disable second part of the test for 64 bit platforms (see comments)

git-svn-id: trunk@10925 -
Jonas Maebe 17 years ago
parent
commit
e4f93fbbd3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/webtbs/tw6769.pp

+ 10 - 0
tests/webtbs/tw6769.pp

@@ -11,8 +11,18 @@ D := -C+A+B;
 if (d<>-6) then
 if (d<>-6) then
   halt(1);
   halt(1);
 Writeln(D);
 Writeln(D);
+{$ifndef cpu64}
+{ On 32 bit systems, A+B becomes cardinal and the -C turns the expression
+  into int64 -> calculated ok.
+  On 64 bit systems, A+B becomes qword and the -C keeps it qword ->
+  overflow error. This can only be properly supported in 64 bit with the
+  introduction of a 128 bit signed type, except if we'd use a different
+  rule set in 64 bit (such as byte+byte -> cardinal and cardinal+cardinal
+  -> qword, or so)
+}
 D := A+B-C;
 D := A+B-C;
 if (d<>-6) then
 if (d<>-6) then
   halt(1);
   halt(1);
 Writeln(D)
 Writeln(D)
+{$endif cpu64}
 End.
 End.