public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103390] [12 Regression] ICE: gimplification failed since r12-4591-g1af78e731feb9327 Date: Mon, 03 Jan 2022 16:48:18 +0000 [thread overview] Message-ID: <bug-103390-4-2jvve36dcK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103390-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103390 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>: https://gcc.gnu.org/g:6447f6f983ffeaecb8753ef685d702bf2594968b commit r12-6191-g6447f6f983ffeaecb8753ef685d702bf2594968b Author: Sandra Loosemore <sandra@codesourcery.com> Date: Mon Jan 3 08:47:38 2022 -0800 Fortran: Fix array copy-in/copy-out for BIND(C) functions [PR103390] The Fortran front end was generating invalid code for the array copy-out after a call to a BIND(C) function for a dummy with the CONTIGUOUS attribute when the actual argument was a call to the SHAPE intrinsic or other array expressions that are not lvalues. It was also generating code to evaluate the argument expression multiple times on copy-in. This patch teaches it to recognize that a copy is not needed in these cases. 2022-01-03 Sandra Loosemore <sandra@codesourcery.com> PR fortran/103390 gcc/fortran/ * expr.c (gfc_is_simply_contiguous): Make it smarter about function calls. * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Do not generate copy loops for array expressions that are not "variables" (lvalues). gcc/testsuite/ * gfortran.dg/c-interop/pr103390-1.f90: New. * gfortran.dg/c-interop/pr103390-2.f90: New. * gfortran.dg/c-interop/pr103390-3.f90: New. * gfortran.dg/c-interop/pr103390-4.f90: New. * gfortran.dg/c-interop/pr103390-6.f90: New. * gfortran.dg/c-interop/pr103390-7.f90: New. * gfortran.dg/c-interop/pr103390-8.f90: New. * gfortran.dg/c-interop/pr103390-9.f90: New.
next prev parent reply other threads:[~2022-01-03 16:48 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-23 18:57 [Bug fortran/103390] New: [12 Regression] ICE: gimplification failed gscfq@t-online.de 2021-11-24 8:38 ` [Bug fortran/103390] [12 Regression] ICE: gimplification failed since r12-4591-g1af78e731feb9327 marxin at gcc dot gnu.org 2021-11-24 8:53 ` rguenth at gcc dot gnu.org 2021-12-14 1:44 ` sandra at gcc dot gnu.org 2021-12-14 1:47 ` sandra at gcc dot gnu.org 2021-12-30 19:30 ` sandra at gcc dot gnu.org 2022-01-01 23:10 ` sandra at gcc dot gnu.org 2022-01-02 18:37 ` sandra at gcc dot gnu.org 2022-01-03 11:58 ` antony at cosmologist dot info 2022-01-03 16:48 ` cvs-commit at gcc dot gnu.org [this message] 2022-01-03 17:01 ` sandra at gcc dot gnu.org 2022-01-03 18:43 ` antony at cosmologist dot info 2022-01-05 17:05 ` sandra at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103390-4-2jvve36dcK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).