Re: [patch, fortran] Fix pointers not escaping via C_PTR

2019-03-09 Thread Thomas Koenig
Hi Jerry, I think you want to to IF STOP instead of printing some test values or dou you just want dg-conpile? You're correct, I wanted a dg-do run. Here is the version of the test case that I committed. Thanks for the review (and the other one). Regards Thomas ! { dg-do run }

Re: [patch, fortran] Fix pointers not escaping via C_PTR

2019-03-09 Thread Jerry DeLisle
On 2/28/19 12:14 PM, Thomas Koenig wrote: Hello world, the attached patch fixes a wrong-code bug for gfortran where pointers were not marked as escaping.  A C_PTR can be stashed away and reused later (at least as long as the variable it points to remains active). This is not a regression, but I

Re: [patch, fortran] Fix pointers not escaping via C_PTR

2019-03-03 Thread Thomas Koenig
I wrote: First, this talks about a C pointer having a target.  Second, you can re-estabilsh the association to a different pointer to the Fortran program. There is another point to consider: This is interoperability with C we are dealing with, so we also have to follow C semantics. And, love i

Re: [patch, fortran] Fix pointers not escaping via C_PTR

2019-03-02 Thread Thomas Koenig
Hi Steve, On Thu, Feb 28, 2019 at 09:14:48PM +0100, Thomas Koenig wrote: the attached patch fixes a wrong-code bug for gfortran where pointers were not marked as escaping. A C_PTR can be stashed away and reused later (at least as long as the variable it points to remains active). This is not

Re: [patch, fortran] Fix pointers not escaping via C_PTR

2019-03-01 Thread Steve Kargl
On Thu, Feb 28, 2019 at 09:14:48PM +0100, Thomas Koenig wrote: > > the attached patch fixes a wrong-code bug for gfortran where pointers > were not marked as escaping. A C_PTR can be stashed away and reused > later (at least as long as the variable it points to remains active). > > This is not a

[patch, fortran] Fix pointers not escaping via C_PTR

2019-02-28 Thread Thomas Koenig
Hello world, the attached patch fixes a wrong-code bug for gfortran where pointers were not marked as escaping. A C_PTR can be stashed away and reused later (at least as long as the variable it points to remains active). This is not a regression, but IMHO a bad wrong-code bug. The chances of th