Commit bd810d63 by Thomas Koenig

PF fortran/88364

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/88363
	* intent_out_13.f90: New test.

From-SVN: r267187
parent 57bfedaf
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-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87944
......
......@@ -8152,7 +8152,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr, bool add_clobber)
gfc_add_block_to_block (&se->pre, &se->post);
se->expr = var;
}
else if (add_clobber)
else if (add_clobber && expr->ref == NULL)
{
tree clobber;
tree var;
......
2018-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88363
* intent_out_13.f90: New test.
2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/88483
......
! { dg-do run }
! PR 88364 -- too much was clobbered on call.
module pr88364
implicit none
type t
integer :: b = -1
integer :: c = 2
end type t
contains
subroutine f1 (x)
integer, intent(out) :: x
x = 5
end subroutine f1
subroutine f2 ()
type(t) :: x
call f1 (x%b)
if (x%b .ne. 5 .or. x%c .ne. 2) stop 1
end subroutine f2
end module pr88364
use pr88364
call f2
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