On Wed, Jan 16, 2019 at 12:59 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Wed, Jan 16, 2019 at 12:50:23PM +0100, Richard Biener wrote: > > I guess so. There's not much we can do about this other than making > > DECL_MODE dynamic the same way as TYPE_MODE. I still believe > > this is the wrong direction and instead RTL expansion should properly > > adjust DECL_RTL and generally on GIMPLE we shouldn't need to > > commit to modes early at all... > > Are there cases where DECL_MODE (decl) should not be equal to > TYPE_MODE (TREE_TYPE (decl))? Is that for structs with flexible array > members where the initializer is filling up the flexible array member, or > something different?
ISTR seeing the most differences in FIELD_DECL modes (bitfields? packed fields getting BLKmode but types not being packed/etc.?) > E.g. in expand_debug* it shouldn't be hard to use TYPE_MODE if > VECTOR_TYPE_P (TREE_TYPE (decl)), but there are many other uses of > DECL_MODE. > > Jakub