zig/test/behavior
Xavier Bouchoux c0fd64af03 Sema: fix coerceArrayLike() for vectors with padding
as explainded at https://llvm.org/docs/LangRef.html#vector-type :

"In general vector elements are laid out in memory in the same way as array types.
Such an analogy works fine as long as the vector elements are byte sized.
However, when the elements of the vector aren’t byte sized it gets a bit more complicated.
One way to describe the layout is by describing what happens when a vector such
as <N x iM> is bitcasted to an integer type with N*M bits, and then following the
rules for storing such an integer to memory."

"When <N*M> isn’t evenly divisible by the byte size the exact memory layout
is unspecified (just like it is for an integral type of the same size)."
2024-01-29 14:29:14 -07:00
..
bugs x86_64: add missing padding to global unions 2023-06-25 19:14:03 -04:00
hasdecl
import
namespace_depends_on_compile_var
pub_enum
usingnamespace stage2: sparc64: Skip unimplemented tests 2022-12-10 21:51:46 +07:00
align.zig add behavior test for sub-aligned field access 2023-08-01 00:39:30 -07:00
alignof.zig behavior: correct alignment for elements and slices of aligned array 2023-06-27 19:57:23 -04:00
array.zig behavior: test slicing array of zero-sized values 2023-06-28 14:00:18 +03:00
asm.zig llvm: support read-write output constraints in assembly 2023-07-29 09:49:04 -07:00
async_fn.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
atomics.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
await_struct.zig remove references to stage1 in behavior tests 2022-12-06 19:06:48 -07:00
basic.zig std.cstr: deprecate namespace 2023-06-25 14:51:03 -07:00
bit_shifting.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
bitcast.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
bitreverse.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
bool.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
builtin_functions_returning_void_or_noreturn.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
byteswap.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
byval_arg_var.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
c_char_signedness.zig spirv: disable new behavior tests that do not pass 2023-07-01 19:45:09 +02:00
call.zig spirv: disable new behavior tests that do not pass 2023-07-01 19:45:09 +02:00
call_tail.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
cast.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
cast_int.zig wasm: correctly intcast signed integers 2023-07-22 02:12:07 +02:00
comptime_memory.zig spirv: disable new behavior tests that do not pass 2023-07-01 19:45:09 +02:00
const_slice_child.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
decltest.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
defer.zig add behavior test for defer assign 2023-07-26 19:02:02 -07:00
duplicated_test_names.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
empty_file_level_struct.zig fix overflow found while fuzzing 2022-12-23 23:10:04 +02:00
empty_file_level_union.zig fix overflow found while fuzzing 2022-12-23 23:10:04 +02:00
empty_tuple_fields.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
empty_union.zig enable passing behavior tests 2023-05-31 18:04:33 +02:00
enum.zig spirv: disable new behavior tests that do not pass 2023-07-01 19:45:09 +02:00
error.zig frontend: make fn calls byval; fix false positive isNonErr 2023-07-27 10:12:08 -07:00
eval.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
export.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
export_self_referential_type_info.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
extern_struct_zero_size_fields.zig Allow zero-sized fields in extern structs (#16404) 2023-07-29 12:45:01 -04:00
field_parent_ptr.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
floatop.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
fn.zig std: cleanup asm usage 2023-07-31 01:58:10 -04:00
fn_delegation.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
fn_in_struct_in_comptime.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
for.zig AstGen: fix missing deferred ref 2023-07-26 22:19:30 -07:00
generics.zig InternPool: add func_coerced handling to funcIesResolved 2023-07-23 17:47:18 -07:00
hasdecl.zig Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen 2021-05-08 14:45:21 -07:00
hasfield.zig Sema: make @hasField support tuples too 2022-03-11 12:59:20 -07:00
if.zig behavior: if-@as-if chain 2023-06-27 19:57:23 -04:00
import.zig lint: duplicate import (#10519) 2022-01-07 00:06:06 -05:00
incomplete_struct_param_tld.zig stage2: sparc64: Skip unimplemented tests 2022-12-10 21:51:46 +07:00
inline_switch.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
int128.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
int_comparison_elision.zig Dwarf: fix overflow write byte_size 2023-05-15 03:07:51 -04:00
int_div.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
ir_block_deps.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
lower_strlit_to_vector.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
math.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
maximum_minimum.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
member_func.zig Zir: eliminate field_call_bind and field_call_bind_named 2023-05-20 12:27:48 -07:00
memcpy.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
memset.zig wasm: support memset for elem abi size > 1 2023-05-19 20:22:45 +02:00
merge_error_sets.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
muladd.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
namespace_depends_on_compile_var.zig CBE: enable more tests that are currently passing 2022-03-17 11:39:56 -07:00
null.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
optional.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
packed-struct.zig codegen: fix access to byte-aligned nested packed struct elems 2023-07-29 18:16:13 +02:00
packed-union.zig behavior: add coverage for no longer reproducing issue 2023-07-29 09:00:23 -07:00
packed_struct_explicit_backing_int.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
pointers.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
popcount.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
prefetch.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
ptrcast.zig add behavior test for comptime ptrcast packed struct 2023-07-26 19:02:02 -07:00
ptrfromint.zig spirv: disable new behavior tests that do not pass 2023-07-01 19:45:09 +02:00
pub_enum.zig spirv: lower get_union_tag 2023-05-20 18:43:26 +03:30
ref_var_in_if_after_if_2nd_switch_prong.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
reflection.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
return_address.zig enable passing behavior tests 2023-05-31 18:04:33 +02:00
saturating_arithmetic.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
select.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
shuffle.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
sizeof_and_typeof.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
slice.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
slice_sentinel_comptime.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
src.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
struct.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
struct_contains_null_ptr_itself.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
struct_contains_slice_of_itself.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
switch.zig add behavior test for switch nested break 2023-07-26 19:02:02 -07:00
switch_prong_err_enum.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
switch_prong_implicit_cast.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
this.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
threadlocal.zig x86_64: disable failing behavior test 2023-06-25 19:14:03 -04:00
translate_c_macros.h Translate-C Remainder Macro Fix 2022-11-03 14:07:00 +02:00
translate_c_macros.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
translate_c_macros_not_utf8.h translate-c: Escape non-ASCII characters that appear in macros 2022-09-10 01:50:17 +03:00
truncate.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
try.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
tuple.zig llvm: fix SysV C abi for structs smaller than two eightbytes 2023-07-28 19:27:08 -04:00
tuple_declarations.zig frontend: forbid packed and extern tuples 2023-07-25 21:45:33 -07:00
type.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
type_info.zig make @typeInfo not return private decls 2023-07-25 16:19:08 -07:00
type_info_only_pub_decls.zig make @typeInfo not return private decls 2023-07-25 16:19:08 -07:00
typename.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
undefined.zig spirv: more passing tests 2023-05-20 17:30:22 +02:00
underscore.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
union.zig add behavior test for union with 128 bit integer 2023-07-26 19:02:02 -07:00
union_with_members.zig enable passing behavior tests 2023-05-31 18:04:33 +02:00
usingnamespace.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
var_args.zig std: finish cleanup up asm 2023-07-31 03:49:21 -04:00
vector.zig Sema: fix coerceArrayLike() for vectors with padding 2024-01-29 14:29:14 -07:00
void.zig setup spirv backend in behavior tests 2023-05-11 20:31:52 +02:00
wasm.zig stage2: cleanups to wasm memory intrinsics 2022-03-03 18:31:55 -07:00
while.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00
widening.zig x86_64: rewrite casts 2023-05-18 20:42:38 -04:00
wrapping_arithmetic.zig all: replace comptime try with try comptime 2023-06-13 23:46:58 +06:00