public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, fortran, committed] Another fallout from the INTENT(OUT) patch
@ 2018-09-24 17:16 Thomas Koenig
  2018-09-25  6:44 ` Janus Weil
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Koenig @ 2018-09-24 17:16 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch, fortran, committed] Another fallout from the INTENT(OUT) patch
  2018-09-24 17:16 [patch, fortran, committed] Another fallout from the INTENT(OUT) patch Thomas Koenig
@ 2018-09-25  6:44 ` Janus Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Janus Weil @ 2018-09-25  6:44 UTC (permalink / raw)
  To: Thomas Koenig; +Cc: gfortran, gcc-patches

Am Mo., 24. Sep. 2018 um 19:16 Uhr schrieb Thomas Koenig
<tkoenig@netcologne.de>:
>
> 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 :-)

... but we keep on improving every day.

Thanks for the quick fix, Thomas!

Cheers,
Janus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-25  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-24 17:16 [patch, fortran, committed] Another fallout from the INTENT(OUT) patch Thomas Koenig
2018-09-25  6:44 ` Janus Weil

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).