https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71544
--- Comment #16 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Author: tkoenig Date: Sun Mar 10 11:26:25 2019 New Revision: 269552 URL: https://gcc.gnu.org/viewcvs?rev=269552&root=gcc&view=rev Log: 2019-03-10 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71544 Backport from trunk * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of C_PTR and C_FUNPTR. (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set. 2019-03-10 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71544 Backport from trunk * gfortran.dg/c_ptr_tests_19.f90: New test. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/trans-types.c branches/gcc-7-branch/gcc/testsuite/ChangeLog