------- Comment #25 from dfranke at gcc dot gnu dot org  2010-05-01 10:36 
-------
Dominique, if you apply this hunk

Index: data.c
===================================================================
--- data.c      (revision 158958)
+++ data.c      (working copy)
@@ -352,8 +352,10 @@ gfc_assign_data_value (gfc_expr *lvalue,
          expr = (LOCATION_LINE (init->where.lb->location)
                  > LOCATION_LINE (rvalue->where.lb->location))
               ? init : rvalue;
-         gfc_notify_std (GFC_STD_GNU, "Extension: re-initialization "
-                         "of '%s' at %L", symbol->name, &expr->where);
+         if (gfc_notify_std (GFC_STD_GNU,"Extension: "
+                             "re-initialization of '%s' at %L",
+                             symbol->name, &expr->where) == FAILURE)
+           return FAILURE;
        }

       expr = gfc_copy_expr (rvalue);


And modify the for-loop in gfc_assign_data_value_range() to match this ...

+  for (mpz_set(offset, index) ; mpz_cmp(offset, last_offset) < 0;
+                  mpz_add_ui (offset, offset, 1))
+    if (gfc_assign_data_value (lvalue, rvalue, offset) == FAILURE)
+      break;

then (most of) the duplicate warnings should be gone.


-- 


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

Reply via email to