On Fri, Jun 14, 2013 at 01:07:01AM +0930, Alan Modra wrote: > @@ -5774,10 +5818,11 @@ offsettable_ok_by_alignment (rtx op, HOST_WIDE_INT > type = TREE_TYPE (decl); > > dalign = TYPE_ALIGN (type); > + dalign = DATA_ABI_ALIGNMENT (type, dalign); > if (CONSTANT_CLASS_P (decl)) > dalign = CONSTANT_ALIGNMENT (decl, dalign); > else > - dalign = DATA_ALIGNMENT (decl, dalign); > + dalign = DATA_ALIGNMENT (type, dalign); > > if (dsize == 0) > {
What is this code trying to do? Shouldn't it just use DECL_ALIGN which should be set to the right value from get_variable_alignment? I mean, if !decl_binds_to_current_def_p (decl), then using DATA_ALIGNMENT or CONSTANT_ALIGNMENT (for anything but actually emitting the var into object, or just as an optimization hint that very likely the decl will be aligned enough, but not guaranteed), which are optimization, is wrong (an ABI problem). Jakub