Message ID | 20230628155347.2144291-1-ibuclaw@gdcproject.org |
---|---|
State | New |
Headers | show |
Series | [committed] d: Fix d_signed_or_unsigned_type is invoked for vector types (PR110193) | expand |
diff --git a/gcc/d/types.cc b/gcc/d/types.cc index a4c05bfb75f..bdf07f83d4b 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -49,8 +49,8 @@ along with GCC; see the file COPYING3. If not see static tree d_signed_or_unsigned_type (int unsignedp, tree type) { - if (TYPE_UNSIGNED (type) == (unsigned) unsignedp) - return type; + if (VECTOR_TYPE_P (type) || !ANY_INTEGRAL_TYPE_P (type)) + return signed_or_unsigned_type_for (unsignedp, type); if (TYPE_PRECISION (type) == TYPE_PRECISION (d_cent_type)) return unsignedp ? d_ucent_type : d_cent_type;