------- Comment #3 from tkoenig at gcc dot gnu dot org  2009-01-26 09:11 -------
(In reply to comment #2)
> the lbound should be simplified in simplify_bound even if the ARRAY argument 
> is
> not a full array.
> 

Here's a tentative patch:

Index: simplify.c
===================================================================
--- simplify.c  (revision 143655)
+++ simplify.c  (working copy)
@@ -2251,6 +2251,8 @@ simplify_bound (gfc_expr *array, gfc_exp
              continue;

            case AR_FULL:
+           case AR_SECTION:
+
              /* We're done because 'as' has already been set in the
                 previous iteration.  */
              if (!ref->next)
@@ -2258,7 +2260,6 @@ simplify_bound (gfc_expr *array, gfc_exp

            /* Fall through.  */

-           case AR_SECTION:
            case AR_UNKNOWN:
              return NULL;
            }


-- 


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

Reply via email to