Commit 47e1596c by Jakub Jelinek Committed by Jakub Jelinek

re PR fortran/88304 (ICE in use_pointer_in_frame, at tree-nested.c:267)

	PR fortran/88304
	* tree-nested.c (convert_local_reference_stmt): Handle clobbers where
	lhs is not a decl normally, don't call use_pointer_in_frame on that
	lhs.

	* gfortran.fortran-torture/compile/pr88304-2.f90: New test.

From-SVN: r266907
parent dfe1fe91
2018-12-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/88304
* tree-nested.c (convert_local_reference_stmt): Handle clobbers where
lhs is not a decl normally, don't call use_pointer_in_frame on that
lhs.
2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/88390
2018-12-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/88304
* gfortran.fortran-torture/compile/pr88304-2.f90: New test.
2018-12-07 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/other/bitfield7.C: New.
......
! PR fortran/88304
module pr88304
implicit none
integer :: p
contains
function foo (x, y, z, w)
integer, intent(in) :: x, y
character(*), optional, intent(out) :: z
integer, optional, intent(out) :: w
integer :: foo
foo = 1
end function foo
subroutine bar ()
integer :: s
s = baz (1)
contains
function baz (u)
integer, intent(in) :: u
integer :: baz
integer :: q
integer :: r (10)
r = 0
baz = 1
q = foo (p, r(u), w = baz)
end function baz
end subroutine bar
end module pr88304
......@@ -2324,7 +2324,8 @@ convert_local_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
if (gimple_clobber_p (stmt))
{
tree lhs = gimple_assign_lhs (stmt);
if (!use_pointer_in_frame (lhs)
if (DECL_P (lhs)
&& !use_pointer_in_frame (lhs)
&& lookup_field_for_decl (info, lhs, NO_INSERT))
{
gsi_replace (gsi, gimple_build_nop (), true);
......
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