with System, Text_Io;

package body Remote_Global is  -- must be compiled last
--                               for explicit control of optimization
    Local : Integer;

    procedure Remote is -- this is an optimization control procedure
    begin
        Global := Global + Local; -- be sure procedure is not optimized away
    exception
        when Numeric_Error =>
            Remote; -- can not happen if test is working ( prevents inlining )
    end Remote;

    procedure Check_Time (Test_Duration : in Duration) is
    begin
        if Test_Duration < 100 * Duration'Small or
           Test_Duration < 100 * System.Tick then
            Text_Io.Put_Line (" ***** TEST_DURATION not large compared to " &
                              "DURATION'SMALL or SYSTEM.TICK ");
        end if;
    end Check_Time;

begin

    A_One := 1; -- must not be changed by measurement programs
    Local := Global - A_One; -- really a zero but compiler doesn't know

end Remote_Global;