Thomas Koenig wrote:
Regression-tested. OK for trunk?

2011-11-29  Thomas Koenig <tkoe...@gcc.gnu.org>

        PR fortran/51338
        * dependency.c (are_identical_variables):  Handle case where
        end fields of substring references are NULL.

2011-11-29  Thomas Koenig <tkoe...@gcc.gnu.org>

        PR fortran/51338
        * gfortran.dg/assumed_charlen_substring_1.f90:  New test.
+         /* This can only happen for assumed-length character arguments.
+            If both are NULL, the end length compares equal, because we
+            are looking at the same variable.  */
+         if (r1->u.ss.end == NULL&&  r2->u.ss.end == NULL)
+           break;

Well, it can also happen for deferred-length arguments; how about:

+         /* If both are NULL, the end length compares equal, because we
+            are looking at the same variable. This can only happen for
+            assumed- or deferred-length character arguments.  */


OK with that change.

Thanks for the patch and sorry for the slow review.

Tobias

PS: Patches which still need to be reviewed:
- http://gcc.gnu.org/ml/fortran/2011-11/msg00250.html - no -fcheck=bounds for character(LEN=:) to avoid ICE - http://gcc.gnu.org/ml/fortran/2011-11/msg00253.html - (Re)enable warning if a function result variable is not set [4.4-4.7 diagnostics regression] - http://gcc.gnu.org/ml/fortran/2011-12/msg00018.html - fix ASSOCIATE with extended types

Reply via email to