Hi Will, On Tue, Sep 01, 2020 at 09:00:20PM -0500, will schmidt wrote: > This corrects an issue with the powerpc vector long long subtypes. > As reported by SjMunroe in PR96139. When building some code with -Wall > and attempting to print an element of a "long long vector" with a long long > printf format string, we will report a error because the vector sub-type > was improperly defined as int. > > When defining a V2DI_type_node we use a TARGET_POWERPC64 ternary to > define the V2DI_type_node with "vector long" or "vector long long". > We also need to specify the proper sub-type when we define the type.
> - V2DI_type_node = rs6000_vector_type (TARGET_POWERPC64 ? "__vector long" > - : "__vector long long", > - intDI_type_node, 2); > + V2DI_type_node > + = rs6000_vector_type (TARGET_POWERPC64 > + ? "__vector long" : "__vector long long", > + TARGET_POWERPC64 > + ? long_long_integer_type_node : intDI_type_node, > + 2); Can't you just use long_long_integer_type_node in all cases? Or, what else is intDI_type_node for 32 bit? > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/pr96139-a.c > @@ -0,0 +1,32 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -Wall -m32 " } */ (trailing space, here and elsewhere -- not that it matters of course) Segher