This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran aliasing in tree-ssa-alias.c (may_alias_p).


Diego Novillo wrote:

On 03/11/06 07:51, Toon Moene wrote:

	* tree-ssa-alias.c (may_alias_p): if -fargument-noalias-global > 1,
	a pointer argument may not point to anything else.

Well, that's not what the documentation states. The pointer could be made to point to a local stack variable in the body of the function. I realize that this may not happen in Fortran, but we are in a language-independent region of the code here.

I would propose adding flag_argument_noalias == 3 to convey what Fortran
guarantees: Pointer arguments that cannot point to globals nor locals.
Then you can do:

Hmmm, perhaps I should've read the documentation, instead of trying to remember what John Carr meant when he invented this flag :-)


Obviously (to me, I was there when it happened) flag_argument_noalias == 2 meant "Fortran aliasing".

However, you're right that it's not covered by the documentation. In fact, you perfectly describe my "Plan B", in case this objection came up :-)

I'll dig into this - thanks for the review.

--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/
My next laptop will have a crank


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]