[patch, fortran, committed] Fix PR 88363

Thomas Koenig tkoenig@netcologne.de
Sun Dec 16 15:46:00 GMT 2018


Hi,

I just committed the attached patch as obvious and simple. The problem
was that clobbering of intent(out) clobbered the whole variable, instead
of only the element that was actually clobbered.

There is still some optimization work that can be done here, but I will
defer that to a later date - see PR 41453.

Regards

	Thomas

2018-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PF fortran/88364
	* trans-expr.c (gfc_conv_expr_reference): Do not add clobber if
	the expression contains a reference.

2018-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/88364
	* intent_out_13.f90: New test.


Added:
     trunk/gcc/testsuite/gfortran.dg/intent_out_13.f90
Modified:
     trunk/gcc/fortran/ChangeLog
     trunk/gcc/fortran/trans-expr.c
     trunk/gcc/testsuite/ChangeLog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 417 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181216/12bbd00e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intent_out_13.f90
Type: text/x-fortran
Size: 411 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181216/12bbd00e/attachment-0001.bin>


More information about the Fortran mailing list