Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/dmd/typesem.d
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,8 @@ extern(C++) Type typeSemantic(Type t, Loc loc, Scope* sc)

case 3:
// invalid size
if (sz == 32)
deprecation(loc, "%d byte vector types are only supported with -mcpu=avx", sz, mtype.toChars());
else
{
.error(loc, "%d byte vector type `%s` is not supported on this platform", sz, mtype.toChars());
return error();
}
break;
.error(loc, "%d byte vector type `%s` is not supported on this platform", sz, mtype.toChars());
return error();
}
return merge(mtype);
}
Expand Down
27 changes: 0 additions & 27 deletions test/compilable/vector_types.d

This file was deleted.

22 changes: 22 additions & 0 deletions test/fail_compilation/vector_types.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
REQUIRED_ARGS: -o-
PERMUTE_ARGS:
TEST_OUTPUT:
DISABLED: freebsd32 linux32 osx32 win32
---
fail_compilation/vector_types.d(16): Error: 32 byte vector type `__vector(double[4])` is not supported on this platform
fail_compilation/vector_types.d(17): Error: 32 byte vector type `__vector(float[8])` is not supported on this platform
fail_compilation/vector_types.d(18): Error: 32 byte vector type `__vector(ulong[4])` is not supported on this platform
fail_compilation/vector_types.d(19): Error: 32 byte vector type `__vector(uint[8])` is not supported on this platform
fail_compilation/vector_types.d(20): Error: 32 byte vector type `__vector(ushort[16])` is not supported on this platform
fail_compilation/vector_types.d(21): Error: 32 byte vector type `__vector(ubyte[32])` is not supported on this platform
---
*/
version (D_SIMD):
alias a = __vector(double[4]);
alias b = __vector(float[8]);
alias c = __vector(ulong[4]);
alias d = __vector(uint[8]);
alias e = __vector(ushort[16]);
alias f = __vector(ubyte[32]);