tinlrange1.pp 310 B

123456789101112131415161718192021222324
  1. { %fail }
  2. {$mode objfpc}
  3. {$ifdef cpu64}
  4. {$r+}
  5. {$else}
  6. {$q+}
  7. {$endif}
  8. function test(l1, l2: longint): longint; inline;
  9. begin
  10. result:=l1+l2;
  11. end;
  12. { range checking state at caller site should not influence inline evaluation }
  13. {$ifdef cpu64}
  14. {$r-}
  15. {$else}
  16. {$q-}
  17. {$endif}
  18. begin
  19. test(high(longint), 1);
  20. end.