http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49624

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-15 
15:31:05 UTC ---
(In reply to comment #0)
>   p(10,1:) => A

The problem is that "10" is parsed as DIMEN_ELEMENT such that ar.start is set
and ar.end is not. Thus, for the resolver, it is regarded as (10:,1:).


Patch:

--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3286,7 +3286,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr
*rvalue)
             upper bounds are present, we may do rank remapping.  */
          for (dim = 0; dim < ref->u.ar.dimen; ++dim)
            {
-             if (!ref->u.ar.start[dim])
+             if (!ref->u.ar.start[dim]
                  || ref->u.ar.dimen_type[dim] != DIMEN_RANGE)
                {
                  gfc_error ("Lower bound has to be present at %L",
                             &lvalue->where);

Reply via email to