-420cce2a654f14b8de4a75cbb5d4203fce8d4e0f
+f30c5dc790c17914463879157447acc671518735
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
IntRange IntRange::fromType(Type *type, bool isUnsigned)
{
- if (!type->isintegral())
+ if (!type->isintegral() || type->toBasetype()->ty == Tvector)
return widest();
uinteger_t mask = type->sizemask();
IntRange& IntRange::cast(Type *type)
{
- if (!type->isintegral())
+ if (!type->isintegral() || type->toBasetype()->ty == Tvector)
return *this;
else if (!type->isunsigned())
return castSigned(type->sizemask());
IntRange& IntRange::castUnsigned(Type *type)
{
- if (!type->isintegral())
+ if (!type->isintegral() || type->toBasetype()->ty == Tvector)
return castUnsigned(UINT64_MAX);
else if (type->toBasetype()->ty == Tdchar)
return castDchar();
--- /dev/null
+/*
+PERMUTE_ARGS:
+REQUIRED_ARGS: -m64
+TEST_OUTPUT:
+---
+fail_compilation/fail19898b.d(18): Error: cannot implicitly convert expression `m` of type `S` to `__vector(int[4])`
+fail_compilation/fail19898b.d(18): Error: incompatible types for `(__key2) != (__limit3)`: both operands are of type `__vector(int[4])`
+fail_compilation/fail19898b.d(18): Error: cannot cast expression `__key2` of type `__vector(int[4])` to `S`
+---
+*/
+struct S
+{
+ int a;
+}
+
+void f (__vector(int[4]) n, S m)
+{
+ foreach (i; m .. n)
+ cast(void)n;
+}
+