As I understand the reference manual, the following program with Ada.Calendar; use Ada.Calendar; with Ada.Text_IO; use Ada.Text_IO; with Interfaces.C; use Interfaces.C; procedure Main is function usleep (Secs : int) return int; pragma Import (C, usleep, "usleep"); Res : int; Start_Time : Time := Clock; begin select delay 1.0; Put_Line ("OK:" & Integer'Image (Integer (Clock - Start_Time))); then abort Res := usleep (10_000_000); Put_Line ("KO:" & Integer'Image (Integer (Clock - Start_Time))); end select; end Main; should produce OK: 1 Instead, on amd64 with gnat-5.2.1-17: KO: 1 OK: 1 and on mips with gnat-5.2.1-19: KO: 10 OK: 10 The whole history can be found at https://bugs.debian.org/673772.
Actually Ada does not make any guarantee when mixing ATC and system calls and indeed, it is fundamentally unsafe if not impossible to properly abort from any random system call, so this isn't supported.
The original author agrees to close this issue.