https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98852
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org --- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- There's a related C++ problem: #include <arm_neon.h> typedef int32_t vint32 __attribute__((vector_size(16))); typedef uint32_t vuint32 __attribute__((vector_size(16))); template<typename T> struct id; template<> struct id<vint32> { static const int value = 1; }; template<> struct id<vuint32> { static const int value = 2; }; template<> struct id<int32x4_t> { static const int value = 3; }; template<> struct id<uint32x4_t> { static const int value = 4; }; #define CHECK_TYPE(EXPR, TYPE) \ static_assert(id<decltype(EXPR)>::value == id<TYPE>::value, "foo") void f (vint32 sg, vuint32 ug, int32x4_t sn, uint32x4_t un) { CHECK_TYPE (sg + un, uint32x4_t); CHECK_TYPE (ug + sn, vuint32); // Fails in 10.2+ CHECK_TYPE (sn + ug, vuint32); // Fails in 10.2+ CHECK_TYPE (un + sg, uint32x4_t); }