Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!altos86!elxsi!beatnix!corbett From: corbett@beatnix.UUCP (Bob Corbett) Newsgroups: comp.lang.fortran Subject: Re: Fortran 8x: pointers and optimization Message-ID: <2812@elxsi.UUCP> Date: 7 Jul 89 18:53:20 GMT References: <664hallidayd@yvax.byu.edu> Sender: news@elxsi.UUCP Reply-To: uunet!elxsi!corbett (Bob Corbett) Organization: ELXSI, San Jose Lines: 36 -In article <664hallidayd@yvax.byu.edu> hallidayd@yvax.byu.edu writes: ->In message <2773@elxsi.UUCP> Bob Corbett (corbett@beatnix.UUCP) makes the ->statements ->> Thus, adding pointers does not make optimization harder than ->>the IDENTIFY statement would. However, pointers offer more functionality ->>than the IDENTITY statement. -> ->The first statement has already been adressed (the ALIASing provided by the ->ALIAS/IDENTIFY pair cannot be reIDENTIFYed in a subroutine, while that provided ->by POINTERs can). The second statement, that POINTERs offer more functionality ->than the IDENTIFY is false if we are considering only the ALIASing of array ->sections (POINTERs do provide the added functionality of recursive data ->structures, which the ALIAS/IDANTIFY pair was never intended to do). There is ->no way for the POINTER syntax to ALIAS arbitrary, functionally related, array ->elements as can be acomplished with ALIAS/IDENTIFY---try ALIASing the diagonal ->of an array with the present proposed POINTER syntax, it can't be done (as at ->least one other poster has stated). I concede that if the functionality pointers provide beyond ALIAS/IDENTIFY is used, it will make alias analysis harder, though not much harder. But please note that if pointers are used to provide the functionality of ALIAS/IDENTIFY, it does not make alias analysis noticeably harder. The example of a procedure call modifying the association of a pointer can occur only if the pointer is external or the pointer is passed as a pointer argument. Neither case can arise when pointers are used to emulate ALIAS/IDENTIFY. Thus, the added functionality of pointers costs only when it is used. I had missed the fact that pointers cannot be used to ALIAS the diagonal of an array. I regard this lack as a serious problem. Clearly, X3J3 should extend the notation for array sections to add this capability. Yours very truly, Bob Corbett uunet!elxsi!corbett ucbvax!sun!elxsi!corbett