diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-22 01:52:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-22 01:52:14 +0000 |
commit | 71db7f717af08cb0e73628fa8e3d04df6243f67a (patch) | |
tree | 515408a85dcc15bfa2477e35305b6f015906427b /gcc/varasm.c | |
parent | dad02e37e13221c6c6cfc56caf47a1f945ace26a (diff) | |
download | gcc-71db7f717af08cb0e73628fa8e3d04df6243f67a.tar.gz |
* varasm.c (record_constant): Pad the constructed
constant_descriptor appropriately.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 799beeb14ee..e9925bfd6bf 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2797,6 +2797,7 @@ record_constant (exp) struct constant_descriptor *next = 0; char *label = 0; rtx rtl = 0; + int pad; /* Make a struct constant_descriptor. The first three pointers will be filled in later. Here we just leave space for them. */ @@ -2804,6 +2805,14 @@ record_constant (exp) obstack_grow (&permanent_obstack, (char *) &next, sizeof next); obstack_grow (&permanent_obstack, (char *) &label, sizeof label); obstack_grow (&permanent_obstack, (char *) &rtl, sizeof rtl); + + /* Align the descriptor for the data payload. */ + pad = (offsetof (struct constant_descriptor, u) + - offsetof(struct constant_descriptor, rtl) + - sizeof(next->rtl)); + if (pad > 0) + obstack_blank (&permanent_obstack, pad); + record_constant_1 (exp); return (struct constant_descriptor *) obstack_finish (&permanent_obstack); } |