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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <san...@gcc.gnu.org>:

https://gcc.gnu.org/g:b4a9bc7856ee1d3ff98b04402334a362540af2cf

commit r12-2554-gb4a9bc7856ee1d3ff98b04402334a362540af2cf
Author: Sandra Loosemore <san...@codesourcery.com>
Date:   Sat Jul 17 16:12:18 2021 -0700

    Bind(c): Fix bugs in CFI_section

    CFI_section was incorrectly adjusting the base pointer for the result
    array twice in different ways.  It was also overwriting the array
    dimension info in the result descriptor before computing the base
    address offset from the source descriptor, which caused problems if
    the two descriptors are the same.  This patch fixes both problems and
    makes the code simpler, too.

    A consequence of this patch is that the result array is now 0-based in
    all dimensions instead of starting at the numbering to match the first
    element of the source array.  The Fortran standard only specifies the
    shape of the result array, not its lower bounds, so this is permitted
    and probably less confusing for users as well as implementors.

    2021-07-17  Sandra Loosemore  <san...@codesourcery.com>

            PR libfortran/101310

    libgfortran/
            * runtime/ISO_Fortran_binding.c (CFI_section): Fix the base
            address computation and simplify the code.

    gcc/testsuite/
            * gfortran.dg/ISO_Fortran_binding_1.c (section_c): Remove
            incorrect assertions.
  • [Bug libfortran/101310] Bind(C)... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to