Commit 68f9c41d by David Malcolm

analyzer: add test coverage for gfortran ICE fix [PR 93779]

PR analyzer/93779 reports an ICE in gfortran with -fanalyzer
that was fixed for GCC 10 by a workaround in
f76a88eb; the tree code in
question is a FUNCTION_DECL.

Given that I want to rework the above patch at some point, it seems
prudent to add test coverage to ensure the ICE doesn't come back,
which this patch does.

gcc/testsuite/ChangeLog:
	PR analyzer/93779
	* gfortran.dg/analyzer/pr88304-2.f90: New test, adapted from
	gfortran.fortran-torture/compile/pr88304-2.f90
parent 8f55a0ee
2020-02-18 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93779
* gfortran.dg/analyzer/pr88304-2.f90: New test, adapted from
gfortran.fortran-torture/compile/pr88304-2.f90
2020-02-18 Mark Eggleston <mark.eggleston@codethink.com> 2020-02-18 Mark Eggleston <mark.eggleston@codethink.com>
PR fortran/93603 PR fortran/93603
......
! Copy of gfortran.fortran-torture/compile/pr88304-2.f90
! as a regression test for ICE with -fanalyzer (PR analyzer/93779)
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
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