On Fri, 15 Apr 2011, Diego Novillo wrote: > On Fri, Apr 15, 2011 at 04:56, Richard Guenther <rguent...@suse.de> wrote: > > >> @@ -518,7 +518,8 @@ pack_ts_type_value_fields (struct bitpack_d *bp, tree > >> expr) > >> bp_pack_value (bp, TYPE_USER_ALIGN (expr), 1); > >> bp_pack_value (bp, TYPE_READONLY (expr), 1); > >> bp_pack_value (bp, TYPE_ALIGN (expr), HOST_BITS_PER_INT); > >> - bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0 ? 0 : -1, > >> HOST_BITS_PER_INT); > >> + bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0 ? 0 : -1, > >> + BITS_PER_BITPACK_WORD); > > > > As we only want to stream alias-set zeros just change it to a single bit, > > like > > > > bp_pack_value (bp, TYPE_ALIAS_SET (expr) == 0, 1); > > > > and on the reader side restore either a zero or -1. > > Ah, yes. Much better. > > > As for the -1 case, it's simply broken use of the interface. > > Which would've been caught by the assertion. How about this, we keep > the asserts with #ifdef ENABLE_CHECKING. This would've saved me some > ugly debugging.
I think we should rather add the masking. The assert would only trigger for particular values, not for bogus use of the interface (you get sign-extension for signed arguments). Richard.