Commit c1093623 by Thomas Koenig

re PR fortran/87397 (Clobbering intent(out) variables caused regression in OpenCoarrays testsuite)

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.

From-SVN: r264539
parent 4afdfa37
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 Bernhard Reuther-Fischer <aldot@gcc.gnu.org> 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
Cesar Philippidis <cesar@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com>
......
...@@ -5282,6 +5282,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, ...@@ -5282,6 +5282,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
&& !e->symtree->n.sym->attr.dummy && !e->symtree->n.sym->attr.dummy
/* FIXME - PR 87395 and PR 41453 */ /* FIXME - PR 87395 and PR 41453 */
&& e->symtree->n.sym->attr.save == SAVE_NONE && 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_CHARACTER && e->ts.type != BT_DERIVED
&& e->ts.type != BT_CLASS && !sym->attr.elemental; && e->ts.type != BT_CLASS && !sym->attr.elemental;
......
2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87401
* gfortran.dg/intent_out_12.f90: New test.
2018-09-24 Will Schmidt <will_schmidt@vnet.ibm.com> 2018-09-24 Will Schmidt <will_schmidt@vnet.ibm.com>
PR testsuite/86952 PR testsuite/86952
......
! { 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment