From: Thomas Koenig <tkoenig@netcologne.de>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [patch, fortran, committed] Another fallout from the INTENT(OUT) patch
Date: Mon, 24 Sep 2018 17:16:00 -0000 [thread overview]
Message-ID: <eb33b739-b17e-9417-6d95-36579bdfefae@netcologne.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
Hello world,
another obvious and simple one-line fix for fallout from the INTENT(OUT)
clobber patch. Committed as r264539, after regression-testing.
It seems our testsuite is not testing as many combinations in the
language as I thought :-)
Regards
Thomas
2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87397
* gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
for variables in an associate statement.
2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87401
* gfortran.dg/intent_out_12.f90: New test.
[-- Attachment #2: p8.diff --]
[-- Type: text/x-patch, Size: 522 bytes --]
Index: trans-expr.c
===================================================================
--- trans-expr.c (Revision 264538)
+++ trans-expr.c (Arbeitskopie)
@@ -5282,6 +5282,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
&& !e->symtree->n.sym->attr.dummy
/* FIXME - PR 87395 and PR 41453 */
&& e->symtree->n.sym->attr.save == SAVE_NONE
+ && !e->symtree->n.sym->attr.associate_var
&& e->ts.type != BT_CHARACTER && e->ts.type != BT_DERIVED
&& e->ts.type != BT_CLASS && !sym->attr.elemental;
[-- Attachment #3: intent_out_12.f90 --]
[-- Type: text/x-fortran, Size: 319 bytes --]
! { dg-do run }
! PR fortran/87401 - this used to segfault at runtime.
! Test case by Janus Weil.
program assoc_intent_out
implicit none
real :: r
associate(o => r)
call sub(o)
end associate
contains
subroutine sub(out)
real, intent(out) :: out
out = 0.0
end subroutine
end
next reply other threads:[~2018-09-24 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 17:16 Thomas Koenig [this message]
2018-09-25 6:44 ` Janus Weil
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=eb33b739-b17e-9417-6d95-36579bdfefae@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@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: link
Be 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).