Commit 5986c254 by Thomas Koenig

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

2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87397
	* gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
	for variables having the dimension attribute.

2018-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/87395
	* gfortran.dg/intent_out_11.f90: New test.

From-SVN: r264518
parent d18cbbf6
2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87397
* gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
for variables having the dimension attribute.
2018-09-23 Janne Blomqvist <jb@gcc.gnu.org> 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
* trans-expr.c (gfc_caf_get_image_index): Do array index * trans-expr.c (gfc_caf_get_image_index): Do array index
......
...@@ -5276,6 +5276,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, ...@@ -5276,6 +5276,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
bool add_clobber; bool add_clobber;
add_clobber = fsym && fsym->attr.intent == INTENT_OUT add_clobber = fsym && fsym->attr.intent == INTENT_OUT
&& !fsym->attr.allocatable && !fsym->attr.pointer && !fsym->attr.allocatable && !fsym->attr.pointer
&& !e->symtree->n.sym->attr.dimension
&& !e->symtree->n.sym->attr.pointer && !e->symtree->n.sym->attr.pointer
/* See PR 41453. */ /* See PR 41453. */
&& !e->symtree->n.sym->attr.dummy && !e->symtree->n.sym->attr.dummy
......
2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87395
* gfortran.dg/intent_out_11.f90: New test.
2018-09-23 Janne Blomqvist <jb@gcc.gnu.org> 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
* gfortran.dg/coarray_lib_alloc_4.f90: Fix scan patterns. * gfortran.dg/coarray_lib_alloc_4.f90: Fix scan patterns.
......
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