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



--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-11-13 
22:59:22 UTC ---

Here's a tentative patch:



Index: resolve.c

===================================================================

--- resolve.c   (Revision 192894)

+++ resolve.c   (Arbeitskopie)

@@ -7618,12 +7618,18 @@ resolve_allocate_deallocate (gfc_code *code, const



                      if (pr->next && qr->next)

                        {

+                         int i;

                          gfc_array_ref *par = &(pr->u.ar);

                          gfc_array_ref *qar = &(qr->u.ar);

-                         if ((par->start[0] != NULL || qar->start[0] != NULL)

-                             && gfc_dep_compare_expr (par->start[0],

-                                                      qar->start[0]) != 0)

-                           break;

+

+                         for (i=0; i<par->dimen; i++)

+                           {

+                             if ((par->start[i] != NULL

+                                  || qar->start[i] != NULL)

+                                 && gfc_dep_compare_expr (par->start[i],

+                                                          qar->start[i]) != 0)

+                               goto break_label;

+                           }

                        }

                    }

                  else

@@ -7635,6 +7641,8 @@ resolve_allocate_deallocate (gfc_code *code, const

                  pr = pr->next;

                  qr = qr->next;

                }

+           break_label:

+             ;

            }

        }

     }

Reply via email to