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

--- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:2595f25cdaf4f16d04a1078a487b2ecc126cae29

commit r10-6344-g2595f25cdaf4f16d04a1078a487b2ecc126cae29
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Jan 30 09:35:03 2020 +0100

    fortran: Fix up ISO_Fortran_binding_15.f90 failures [PR92123]

    This is something that has been discussed already a few months ago, but
    seems to have stalled.  Here is Paul's patch from the PR except for the
    TREE_STATIC hunk which is wrong, and does the most conservative fn spec
    tweak for the problematic two builtins we are aware of (to repeat what is
in
    the PR, both .wR and .ww are wrong for these builtins that transform one
    layout of an descriptor to another one; while the first pointer is properly
    marked that we only store to what it points to, from the second pointer
    we copy and reshuffle the content and store into the first one; if there
    wouldn't be any pointers, ".wr" would be just fine, but as there is a
    pointer and that pointer is copied to the area pointed by first argument,
    the pointer effectively leaks that way, so we e.g. can't optimize stores
    into what the data pointer in the descriptor points to).  I haven't
    analyzed other fn spec attributes in the FE, but think it is better to
    fix at least this one we have analyzed.

    2020-01-30  Paul Thomas �<pa...@gcc.gnu.org>
            Jakub Jelinek  <ja...@redhat.com>

        PR fortran/92123
        * trans-decl.c (gfc_get_symbol_decl): Call gfc_defer_symbol_init for
        CFI descs.
        (gfc_build_builtin_function_decls): Use ".w." instead of ".ww" or ".wR"
        for gfor_fndecl_{cfi_to_gfc,gfc_to_cfi}.
        (convert_CFI_desc): Handle references to CFI descriptors.

    Co-authored-by: Paul Thomas <pa...@gcc.gnu.org>

Reply via email to