Browse Source

* test for #39834, previous commits resolve #39834

florian 3 years ago
parent
commit
d3d4de7818
1 changed files with 22 additions and 0 deletions
  1. 22 0
      tests/webtbs/tw39834.pp

+ 22 - 0
tests/webtbs/tw39834.pp

@@ -0,0 +1,22 @@
+{ %OPT=-O- -O2}
+{$mode objfpc}
+program DivTest;
+
+function fquotient(a, b: integer): integer; inline;
+begin
+  result := a div b;
+end;
+
+procedure test;
+var seconds, min: integer;
+begin
+  seconds := 3600 + 60 * 40 + 52;
+  min      := fquotient(seconds, 60);
+  WriteLn(min);
+  if min<>100 then
+    halt(1);
+end;
+
+begin
+  test;
+end.