From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,42427d0d1bf647b1 X-Google-Attributes: gid103376,public From: john@assen.demon.co.uk (John McCabe) Subject: Re: Ada Core Technologies and Ada95 Standards Date: 1996/05/06 Message-ID: <831410273.2370.0@assen.demon.co.uk>#1/1 X-Deja-AN: 153321086 x-nntp-posting-host: assen.demon.co.uk references: <00001a73+00002c20@msn.com> <315FD5C9.342F@lfwc.lockheed.com> <828474655.17825@assen.demon.co.uk> <829673790.5774@assen.demon.co.uk> <830205885.24190@assen.demon.co.uk> <317CB211.3DBA@lmtas.lmco.com> <3180C57E.630C@lmtas.lmco.com> <4m2ke4$rg8@cliffy.lfwc.lockheed.com> newsgroups: comp.lang.ada Date: 1996-05-06T00:00:00+00:00 List-Id: Just as a brief example, here is a program I emailed to you which proves the existence of a bug in my MIL-STD-1750A implementation (at the time you declined to comment on it). I've removed all the comments it originally had to get an idea of how much Ada is involved :- with system; procedure main is type int16 is range 0..16#FFFF#; for int16'size use 16; external_counter_value : int16; pragma shared(external_counter_value); for external_counter_value use at 16#4000#; initial_counter_value : constant int16 := 16#7AAA#; wait_for_value : constant int16 := 16#0#; procedure wait_for_change is wait_for_value_reached : boolean := false; begin external_counter_value := initial_counter_value; while (wait_for_value_reached = false) loop if (external_counter_value = wait_for_value) then wait_for_value_reached := true; end if; end loop; end wait_for_change; begin for i in 0 .. 4 loop wait_for_change; end loop; end main; This is the typical size of the "vast majority" of examples I have provided in bug reports to compiler vendors. As you can obviously see, it is very small, and _very_ non-proprietary. In actual fact when I experimented further I found it could be made even smaller, but I left it this way to try to give the compiler extra work to do. The problem with this example turned out to be that the compiler ignored the pragma shared if the object was address claused. What particularly surprised me with this one was that I would have thought this would be a fairly typical type of construct to use, yet the problem didn't appear to have been found before! Best Regards John McCabe