[Bug middle-end/53667] [4.6/4.7/4.8 Regression] Cray pointer: Wrong result with optimizations

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 7 09:39:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53667

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-07 09:38:56 UTC ---
(In reply to comment #5)
> Not sure if we can restrict non-escaping to also not escape to other
> parameters?  Possibly we should, otherwise this property won't be very
> useful.

I think that's also what the current setting in Fortran's trans-types.c's
create_fn_spec does: It also sets "." instead of "r" or "w" for TARGET as the
pointer address of those can escape via the argument or otherwise. If an
argument is neither TARGET nor POINTER, I don't see a way how a pointer can
escape.

Thus, I think that interpretation makes sense from the Fortran side. (I haven't
audited the fn spec for the libgfortran functions, but I think for those the
same applies.)



More information about the Gcc-bugs mailing list