This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,gfortran] PR 22607: PURE return-by-reference functions
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Erik Edelmann <erik dot edelmann at iki dot fi>
- Cc: gfortran <fortran at gcc dot gnu dot org>,gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 09 Nov 2005 01:03:53 +0100
- Subject: Re: [patch,gfortran] PR 22607: PURE return-by-reference functions
- References: <20051108215436.GA29549@acclab.helsinki.fi>
Erik Edelmann wrote:
> Here's a patch for PR 22607; PURE (including ELEMENTAL)
> return-by-reference functions don't currently work. If we
> avoid setting
>
> DECL_IS_PURE (fndecl) = 1;
>
> in trans-decl.c(build_function_decl), the problem is fixed.
>
> I do, however, not know much about the backend. Among the things
> I don't know is whether DECL_IS_PURE (fndecl) = 1 is supposed to
> work for return-by-ref. functions or not (might this actually be
> a backend bug?). Comments from people with better understanding
> of the backend are wellcome.
>
> Bootstrapped & tested on Linux/x86, Ok?
Yes, I guess this borders on obvious.
- Tobi
:REVIEWMAIL: