[Bug target/96377] [10/11 Regression] GCC 10.2/11 doesn't build Linux kernel anymore

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 29 16:40:55 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96377

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This dates back to
https://gcc.gnu.org/legacy-ml/gcc-patches/2004-06/msg00288.html
Dunno, do we want to never strip attributes from VECTOR_TYPEs and only strip
them that way from non-VECTOR_TYPEs?  Or only strip some attributes and keep
others?
Or just add a if (t1 == t2) return t1; before the attribute stripping (perhaps
for VECTOR_TYPEs only)?
Note, due to the typedef __Uint8x16_t uint8x16_t; on this testcase t1 and t2
are equal and are the typedef file, and because they are unqualified, we don't
use TYPE_MAIN_VARIANT (which is the __Uint8x16_t type).
What is the desirable behavior for the common type if one is the aarch64
specific vector and the other generic vector with the same mode?
The C++ behavior for vector types in cp_common_type is that it will merge
attributes from both types, and if one is TYPE_UNSIGNED, pick that one,
otherwise pick the other one.  So in that case the ARM specific vector type
wins.

I must say I'm surprised that the 10.2 version of the patch also matters,
perhaps the FE isn't using the target hook to compare attributes, but rather
just compares TYPE_MAIN_VARIANT or something similar to determine if the
initializer is initializing a whole vector or an element of the vector.


More information about the Gcc-bugs mailing list