From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,84fabcbcff917e19 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-09-05 23:49:24 PST Newsgroups: comp.sys.dec Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.sinet.slb.com!rag.austin.nam.slb.com!aspen!lovell From: lovell@sdr.slb.com (John Lovell) Subject: Re: VMS on Alpha anyone? Message-ID: Sender: news@sdr.slb.com Reply-To: lovell@sdr.slb.com Organization: Schlumberger-Doll Research References: <26acod$vq@jac.nuo.dec.com> Date: Sat, 4 Sep 1993 21:52:20 GMT In article vq@jac.nuo.dec.com, lionel@quark.enet.dec.com (Steve Lionel) writes: > >In article , lovell@sdr.slb.com (John Lovell) writes... >> >>Codes will blindly recompile but you should probably use the flag >>/assume = "dummy_aliases" to get the right answer (if you HAVE dummy aliases >>(you probably do) and you use the default /assume = "no_dummy_aliases" >>then you get REALLY tricky bugs to debug, especially if you use complex >>numbers!!) >> >Well, actually, most applications don't have dummy aliases. This is when >you do something like this: > > CALL FOO (A,A) > ... > SUBROUTINE FOO (X,Y) > ... > >The compiler wants to assume that modifications to one variable don't >modify others (unless it can see the dependence via EQUIVALENCE) - the >FORTRAN-77 standard forbids aliasing between arguments and between >arguments and COMMON variables. By assuming that the standard rules >are being followed, which in most cases is true, the compiler has many >more optimization opportunities open to it. This assumption is also the >case in the VAX compiler as of V6; prior to that, the compiler didn't do >any optimization of arguments (or COMMON variables). > >Nit: the spelling of the keyword is NODUMMY_ALIASES. This can be specified >in an OPTIONS statement if you determine that your program depends on >this setting to work. > Yes, routinely sloppy programming on my part, I'm afraid. E.g, if I had a subroutine CFOO(Z,A,X,Y,N) to compute Z := A.X+Y with X, Y and Z complex N-vectors and A a complex scalar, I would call this routine as CFOO(X,A,X,Y,N) if I wanted X := A.X+Y (thereby violating the FORTRAN standard). With /assume=dummy_aliases the answer WILL be wrong because the compiler (correctly) is free to make the assumption that it can compute REAL(Z(k)) before AIMAG(Z(k)), which saves having to use a temporary variable in Z(k) = A*X(k)+Y(k) but if Z and X are the same "dummy" variable then the result will clearly be not what the user expected! Regards, John >Steve Lionel lionel@quark.enet.dec.com >SDT Languages Group >Digital Equipment Corporation >110 Spit Brook Road >Nashua, NH 03062 "Free advice is worth every cent"