diff mbox series

[fortran,committed] Another fallout from clobbering INTENT(OUT) variables

Message ID 8ea01645-0314-1caf-3143-209c76bdd103@tkoenig.net
State New
Headers show
Series [fortran,committed] Another fallout from clobbering INTENT(OUT) variables | expand

Commit Message

Thomas König Sept. 23, 2018, 8:22 p.m. UTC
Hello world,

committed as obvious after regression-testing.  Instead of spending
a lot of work trying to reducing the test case, I used all of it
(retainging the copyright notice).

Regards

	Thomas

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/87397
	* gfortran.dg/intent_out_11.f90: New test.

Comments

Janus Weil Sept. 24, 2018, 8:08 a.m. UTC | #1
Hi Thomas,

I'm seeing some more fallout from your intent(out) patch:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87401

Cheers,
Janus

Am So., 23. Sep. 2018 um 22:23 Uhr schrieb Thomas König <tk@tkoenig.net>:
>
> Hello world,
>
> committed as obvious after regression-testing.  Instead of spending
> a lot of work trying to reducing the test case, I used all of it
> (retainging the copyright notice).
>
> Regards
>
>         Thomas
>
> 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/87397
>         * gfortran.dg/intent_out_11.f90: New test.
>
diff mbox series

Patch

Index: trans-expr.c
===================================================================
--- trans-expr.c	(Revision 264512)
+++ trans-expr.c	(Arbeitskopie)
@@ -5280,6 +5280,7 @@  gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
 		      bool add_clobber;
 		      add_clobber = fsym && fsym->attr.intent == INTENT_OUT
 			&& !fsym->attr.allocatable && !fsym->attr.pointer
+			&& !e->symtree->n.sym->attr.dimension
 			&& !e->symtree->n.sym->attr.pointer
 			/* See PR 41453.  */
 			&& !e->symtree->n.sym->attr.dummy