aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/varasm.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d3d182..0b35e73 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/varasm.c b/gcc/varasm.c
index c79c380..8883cc2 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -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)