https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89366

--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sat Feb 23 12:18:44 2019
New Revision: 269156

URL: https://gcc.gnu.org/viewcvs?rev=269156&root=gcc&view=rev
Log:
2019-02-23  Paul Thomas  <pa...@gcc.gnu.org>

        PR fortran/89385
        PR fortran/89366
        * decl.c (gfc_verify_c_interop_param): Restriction on string
        length being one is lifted for F2018.
        * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
        characters with intent in, make a temporary and copy the result
        of the expression evaluation into it.
        (gfc_conv_procedure_call): Set a flag for character formal args
        having a character length that is not unity. If the procedure
        is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
        Also, extend bind C calls to unconditionally convert both
        pointers and allocatable expressions.

2019-02-23  Paul Thomas  <pa...@gcc.gnu.org>

        PR fortran/89385
        * gfortran.dg/ISO_Fortran_binding_1.f90 : Correct test for
        previously incorrect lbound for allocatable expressions. Also
        correct stop values to avoid repetition.
        * gfortran.dg/ISO_Fortran_binding_5.f90 : New test
        * gfortran.dg/ISO_Fortran_binding_5.c : Support previous test.

        PR fortran/89366
        * gfortran.dg/ISO_Fortran_binding_6.f90 : New test
        * gfortran.dg/ISO_Fortran_binding_6.c : Support previous test.
        * gfortran.dg/pr32599.f03 : Set standard to F2008.

2019-02-23  Paul Thomas  <pa...@gcc.gnu.org>

        PR fortran/89385
        PR fortran/89366
        * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc) : In the
        interchange between character and derived, the character type
        was being set incorrectly.
        (gfc_desc_to_cfi_desc) : Eliminate the interchange of types in
        this function. Do not add the kind and length information to
        the type field of structures. Lbounds were incorrectly being
        set to zero for allocatable and pointer descriptors. Should
        have been non-pointer, non-allocatables that received this
        treatment.


Added:
    trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.c
    trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_5.f90
    trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.c
    trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90
    trunk/gcc/testsuite/gfortran.dg/pr32599.f03
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/runtime/ISO_Fortran_binding.c

Reply via email to