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/93956] Wrong array creation with p => array_dt(1:n)%component Date: Fri, 24 Apr 2020 06:23:18 +0000 [thread overview] Message-ID: <bug-93956-4-9xesTfJTd9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93956-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93956 --- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>: https://gcc.gnu.org/g:2a732dbdfcc0a3bc2b4bdb5387fffa193fea6df6 commit r9-8541-g2a732dbdfcc0a3bc2b4bdb5387fffa193fea6df6 Author: Thomas König <tkoenig@gcc.gnu.org> Date: Fri Apr 24 08:22:48 2020 +0200 Fix PR 93956, wrong pointer when returned via function. Backport from trunk. This one took a bit of detective work. When array pointers point to components of derived types, we currently set the span field and then create an array temporary when we pass the array pointer to a procedure as a non-pointer or non-target argument. (This is inefficient, but that's for another release). Now, the compiler detected this case when there was a direct assignment like p => a%b, but not when p was returned either as a function result or via an argument. This patch fixes that. 2020-04-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/93956 * expr.c (gfc_check_pointer_assign): Also set subref_array_pointer when a function returns a pointer. * interface.c (gfc_set_subref_array_pointer_arg): New function. (gfc_procedure_use): Call it. 2020-04-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/93956 * gfortran.dg/pointer_assign_13.f90: New test.
next prev parent reply other threads:[~2020-04-24 6:23 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93956-4@http.gcc.gnu.org/bugzilla/> 2020-03-11 12:04 ` marxin at gcc dot gnu.org 2020-04-14 17:16 ` tkoenig at gcc dot gnu.org 2020-04-20 5:26 ` mscfd at gmx dot net 2020-04-20 14:36 ` tkoenig at gcc dot gnu.org 2020-04-20 16:08 ` tkoenig at gcc dot gnu.org 2020-04-20 18:42 ` tkoenig at gcc dot gnu.org 2020-04-21 18:48 ` tkoenig at gcc dot gnu.org 2020-04-23 18:31 ` cvs-commit at gcc dot gnu.org 2020-04-24 6:23 ` cvs-commit at gcc dot gnu.org [this message] 2020-04-24 7:27 ` cvs-commit at gcc dot gnu.org 2020-04-24 7:28 ` tkoenig at gcc dot gnu.org 2020-04-24 7:28 ` tkoenig at gcc dot gnu.org 2020-04-26 12:52 ` cvs-commit at gcc dot gnu.org 2020-04-27 21:51 ` cvs-commit at gcc dot gnu.org 2020-04-27 21:53 ` tkoenig at gcc dot gnu.org 2020-04-28 16:23 ` pault at gcc dot gnu.org 2020-05-01 12:53 ` cvs-commit at gcc dot gnu.org 2020-05-01 12:55 ` cvs-commit at gcc dot gnu.org 2020-05-21 10:42 ` tkoenig at gcc dot gnu.org 2021-04-16 16:22 ` tkoenig 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-93956-4-9xesTfJTd9@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).