Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Pointers to array sections Message-ID: <13945@lanl.gov> Date: 18 Jun 89 20:48:58 GMT References: <750@stat.fsu.edu> Distribution: usa Organization: Los Alamos National Laboratory Lines: 18 From article <750@stat.fsu.edu>, by guest@stat.fsu.edu (a guest account): > [...] > The ALIAS, IDENTIFY, POINTER, and SET RANGE options all overlap > somewhat. (Quiz: which of the above are in the current draft > standard?). It is not clear that the most general mechanism (the > extended pointers?) is the most reasonable or efficient. [...] No! Neither characterization is clear. What _is_ clear is that pointers are lower-level mechanisms. The lower-level construct allows the user to simulate much of the other functionality (but not all - try to alias the _diagonal_ of a two-d array with the pointer mechanism - can't be done). The purpose of using higher-level mechanisms is for optimizations. For example, the RANGE mechanism allows someone to alias an array section _and_nothing_else_! The compiler may find the constrained semantics of the construct useful in deciding dependencies and eliminating non-optimal assumptions from the code. Since a pointer can point to _anything_, the compiler must generally assume that it _does_.