Fixes the return codes to match the documentation of
Target::isVectorTypeSupported.
Reviewed-on: https://github.com/dlang/dmd/pull/11830
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd
3a9790525
* d-target.cc (Target::isVectorTypeSupported): Adjust return codes for
invalid size and invalid base type.
{
/* Size must be greater than zero, and a power of two. */
if (sz <= 0 || sz & (sz - 1))
- return 2;
+ return 3;
/* __vector(void[]) is treated same as __vector(ubyte[]) */
if (type == Type::tvoid)
/* No support for non-trivial types, complex types, or booleans. */
if (!type->isTypeBasic () || type->iscomplex () || type->ty == Tbool)
- return 3;
+ return 2;
/* In [simd/vector extensions], which vector types are supported depends on
the target. The implementation is expected to only support the vector
tree ctype = build_vector_type (build_ctype (type), nunits);
if (!targetm.vector_mode_supported_p (TYPE_MODE (ctype)))
- return 3;
+ return 2;
return 0;
}
-e49192807967c6f11252683a731c5a0159ef36da
+3a979052509fff8170ba80e48817377a60e78eb3
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
case 1: // no support at all
error(loc, "SIMD vector types not supported on this platform");
return terror;
- case 2: // invalid size
- error(loc, "%d byte vector type %s is not supported on this platform", sz, toChars());
- return terror;
- case 3: // invalid base type
+ case 2: // invalid base type
error(loc, "vector type %s is not supported on this platform", toChars());
return terror;
+ case 3: // invalid size
+ error(loc, "%d byte vector type %s is not supported on this platform", sz, toChars());
+ return terror;
default:
assert(0);
}