Commit c9942e5f by Thomas Koenig

re PR fortran/92755 (ICE in gfc_dep_resolver, at fortran/dependency.c:2123)

2019-12-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92755
	* dependency.c (gfc_dep_resolver):  Move skipping of _data ref
	into the loop.

2019-12-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/92755
	* gfortran.dg/dependency_57.f90: New test.

From-SVN: r279086
parent 9f5836a6
2019-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92755
* dependency.c (gfc_dep_resolver): Move skipping of _data ref
into the loop.
2019-12-07 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92793
......
......@@ -2098,6 +2098,13 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse,
gfc_dependency this_dep;
bool same_component = false;
this_dep = GFC_DEP_ERROR;
fin_dep = GFC_DEP_ERROR;
/* Dependencies due to pointers should already have been identified.
We only need to check for overlapping array references. */
while (lref && rref)
{
/* The refs might come in mixed, one with a _data component and one
without. Look at their next reference in order to avoid an
ICE. */
......@@ -2110,13 +2117,6 @@ gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse,
&& strcmp (rref->u.c.component->name, "_data") == 0)
rref = rref->next;
this_dep = GFC_DEP_ERROR;
fin_dep = GFC_DEP_ERROR;
/* Dependencies due to pointers should already have been identified.
We only need to check for overlapping array references. */
while (lref && rref)
{
/* We're resolving from the same base symbol, so both refs should be
the same type. We traverse the reference chain until we find ranges
that are not equal. */
......
2019-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92755
* gfortran.dg/dependency_57.f90: New test.
2019-12-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* g++.dg/cpp0x/gen-attrs-36.C: Update expected diagnostics.
......
! { dg-do compile }
! PR 92755 - this used to cause an ICE.
! Original test case by Gerhard Steinmetz
program p
type t
end type
type t2
class(t), allocatable :: a(:)
end type
type(t2) :: z
z%a = [z%a]
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