https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71544
--- Comment #15 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Author: tkoenig Date: Sun Mar 10 11:19:58 2019 New Revision: 269551 URL: https://gcc.gnu.org/viewcvs?rev=269551&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-8-branch/gcc/testsuite/gfortran.dg/c_ptr_tests_19.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-types.c branches/gcc-8-branch/gcc/testsuite/ChangeLog