Commit Graph

5300 Commits

Author SHA1 Message Date
Luuk de Gram
e4869eeac1
test/link: linker tests for all export cases
Adds a linker test case for each possible export case. This means
one where no exports are done (i.e. no flags set), when the -dynamic
flag is set, and finally when --export=<value> flag(s) are set.
2023-01-02 18:36:17 +01:00
Veikka Tuominen
58c1d98c14 add tests for fixed stage1 bugs
Closes #4144
Closes #4255
Closes #4372
Closes #4375
Closes #4380
Closes #4417
Closes #4423
Closes #4476
Closes #4528
Closes #4562
Closes #4572
Closes #4597
Closes #4639
Closes #4672
Closes #4782
Closes #4955
Closes #4984
Closes #4997
Closes #5010
Closes #5114
Closes #5166
Closes #5173
Closes #5276
2022-12-31 20:49:02 -05:00
Andrew Kelley
40ba4d4a89
Merge pull request #14102 from Luukdegram/wasm-undefined-symbols
WebAssembly: remove unconditional --allow-undefined flag
2022-12-29 17:59:44 -05:00
Andrew Kelley
9b665a59f2
Merge pull request #14101 from Vexu/stage1
add tests for fixed stage1 bugs
2022-12-29 15:33:45 -05:00
Veikka Tuominen
e0b6140009 Type: fix printing of default alignment on non-byte aligned pointers 2022-12-29 12:47:11 +02:00
Veikka Tuominen
9a0c593a54 add tests for fixed stage1 bugs
Closes #1957
Closes #1994
Closes #2140
Closes #2746
Closes #2802
Closes #2855
Closes #2895
Closes #2981
Closes #3054
Closes #3158
Closes #3234
Closes #3259
Closes #3371
Closes #3376
Closes #3387
Closes #3529
Closes #3653
Closes #3750
Closes #3778
Closes #3882
Closes #3915
Closes #3929
Closes #3961
Closes #3988
Closes #4123
Closes #7448
2022-12-29 12:42:44 +02:00
joachimschmidt557
1caf56c5fb stage2 AArch64: implement errUnion{Err,Payload} for registers 2022-12-29 11:12:08 +01:00
Jacob Young
74b14edea8 link: fix memory leaks
* Fix linker memory leaks found while running `zig build test-cases`.
 * Add missing target to test manifest.
2022-12-28 14:24:27 -05:00
Andrew Kelley
0be6157a23 disable failing compile errors test
tracking issue #14105
2022-12-28 12:08:03 -07:00
Luuk de Gram
8403612adc
test/link: update linker tests
Force importing symbols to show the correct functions are being
imported from the host environment.
2022-12-28 16:49:36 +01:00
Andrew Kelley
a1d82352d2 disable failing C var arg behavior tests
See tracking issue #14096
2022-12-27 23:13:03 -07:00
Andrew Kelley
5ca1753ff1 Revert "aarch64: reenable tests that are no longer regressed"
This reverts commit 3370d58956.

This commit was done with an LLVM build that did not have assertions
enabled. There are LLVM assertions being triggered due to this commit.

Reopens #10627
Reopens #12013
Reopens #12027
2022-12-27 20:54:27 -07:00
Andrew Kelley
3f1cfcbea8
Merge pull request #14091 from ziglang/stage1-test-coverage
add more behavior test coverage
2022-12-27 21:47:17 -05:00
Andrew Kelley
357235d9de add behavior test for ptrcasted function pointers
See #2626. The runtime case is solved but comptime is not.
2022-12-27 15:19:00 -07:00
Andrew Kelley
6e9fbc83ca add behavior test for comptime pointer casting
comptime `@ptrCast` a subset of an array, then write through it

