summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-20 13:22:49 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-20 13:22:49 +0000
commit1a8bf94d3197b82fc41436b2a3043f339536f603 (patch)
tree4d66b707d35b8c679d14f070a4cc42b15a95d2a8 /gcc/stor-layout.c
parent5cc6d735d73e4810078b05e651751ba7b84539be (diff)
downloadgcc-1a8bf94d3197b82fc41436b2a3043f339536f603.tar.gz
2008-03-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133366 * gcc/basilys.c: pass_basilys is now a gimple_opt_pass. * gcc/tree-pass.h: pass_basilys is now a gimple_opt_pass. pass_compiler_probe now declared here. * gcc/passes.c: using new struct-s for passes. * gcc/compiler-probe.h: moved pass_compiler_probe from here to tree-pass.h * gcc/compiler-probe.c: pass_compiler_probe is a gimple_opt_pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 67e4c25fbdc..ff46687834d 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -699,6 +699,9 @@ update_alignment_for_field (record_layout_info rli, tree field,
&& ! integer_zerop (DECL_SIZE (rli->prev_field)))))
{
unsigned int type_align = TYPE_ALIGN (type);
+ unsigned int type_size
+ = tree_low_cst (TYPE_SIZE (type), 1);
+ type_align = MAX (type_align, type_size);
type_align = MAX (type_align, desired_align);
if (maximum_field_alignment != 0)
type_align = MIN (type_align, maximum_field_alignment);