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: [Patch, fortran] PR 47586 Missing deep copy when assigning from a function returning a pointer.


On 08/13/2012 04:32 PM, Mikael Morin wrote:
here is a fix for PR47586: missing deep copy for the case:
dt_w_alloc = ptr_func(arg)

The patch set looks okay. I am not 100% sure how compatible your changes are with regards to finalization and coarray components, but I have the impression they don't make thinks worse.


Regarding the comment:
"A data-pointer-returning function should be considered as a variable too."


That's actually true according to the standard, which since F2008 allows:
f() = 7
where f() returns a pointer. Well, gfortran doesn't support this yet and there are also some issues if the LHS is an operator expression (see current interpretation request discussions), but I thought I mention it for completeness.


Thanks for the patch! - And for the thorough patch reviews!

Tobias


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