aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
AgeCommit message (Collapse)Author
2025-09-17fix handling of comptime-only union fields in `Type.getUnionLayout` (#25182)Silver
Fixes #25180
2025-09-17Merge pull request #25201 from jacobly0/x86_64-addsatAndrew Kelley
x86_64: fix strictness edge cases in `+|`
2025-09-13std.math.big.int: normalize zero result for small multiplicationsmlugg
Resolves: #25221
2025-09-10x86_64: delete usages of avx2 `vpack?s??`Jacob Young
This instruction actually has fairly useless semantics, and even the cases that were semantically correct could save 1 cycle of latency by using a different sequnce involving the avx version instead. Closes #25174
2025-09-10x86_64: fix strictness edge cases in `+|`Jacob Young
Closes #25145
2025-09-07behavior tests: remove one dependency on std libAndrew Kelley
2025-09-07wasm backend: disable failing behavior testsAndrew Kelley
2025-09-05disable failing behavior test on stage2_aarch64Andrew Kelley
2025-09-05behavior tests: update for new requirementAndrew Kelley
packed union fields must all have matching bit sizes
2025-09-04Reenable vector tests for armeb/thumbebLuna Schwalbe
https://github.com/ziglang/zig/issues/22060 has been fixed by upstream.
2025-08-31delete behavior test that depends on std.fmtAndrew Kelley
behavior tests should have minimal dependency on std
2025-08-30test: disable some varargs behavior tests on RISC-V due to LLVM 21 regressionAlex Rønne Petersen
https://github.com/ziglang/zig/issues/25064
2025-08-30test: re-enable a bunch of vector behavior tests on hexagonAlex Rønne Petersen
2025-08-29Merge pull request #25036 from ziglang/GenericWriterAndrew Kelley
std.Io: delete GenericWriter, AnyWriter, and null_writer
2025-08-29LLVM backend:fix align 1 sret parameter load returnedAndrew Kelley
closes #25067
2025-08-28behavior tests: remove "variadic functions" dependency on std libAndrew Kelley
2025-08-28update GenericWriter usage found by test-casesAndrew Kelley
2025-08-28AstGen: forward result type through unary float builtinsDavid Rubin
Uses a new `float_op_result_ty` ZIR instruction tag.
2025-08-15Add test for passing extern function to functionantlilja
2025-08-13Merge pull request #24816 from mlugg/small-fixesMatthew Lugg
two small fixes
2025-08-13Merge pull request #24674 from Justus2308/undef-shift-bitwiseMatthew Lugg
Sema: Improve comptime arithmetic undef handling
2025-08-13sema: strip `@splat` operand result type before checking itDavid Rubin
2025-08-13Merge pull request #24381 from Justus2308/switch-better-underscoreMatthew Lugg
Enhance switch on non-exhaustive enums
2025-08-13llvm: unions which are equivalent to enums are not by-refmlugg
The LLVM backend lowers unions where all fields are zero-bit as equivalent to their backing enum, and expects them to have the same by-ref-ness in at least one place in the backend, probably more. Resolves: #23577
2025-08-12make `>>` a compile error with any undef arg ; add a bunch of test casesJustus Klausecker
2025-08-12Sema: Improve comptime arithmetic undef handlingJustus Klausecker
This commit expands on the foundations laid by https://github.com/ziglang/zig/pull/23177 and moves even more `Sema`-only functionality from `Value` to `Sema.arith`. Specifically all shift and bitwise operations, `@truncate`, `@bitReverse` and `@byteSwap` have been moved and adapted to the new rules around `undefined`. Especially the comptime shift operations have been basically rewritten, fixing many open issues in the process. New rules applied to operators: * `<<`, `@shlExact`, `@shlWithOverflow`, `>>`, `@shrExact`: compile error if any operand is undef * `<<|`, `~`, `^`, `@truncate`, `@bitReverse`, `@byteSwap`: return undef if any operand is undef * `&`, `|`: Return undef if both operands are undef, turn undef into actual `0xAA` bytes otherwise Additionally this commit canonicalizes the representation of aggregates with all-undefined members in the `InternPool` by disallowing them and enforcing the usage of a single typed `undef` value instead. This reduces the amount of edge cases and fixes a bunch of bugs related to partially undefined vecs. List of operations directly affected by this patch: * `<<`, `<<|`, `@shlExact`, `@shlWithOverflow` * `>>`, `@shrExact` * `&`, `|`, `~`, `^` and their atomic rmw + reduce pendants * `@truncate`, `@bitReverse`, `@byteSwap`
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-11cbe: emit `nonstring` attributeJacob Young
Closes #24545
2025-08-09test: skip tests that were not meant to pass for spirvAli Cheraghi
2025-08-07Merge pull request #24661 from alichraghi/spv4Andrew Kelley
spirv: refactor and remove deduplication ISel
2025-08-07address commentsJustus Klausecker
2025-08-07Add support for both '_' and 'else' prongs at the same time in switch statementsJustus Klausecker
If both are used, 'else' handles named members and '_' handles unnamed members. In this case the 'else' prong will be unrolled to an explicit case containing all remaining named values.
2025-08-07Permit explicit tags with '_' switch prongJustus Klausecker
Mainly affects ZIR representation of switch_block[_ref] and special prong (detection) logic for switch. Adds a new SpecialProng tag 'absorbing_under' that allows specifying additional explicit tags in a '_' prong which are respected when checking that every value is handled during semantic analysis but are not transformed into AIR and instead 'absorbed' by the '_' branch.
2025-08-07Merge pull request #24199 from Justus2308/24106-fmt-castsMatthew Lugg
zig fmt: canonicalize nested cast builtin order
2025-08-06Sema: fix initializing comptime-known constant with OPV union fieldmlugg
Resolves: #24716
2025-08-03zig fmt: apply new cast builtin orderJustus Klausecker
2025-08-02disallow alignment on packed union fieldsDavid Rubin
2025-08-02spirv: refactorAli Cheraghi
2025-08-01remove usages of `.alignment = 0`David Rubin
2025-07-31Sema: disallow slicing many-item pointer with different sentineldweiller
This change prevents adding or changing the sentinel in the type of a many-item pointer via the slicing syntax `ptr[a.. :S]`.
2025-07-31Merge pull request #24537 from IOKG04/some-documentation-updates-0Matthew Lugg
some small langref changes
2025-07-30Merge pull request #24278 from gooncreeper/atomic-fixesMatthew Lugg
atomic fixes and clarification
2025-07-30Sema: remove incorrect safety check for saturating left shiftJustus Klausecker
2025-07-30llvm: fix atomic widening of packed structsKendall Condon
Additionally, disable failing big-endian atomic test also improve test paramaters to catch this when condition is removed also some other cleanups
2025-07-29disable more failing testsmlugg
Wow, *lots* of backends were reliant on Sema doing the heavy lifting for them. CBE, Wasm, and SPIR-V have all regressed in places now that they actually need to, like, initialize unions and such.
2025-07-29Sema: remove redundant comptime-known initializer trackingmlugg
This logic predates certain Sema enhancements whose behavior it essentially tries to emulate in one specific case in a problematic way. In particular, this logic handled initializing comptime-known `const`s through RLS, which was reworked a few years back in 644041b to not rely on this logic, and catching runtime fields in comptime-only initializers, which has since been *correctly* fixed with better checks in `Sema.storePtr2`. That made the highly complex logic in `validateStructInit`, `validateUnionInit`, and `zirValidatePtrArrayInit` entirely redundant. Worse, it was also causing some tracked bugs, as well as a bug which I have identified and fixed in this PR (a corresponding behavior test is added). This commit simplifies union initialization by bringing the runtime logic more in line with the comptime logic: the tag is now always populated by `Sema.unionFieldPtr` based on `initializing`, where this previously happened only in the comptime case (with `validateUnionInit` instead handling it in the runtime case). Notably, this means that backends are now able to consider getting a pointer to an inactive union field as Illegal Behavior, because the `set_union_tag` instruction now appears *before* the `struct_field_ptr` instruction as you would probably expect it to. Resolves: #24520 Resolves: #24595
2025-07-28aarch64: implement scalar `@mod`Jacob Young
2025-07-28aarch64: workaround some optional/union issuesJacob Young
2025-07-28Merge branch 'ziglang:master' into some-documentation-updates-0Rue
2025-07-27aarch64: fix error union constantsJacob Young