2019-09-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91717
* dependency.c (gfc_dep_resolver): Flag identical components
and exit with return value 1 if set and no array refs.
2019-09-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/91717
* gfortran.dg/dependency_55.f90 : New test.
From-SVN: r275696
+2019-09-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/91717
+ * dependency.c (gfc_dep_resolver): Flag identical components
+ and exit with return value 1 if set and no array refs.
+
2019-09-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91553
int m;
gfc_dependency fin_dep;
gfc_dependency this_dep;
+ bool same_component = false;
this_dep = GFC_DEP_ERROR;
fin_dep = GFC_DEP_ERROR;
components. */
if (lref->u.c.component != rref->u.c.component)
return 0;
+
+ same_component = true;
break;
case REF_SUBSTRING:
if (lref || rref)
return 1;
+ /* This can result from concatenation of assumed length string components. */
+ if (same_component && fin_dep == GFC_DEP_ERROR)
+ return 1;
+
/* If we haven't seen any array refs then something went wrong. */
gcc_assert (fin_dep != GFC_DEP_ERROR);
+2019-09-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/91717
+ * gfortran.dg/dependency_55.f90 : New test.
+
2019-09-12 Uroš Bizjak <ubizjak@gmail.com>
PR tree-optimization/89386
--- /dev/null
+! { dg-do run }
+!
+! Test the fix for PR91717 in which the concatenation operation ICEd.
+!
+! Contributed by Damian Rouson <damian@sourceryinstitute.org>
+!
+ type core
+ character (len=:), allocatable :: msg
+ end type
+
+ type(core) :: my_core
+
+ my_core%msg = ""
+ my_core%msg = my_core%msg//"my message is: "
+ my_core%msg = my_core%msg//"Hello!"
+
+ if (my_core%msg .ne. "my message is: Hello!") stop 1
+end