OSDN Git Service

* config/darwin.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Don't allow 0
[pf3gnuchains/gcc-fork.git] / gcc / config / darwin.h
index 027aa68..b26715e 100644 (file)
@@ -226,7 +226,7 @@ extern const char *darwin_fix_and_continue_switch;
     %{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
     %{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
     %{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
-    %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate:-lgcov} \
+    %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
     %{!nostdlib:%{!nodefaultlibs:%G %L}} \
     %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}"
 
@@ -585,9 +585,11 @@ extern const char *darwin_fix_and_continue_switch;
 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL                                   
 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN)   \
   do {                                                                 \
+    unsigned HOST_WIDE_INT _new_size = SIZE;                           \
     fputs (".lcomm ", (FILE));                                         \
     assemble_name ((FILE), (NAME));                                    \
-    fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE),   \
+    if (_new_size == 0) _new_size = 1;                                 \
+    fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", _new_size,        \
             floor_log2 ((ALIGN) / BITS_PER_UNIT));                     \
     if ((DECL) && ((TREE_STATIC (DECL)                                 \
         && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL)))               \