]> gcc.gnu.org Git - gcc.git/commit
fortran: Fix up ISO_Fortran_binding_15.f90 failures [PR92123]
authorJakub Jelinek <jakub@redhat.com>
Thu, 30 Jan 2020 08:35:03 +0000 (09:35 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 30 Jan 2020 08:35:03 +0000 (09:35 +0100)
commit2595f25cdaf4f16d04a1078a487b2ecc126cae29
tree967c27f4422176cac467c5a4e2f6e54888148428
parente0332517f900c7947f03c15fd27e7f71ace98629
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  <pault@gcc.gnu.org>
    Jakub Jelinek  <jakub@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 <pault@gcc.gnu.org>
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
This page took 0.06025 seconds and 6 git commands to generate.