> It's not fully fixing the issue as _all_ aggregates that may be > accessed beyond their declarations size are broken.
Sure, but we don't need to support such nonsense in the general case. And not every language allows it, for example in Ada you cannot do that of course. > I'd say we should simply stop giving aggregates a mode besides BLKmode. > What can possibly break with that ... Nothing, but this will unnecessarily pessimize well-behaved languages, e.g. in Ada we overalign structures in some cases to give them integral modes. > struct { char c[4]; } > > has SImode, we accept all trailing arrays as possibly extending beyond the > struct declaration. > > Alternatively all structs with aggregate members should not have a > mode != BLKmode. This could work as well, although I'd restrict this to arrays, recursively. -- Eric Botcazou