closes #2444
2022-12-27 14:44:04 -07:00
Andrew Kelley
f4b067743f add behavior test for optional error union return type
closes #1814
2022-12-27 13:46:57 -07:00
Jakub Konka
601ab9a251
Merge pull request #14086 from ziglang/issue-14082
macho: ensure LINKEDIT layout follows Apple strict validation rules
2022-12-27 21:39:05 +01:00
Andrew Kelley
19056cb682
Merge pull request #14024 from Vexu/overflow-arithmetic
Make overflow arithmetic builtins return tuples
2022-12-27 13:57:49 -05:00
Jakub Konka
aea3460cf5
Merge pull request #14084 from joachimschmidt557/stage2-aarch64
stage2 AArch64: small improvements
2022-12-27 18:59:59 +01:00
Jakub Konka
8d29c84d00 link-tests: test uuid on x86_64-macos too 2022-12-27 16:43:35 +01:00
Jakub Konka
6925ef0f1a zld: exclude strtab padding from uuid calculation 2022-12-27 16:43:35 +01:00
Jakub Konka
8adcc2258f link-tests: redo macho strict validation test to match libstuff 2022-12-27 16:43:35 +01:00
Veikka Tuominen
a777373bb8 enable test on more targets
This was fixed by 8a0a6b7387 for targets
without avx512
2022-12-27 15:34:19 +02:00
Veikka Tuominen
9c0f3163a8 value: fix bitcasting packed structs with u0 fields
Closes #13942
2022-12-27 15:33:27 +02:00
joachimschmidt557
485082064a
stage2 AArch64: implement field_parent_ptr 2022-12-27 21:26:18 +08:00
joachimschmidt557
d6e6162081
stage2 AArch64: unify callee-preserved regs on all targets
also enables many passing behavior tests
2022-12-27 21:17:52 +08:00
Veikka Tuominen
622311fb9a update uses of overflow arithmetic builtins 2022-12-27 15:13:14 +02:00
Jacob Young
81318e8704 llvm: add asserts and behavior tests for #14063
Closes #14063
2022-12-27 00:12:56 -05:00
Andrew Kelley
1b86a628ac
Merge pull request #14015 from Vexu/recursive-inline
Sema: add error for recursive inline call
2022-12-26 20:34:22 -05:00
Veikka Tuominen
81443fcde8 Sema: add error for recursive inline call
Closes #12973
2022-12-26 16:36:30 +02:00
Veikka Tuominen
3535c4b3b6 Sema: fix elem ptr type of vector in slice
Closes #14071
2022-12-26 15:26:27 +02:00
Jacob Young
64865679cf Sema: add missing resolveLazyValue cases
Closes #14032
2022-12-26 04:39:32 -05:00
Jacob Young
f5b6019646 Sema: fix missing struct layout for llvm backend
Closes #14063
2022-12-25 20:18:15 -05:00
Andrew Kelley
a193ec432d
Merge pull request #14058 from jacobly0/concat 2022-12-24 13:55:42 -05:00
Jacob Young
6f288051c1 behavior: disable tests on failing backends 2022-12-24 02:54:21 -05:00
Jacob Young
6cd8004213 Sema: relax undefined checks for concat
Closes #14037
2022-12-24 02:40:33 -05:00
Jacob Young
0559cdb554 Sema: support concat of tuple and array
Closes #14041
2022-12-24 02:40:33 -05:00
Jacob Young
fc0789f8e7 behavior: disable tests that trigger an llvm 15 bug and assertion
```
LLVM Emit Object... zig: llvm/include/llvm/ADT/APInt.h:840: void llvm::APInt::lshrInPlace(unsigned int): Assertion `ShiftAmt <= BitWidth && "Invalid shift amount"' failed.
Aborted
```

Tracked by #13782
2022-12-24 02:23:05 -05:00
travisstaloch
581d292381
fix overflow found while fuzzing
* allow file level `union {}` to parse as tuple field

this was found while fuzzing zls.

* before this patch the input `union {}` crashed the parser.  after
  this, it parses correctly just like `struct {}`.
* adds behavior tests for both inputs `struct {}` and `union {}`,
  checking that each becomes a file level tuple field.
2022-12-23 23:10:04 +02:00
Jakub Konka
bb62d5105c
Merge pull request #14049 from ziglang/issue-14045
macho+zld: write code signature padding before committing load commands
2022-12-23 19:07:36 +01:00
Jakub Konka
2cb6db2219 link-tests: add macho strict validation test
Support more operators when running simple arithmetic tests, and
allow for int literals in the program spec.
2022-12-23 14:02:52 +01:00
Andrew Kelley
f211c1559a
Merge pull request #13960 from r00ster91/stage1cruft
Close more old stage1 issues
2022-12-22 16:36:55 -05:00
r00ster91
a429f72ae8 cases: more test coverage
Closes #11986
Closes #11850
Closes #12159
2022-12-21 23:34:29 +01:00
r00ster91
5ecc2b99af behavior: more test coverage
Closes #12450
Closes #13113
Closes #12051
Closes #12092
Closes #12119
Closes #12142
Closes #12450
Closes #13113
Closes #11995
Closes #12000
2022-12-21 23:34:22 +01:00
Jacob Young
a52dcdd3c5 CBE: fix bitwise not
Closes #13911
2022-12-21 03:04:59 -05:00
Veikka Tuominen
e1345fd0a0
Merge pull request #14004 from Vexu/packed-struct-vector
llvm: handle vectors in packed structs
2022-12-20 23:13:36 +02:00
Veikka Tuominen
9f23702c21 llvm: fix C ABI for <=256 bit vectors
Closes #13918
2022-12-20 18:34:33 +02:00
Veikka Tuominen
6da070c5ac Sema: fix crash with generic function with generic function parameter
Closes #12810
2022-12-20 17:32:04 +02:00
Andrew Kelley
0fb53bd245
Merge pull request #14000 from jacobly0/zero-bit-fields
codegen: fix taking the address of a field in a zero-bit struct
2022-12-19 15:47:31 -05:00
Veikka Tuominen
6511afcfe0 Sema: fix coercion from [:0]T to [*c]T 2022-12-19 20:45:53 +02:00