------- Additional Comments From tobi at gcc dot gnu dot org  2005-03-13 00:17 
-------
Can you try this patch, Andrew?  The required padding should never overflow 
2^32.

2005-03-13  Tobias Schl"uter  <[EMAIL PROTECTED]>

        PR fortran/20059
        * trans-common.c (translate_common): Cast offset/common_segment->offset
        to type int for warning message.

Index: trans-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-common.c,v
retrieving revision 1.24
diff -u -p -r1.24 trans-common.c
--- trans-common.c      12 Mar 2005 21:44:32 -0000      1.24
+++ trans-common.c      13 Mar 2005 00:15:08 -0000
@@ -815,7 +815,7 @@ translate_common (gfc_common_head *commo
                 requirements.  Insert padding immediately before this
                 segment.  */
              gfc_warning ("Padding of %d bytes required before '%s' in "
-                          "COMMON '%s' at %L", offset, s->sym->name,
+                          "COMMON '%s' at %L", (int)offset, s->sym->name,
                           common->name, &common->where);
            }
          else
@@ -841,7 +841,7 @@ translate_common (gfc_common_head *commo
   if (common_segment->offset != 0)
     {
       gfc_warning ("COMMON '%s' at %L requires %d bytes of padding at start",
-                  common->name, &common->where, common_segment->offset);
+                  common->name, &common->where, (int)common_segment->offset);
     }

   create_common (common, common_segment);


-- 


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

Reply via email to