[patch, fortran] Fix pointers not escaping via C_PTR

Jerry DeLisle jvdelisle@charter.net
Sat Mar 9 14:17:00 GMT 2019


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 IMHO a bad wrong-code bug. The chances
> of this patch introducing regressions are really, really low.
> 
> Regression-tested.  OK for trunk?
> 

This is Ok except the test case. You are using dg-run but are not testing for 
any condition. I think you want to to IF .... STOP instead of printing some test 
values or dou you just want dg-conpile?

Fix test case and OK for trunk.

Jerry



More information about the Fortran mailing list