2014-12-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56867
* trans-array.c (gfc_conv_resolve_dependencies): Also check
dependencies when there may be substrings of character arrays.
2014-12-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56867
* gfortran.dg/dependency_45.f90: New test.
From-SVN: r219089
+2014-12-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56867
+ * trans-array.c (gfc_conv_resolve_dependencies): Also check
+ dependencies when there may be substrings of character arrays.
+
2014-12-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/54756
&& ss_expr->rank)
nDepend = gfc_check_dependency (dest_expr, ss_expr, true);
+ /* Check for cases like c(:)(1:2) = c(2)(2:3) */
+ if (!nDepend && dest_expr->rank > 0
+ && dest_expr->ts.type == BT_CHARACTER
+ && ss_expr->expr_type == EXPR_VARIABLE)
+
+ nDepend = gfc_check_dependency (dest_expr, ss_expr, false);
+
continue;
}
+2014-12-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56867
+ * gfortran.dg/dependency_45.f90: New test.
+
2014-12-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/54756
--- /dev/null
+! { dg-do run }
+! { dg-options "-Warray-temporaries" }
+! PR 56867 - substrings were not checked for dependency.
+program main
+ character(len=4) :: a
+ character(len=4) :: c(3)
+ c(1) = 'abcd'
+ c(2) = '1234'
+ c(3) = 'wxyz'
+ c(:)(1:2) = c(2)(2:3) ! { dg-warning "array temporary" }
+ if (c(3) .ne. '23yz') call abort
+end program main