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
This commit is contained in:
parent
4afdfa3795
commit
c109362313
4 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
|
|
|
@ -5282,6 +5282,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
|
|||
&& !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;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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>
|
||||
|
||||
PR testsuite/86952
|
||||
|
|
23
gcc/testsuite/gfortran.dg/intent_out_12.f90
Normal file
23
gcc/testsuite/gfortran.dg/intent_out_12.f90
Normal file
|
@ -0,0 +1,23 @@
|
|||
! { 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
|
||||
|
Loading…
Add table
Reference in a new issue