PR fortran/92142 - CFI_setpointer corrupts descriptor
authorJosé Rui Faustino de Sousa <jrfsousa@gmail.com>
Mon, 11 Nov 2019 10:18:14 +0000 (10:18 +0000)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 11 Nov 2019 10:18:14 +0000 (11:18 +0100)
commit3f246567a44ba034c0b48f929c4d4586a4b914ed
tree1f4588827caf5b8df93c515cc20a1a7c61b3e8d9
parenta5aeee56d897cb1120bf4d2a61c8f62c45fecb5b
PR fortran/92142 - CFI_setpointer corrupts descriptor

2019-11-11  José Rui Faustino de Sousa  <jrfsousa@gmail.com>

        libgfortran/
        PR fortran/92142
        * runtime/ISO_Fortran_binding.c (CFI_setpointer): Don't
        override descriptor attribute; with -fcheck, check that
        it is a pointer.

        gcc/testsuite/
        PR fortran/92142
        * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.c: New.
        * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.f90: New.
        * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_10.c: Correct
        upper bounds for case 0.

From-SVN: r278048
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_10.c
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/runtime/ISO_Fortran_binding.c