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,e8d2c0ed82daf4da X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Handling Addressing Errors Date: 1999/03/20 Message-ID: #1/1 X-Deja-AN: 456743661 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <36F21863.7D71@iki.fi> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1999-03-20T00:00:00+00:00 List-Id: Mikko Levanto (mikko.levanto@iki.fi) wrote: : Tucker Taft wrote: : > This is made explicit in RM95 C.6(20) and 1.1.3(13), which indicates : > that the "external effect" of a program includes *each* : > read and update of a volatile or atomic object. : > It is illegal to optimize away an external effect (RM95 1.1.3(15)). : Can optimization affect the number of accesses ? No. A correct optimization may not change the number of reads or writes. : E.g., if A is volatile, does : A := A + A; : always cause two reads and one write? Yes. Each read and update is an external effect, and an optimization may not add or remove required external effects. An example of an external effect is printing the digit "2". It would obviously be wrong for an optimization to change output from "1223" to "123" simply because there were 2 "2"s in a row. The same applies to reads of a volatile object. : -- : Mikko J. Levanto : mailto:mikko.levanto@vtt.fi -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA