7868 Commits

Author SHA1 Message Date
Alex Rønne Petersen
abd73083e4
test: skip dumpCurrentStackTrace test on architectures with no unwind support 2025-09-18 12:42:24 +02:00
Alex Rønne Petersen
e06bcd74c3
test: re-enable test-std for loongarch64-linux 2025-09-18 12:42:24 +02:00
Alex Rønne Petersen
f90548e740
test: skip alternative constraints behavior test on LoongArch
https://github.com/llvm/llvm-project/issues/159200
2025-09-18 12:42:14 +02:00
Silver
65a6bf1267
fix handling of comptime-only union fields in Type.getUnionLayout (#25182)
Fixes #25180
2025-09-17 21:39:47 -07:00
Andrew Kelley
220c679523
Merge pull request #25197 from rootbeer/24380-flaky-sigset-test
Re-enable std.posix "sigset_t bits" test
2025-09-17 21:19:01 -07:00
Jacob Young
09bc118c9f Elf: implement linksection
Closes #24330
2025-09-17 21:16:23 -07:00
Andrew Kelley
8e9f2f02d2
Merge pull request #25201 from jacobly0/x86_64-addsat
x86_64: fix strictness edge cases in `+|`
2025-09-17 21:15:03 -07:00
Alex Rønne Petersen
a5bb7108a9
test: move glibc_compat from link to standalone tests
This is not really testing the linker.
2025-09-16 23:39:29 +02:00
Alex Rønne Petersen
ab1946de92
test: remove @cImport usage in interdependent_static_c_libs 2025-09-16 23:39:29 +02:00
Alex Rønne Petersen
4dba253cd2
test: pull tests in test/cases/llvm/ up to test/cases/
There is nothing inherently LLVM-specific about any of these.
2025-09-16 23:39:29 +02:00
Alex Rønne Petersen
589e564f16
test: delete old stage1 compile_errors tests
generic_function_returning_opaque_type.zig was salvaged as it's still worth
having.
2025-09-16 23:39:29 +02:00
Alex Rønne Petersen
2e3fac3626
test: rename backend=stage2 to backend=selfhosted, and add backend=auto
backend=auto (now the default if backend is omitted) means to let the compiler
pick whatever backend it wants as the default. This is important for platforms
where we don't yet have a self-hosted backend, such as loongarch64.

Also purge a bunch of redundant target=native.
2025-09-16 23:39:26 +02:00
Alex Rønne Petersen
d5c73a44b7
test: rename issue_8550 standalone test to compile_asm 2025-09-16 14:51:29 +02:00
Alex Rønne Petersen
fc20677fde
test: remove test-compare-output and test-asm-link tests
These were low value and unfocused tests. We already have coverage of the
important aspects of these tests elsewhere. Additionally, there was really no
need for these to have their own test harness.
2025-09-16 14:51:03 +02:00
mlugg
8744865425 frontend: fix reference tracking through coerced function bodies
This bug was manifesting for user as a nasty link error because they
were calling their application's main entry point as a coerced function,
which essentially broke reference tracking for the entire ZCU, causing
exported symbols to silently not get exported.

I've been a little unsure about how coerced functions should interact
with the unit graph before, but the solution is actually really obvious
now: they shouldn't! `Sema` is now responsible for unwrapping
possibly-coerced functions *before* queuing analysis or marking unit
references. This makes the reference graph optimal (there are no
redundant edges representing coerced versions of the same function) and
simplifies logic elsewhere at the expense of just a few lines in Sema.
2025-09-15 11:29:31 +01:00
mlugg
32a1aabff7 std.math.big.int: normalize zero result for small multiplications
Resolves: #25221
2025-09-13 17:13:27 +01:00
Sardorbek Imomaliev
6b8cef8107
Fix standalone test simple/cat/main.zig after Writergate update (#25188)
* Make cat in test/standalone/simple working again

- Fixes:
    zig/0.15.1/lib/zig/std/Io/Writer.zig:939:11: 0x1049aef63 in sendFileAll (nclip)
        assert(w.buffer.len > 0);
- because we are no using non zero buffers for stdout - "do not forget to flush"

* replace std.fs with fs because we are already importing it
2025-09-11 16:43:11 +00:00
Jacob Young
e313b387a0 x86_64: delete usages of avx2 vpack?s??
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-10 22:40:26 -04:00
Jacob Young
1a0a9d7d59 x86_64: fix strictness edge cases in +|
Closes #25145
2025-09-10 21:01:13 -04:00
Pat Tullmann
bd4617033e standalone posix tests for sigaction
Fixes #24380
2025-09-09 22:07:44 -07:00
Pat Tullmann
ca09629bee standalone posix tests for relative path linking 2025-09-09 22:07:44 -07:00
Pat Tullmann
aa1d2adffc standalone posix test for env vars 2025-09-09 22:07:44 -07:00
Pat Tullmann
020eb622ee standalone posix test for current working directory 2025-09-09 22:07:44 -07:00
Pat Tullmann
c614d8d008 standalone posix tests: add skeleton
Add build.zig, README and empty test files.
2025-09-09 22:07:44 -07:00
Andrew Kelley
7666d5fc26 add compile error test case 2025-09-07 23:03:06 -07:00
Andrew Kelley
2d9df0bb1a behavior tests: remove one dependency on std lib 2025-09-07 20:23:05 -07:00
Andrew Kelley
5701617b27 wasm backend: disable failing behavior tests 2025-09-07 20:11:37 -07:00
Andrew Kelley
4f7aecd348 disable failing behavior test on stage2_aarch64 2025-09-05 23:47:56 -07:00
Andrew Kelley
5dc5bf6a6b add compile error test case for new error 2025-09-05 19:55:45 -07:00
Andrew Kelley
b9a63433b7 behavior tests: update for new requirement
packed union fields must all have matching bit sizes
2025-09-05 19:44:54 -07:00
Luna Schwalbe
63ab0c0302
Reenable vector tests for armeb/thumbeb
https://github.com/ziglang/zig/issues/22060 has been fixed by upstream.
2025-09-04 16:23:18 +02:00
Alex Rønne Petersen
b2ef6d01ff
Revert "test: disable non-native loongarch64 behavior and std tests"
This reverts commit f4ed35f800396f12c7cd6aa1f70cf2555ddf7c84.

This should no longer be needed now that stack traces are disabled on loongarch.

closes #24405
2025-09-03 11:32:57 +02:00
Andrew Kelley
ec36e0609f delete behavior test that depends on std.fmt
behavior tests should have minimal dependency on std
2025-08-31 12:49:18 -07:00
Andrew Kelley
b7104231af
Merge pull request #25077 from ziglang/GenericReader
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30 12:43:52 -07:00
Andrew Kelley
31a0c2a36a child process test: preemptively use streaming mode
works around #24984
2025-08-30 00:48:50 -07:00
Andrew Kelley
9adcc31ca3 update tools and other miscellaneous things to new APIs 2025-08-30 00:48:50 -07:00
Andrew Kelley
fadd268a60 upgrade more old API uses 2025-08-30 00:48:50 -07:00
Alex Rønne Petersen
0071917621
test: disable some varargs behavior tests on RISC-V due to LLVM 21 regression
https://github.com/ziglang/zig/issues/25064
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
3a5b7a31ff
test: use -Wno-unterminated-string-initialization for cbe tests
https://github.com/llvm/llvm-project/issues/153314
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
2cb412ff1b
test: re-enable a bunch of vector behavior tests on hexagon 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
0683e1564c
test: use long calls for hexagon-linux module tests 2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
f149112951
test: expand C ABI test coverage to hexagon-linux-musl 2025-08-30 06:36:41 +02:00
Andrew Kelley
79f267f6b9 std.Io: delete GenericReader
and delete deprecated alias std.io
2025-08-29 17:14:26 -07:00
Andrew Kelley
4b948e8556
Merge pull request #25036 from ziglang/GenericWriter
std.Io: delete GenericWriter, AnyWriter, and null_writer
2025-08-29 03:48:45 -07:00
Andrew Kelley
640c11171b LLVM backend:fix align 1 sret parameter load returned
closes #25067
2025-08-29 03:37:18 -07:00
Andrew Kelley
f7884961c2 update more to avoid GenericWriter 2025-08-28 18:30:57 -07:00
Andrew Kelley
4f510dba10 behavior tests: remove "variadic functions" dependency on std lib 2025-08-28 18:30:57 -07:00
Andrew Kelley
ea3471288a update GenericWriter usage found by test-cases 2025-08-28 18:30:57 -07:00
David Rubin
73a0b5441b
AstGen: forward result type through unary float builtins
Uses a new `float_op_result_ty` ZIR instruction tag.
2025-08-28 15:46:12 +01:00
mlugg
a31950aa57 std.debug: remove @frameAddress() "UAF"
We can't call `@frameAddress()` and then immediately `return`! That
invalidates the frame. This *usually* isn't a problem, because the stack
walk `next` call will *probably* have a stack frame and it will
*probably* be at the exact same address, but neither of those is a
guarantee. On powerpc, presumably some unfortunate inlining was going
on, so this frame was indeed invalidated when we started walking frames.

We need to explicitly pass `@frameAddress` into any function which will
return before we actually walk the stack. Pretty simple patch.

Resolves: #24970
2025-08-28 10:56:11 +01:00