https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110193
Bug ID: 110193
Summary: d_signed_or_unsigned_type is invoked for vector types
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
It looks like this function (via a langhook) is invoked on VECTOR_TYPE and
the implementation assumes it works on integer types only:
if (TYPE_PRECISION (type) == TYPE_PRECISION (d_cent_type))
return unsignedp ? d_ucent_type : d_cent_type;
if (TYPE_PRECISION (type) == TYPE_PRECISION (d_long_type))
return unsignedp ? d_ulong_type : d_long_type;
...
TYPE_PRECISION for vectors is TYPE_VECTOR_SUBPARTS so in this case
for any V8mode vector we'd return d_{u,}cent_type. The C familiy
frontend similar routine does
type1 = TYPE_MAIN_VARIANT (type);
if (type1 == signed_char_type_node || type1 == char_type_node || type1 ==
unsigned_char_type_node)
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (type1 == integer_type_node || type1 == unsigned_type_node)
return unsignedp ? unsigned_type_node : integer_type_node;
...