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.2 required=5.0 tests=BAYES_00,FROM_WORDY, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd3a5ba6349a6060 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: should I be interested in ada? Date: 1999/02/20 Message-ID: <7ald0t$sb$1@plug.news.pipex.net>#1/1 X-Deja-AN: 446303620 References: <7a72e6$g55$1@probity.mcc.ac.uk> <36C93BB4.1429@ecs.soton.ac.uk> <7afc1o$3mi$2@plug.news.pipex.net> <7afttr$7v3$1@nnrp1.dejanews.com> <7aganu$qsc$1@plug.news.pipex.net> <36CC11A1.C7A71642@hercii.mar.lmco.com> <7ahkn0$kab$1@plug.news.pipex.net> <36CC6AC0.25DBE56D@erols.com> <7aikfp$nhq$3@plug.news.pipex.net> <7ajkhb$dol$1@nnrp1.dejanews.com> <7aknfn$au1$1@plug.news.pipex.net> <36CDE19E.2F1C@lanl.gov> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: UUNET WorldCom server (post doesn't reflect views of UUNET WorldCom) Newsgroups: comp.lang.ada Date: 1999-02-20T00:00:00+00:00 List-Id: William Clodius wrote in message <36CDE19E.2F1C@lanl.gov>... |Nick Roberts wrote: |> |> Correct for most existing Ada and Fortran compilers. However, I do not |> believe that this would be true for an Ada compiler which generates code |> 'late' (i.e. effectively at the linking stage). |> | |Wrong. For better or worse, the Fortran standard allows the assumption |of no aliasing even under circumstances where proof that no aliasing |occurs involves solving the halting problem. I concede this; it is true. However, I would assert that situations where the occurrence of aliasing cannot be disproved are rare, in practice. It is moderately unusual for a subprogram to be declared which has two parameters of the same type (or the same dimensionality and base type), and which updates one or both. It is quite possible for the compiler to generate two object code versions for such a subprogram (one for parameters definitely non-aliased, one for otherwise), and call the appropriate one at different call sites. It is also possible for the compiler to put a dynamic test in front of the second, causing it to jump to the first if the aliasable parameters turn out not to be the same object (this may or may not be worthwhile). I would be interested if anyone could cite (or show) an example of a real world Fortran or Ada program having such a subprogram which is called using parameters that could be aliased, and where an optimiser is unlikely to be able to determine they are not. (I suspect that there are such programs, but that they are very rare.) Nick