* varasm.c (output_constructor): Add .align 0 for packed vars.
authorChandrakala Chavva <cchavva@redhat.com>
Fri, 4 Aug 2000 18:11:16 +0000 (14:11 -0400)
committerChandra Chavva <cchavva@gcc.gnu.org>
Fri, 4 Aug 2000 18:11:16 +0000 (14:11 -0400)
From-SVN: r35489

gcc/ChangeLog
gcc/varasm.c

index 9d3d182450e09bab5278a059fe9b32c7bfa9cc1c..0b35e7377f5d258e788cf2fffb1a0450931ac71c 100644 (file)
@@ -1,3 +1,7 @@
+2000-08-04  Chandrakala Chavva  <cchavva@redhat.com>
+
+       * varasm.c (output_constructor): Add .align 0 for packed vars.
+
 2000-08-04  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * configure.in: Use default thread_file even when enable_threads is
index c79c3806de5c6ff565436287a06365fa94083979..8883cc216c9738a621f58dbd1378c65ecbc148e3 100644 (file)
@@ -4472,6 +4472,15 @@ output_constructor (exp, size)
              assemble_zeros (bitpos - total_bytes);
              total_bytes = bitpos;
            }
+          else if (field != 0 && DECL_PACKED (field))
+            {
+               /* Some assemblers automaticallly align a datum according to
+                  its size if no align directive is specified.  The datum,
+                  however, may be declared with 'packed' attribute, so we
+                  have to disable such a feature.  */
+
+               ASM_OUTPUT_ALIGN (asm_out_file, 0);
+            }
 
          /* Determine size this element should occupy.  */
          if (field)