From: Iain Buclaw Date: Sun, 11 Oct 2020 20:27:00 +0000 (+0200) Subject: d: Merge upstream dmd 3a9790525 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19f6b41a3a12c67ccbc51c5b729954c4ccaf1176;p=gcc.git d: Merge upstream dmd 3a9790525 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. --- diff --git a/gcc/d/d-target.cc b/gcc/d/d-target.cc index 4a38cca56b4..78f14203b5c 100644 --- a/gcc/d/d-target.cc +++ b/gcc/d/d-target.cc @@ -241,7 +241,7 @@ Target::isVectorTypeSupported (int sz, Type *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) @@ -249,7 +249,7 @@ Target::isVectorTypeSupported (int sz, Type *type) /* 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 @@ -258,7 +258,7 @@ Target::isVectorTypeSupported (int sz, Type *type) tree ctype = build_vector_type (build_ctype (type), nunits); if (!targetm.vector_mode_supported_p (TYPE_MODE (ctype))) - return 3; + return 2; return 0; } diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index 4676645f971..8a59cbde78e 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -e49192807967c6f11252683a731c5a0159ef36da +3a979052509fff8170ba80e48817377a60e78eb3 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/mtype.c b/gcc/d/dmd/mtype.c index 36471557dfc..bc66be028c1 100644 --- a/gcc/d/dmd/mtype.c +++ b/gcc/d/dmd/mtype.c @@ -3824,12 +3824,12 @@ Type *TypeVector::semantic(Loc loc, Scope *sc) 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); }