On Tue, Jun 30, 2020 at 12:38 AM Roger Sayle <ro...@nextmovesoftware.com> wrote: > > > It turns out that the ICE diagnosed/fixed in my earlier nvptx patch, caused by > TYPE_SIZE(type) being zero during error handling in gcc.dg/attr-vector_size.c > is actually fairly common among backends, and is known in bugzilla as > PR middle-end/90597, apparently a recent regression. > > The following patch should fix the default implementation of > TARGET_VECTOR_ALIGNMENT, known as default_vector_alignment, > using the same logic. This patch is relatively untested, a "make bootstrap" > on x86_64-pc-linux-gnu confirms that this code compiles without problems, > but doesn't actually exercise the code itself. > > OK for mainline? Thanks in advance to anyone who can confirm this patch > resolves the unexpected failure of gcc.dg/attr-vector_size.c on an affected > platform (i.e. a backend that doesn't define TARGET_VECTOR_ALIGNMENT).
OK. > 2020-06-30 Roger Sayle <ro...@nextmovesoftware.com> > > PR middle-end/90597 > gcc/ChangeLog: > * targhooks.c (default_vector_alignment): Return at least the > GET_MODE_ALIGNMENT for the type's mode. > > Thanks, > Roger > -- > Roger Sayle > NextMove Software > Cambridge, UK >