darwin.h (ASM_OUTPUT_COMMON): Make sure we do not have a size of 0.
authorAndrew Pinski <apinski@apple.com>
Sun, 12 Sep 2004 18:30:32 +0000 (18:30 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sun, 12 Sep 2004 18:30:32 +0000 (11:30 -0700)
2004-09-12  Andrew Pinski  <apinski@apple.com>

        * darwin.h (ASM_OUTPUT_COMMON): Make sure we do not have a
        size of 0.

From-SVN: r87401

gcc/ChangeLog
gcc/config/rs6000/darwin.h

index 47d3a296464b9c90688c15f9d7e83e8cb1b3ceb4..c7d9ee140816bd5a006f067eebd327c33d4a0006 100644 (file)
@@ -1,5 +1,8 @@
 2004-09-12  Andrew Pinski  <apinski@apple.com>
 
+       * darwin.h (ASM_OUTPUT_COMMON): Make sure we do not have a
+       size of 0.
+
        * tree-chrec.c (initialize_scalar_evolutions_analyzer): Remove.
 
 2004-09-12  Richard Henderson  <rth@redhat.com>
index 44ae79ac38c62c743ad75ec4eab6df34a574a180..e2ef233e798dafed335729168a4c10a2064ae216 100644 (file)
@@ -240,11 +240,14 @@ do {                                                                      \
    symbol.  */
 /* ? */
 #undef  ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)   \
-  do { fputs (".comm ", (FILE));                       \
-       RS6000_OUTPUT_BASENAME ((FILE), (NAME));                \
-       fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
-               (SIZE)); } while (0)
+#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)                   \
+  do {                                                                 \
+    unsigned HOST_WIDE_INT size = SIZE;                                        \
+    fputs (".comm ", (FILE));                                          \
+    RS6000_OUTPUT_BASENAME ((FILE), (NAME));                           \
+    if (size == 0) size = 1;                                           \
+    fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", size);       \
+  } while (0)
 
 /* Override the standard rs6000 definition.  */