Commit graph

6834 commits

Author SHA1 Message Date
Jakub Konka
181e476915 test/link/macho: upgrade dead_strip_dylibs test 2024-01-24 12:34:40 +01:00
Jakub Konka
b038bcb93b test/link/macho: test -r mode 2024-01-24 12:34:40 +01:00
Jakub Konka
fa161c2059 test/link/macho: test tentative definitions 2024-01-24 12:34:40 +01:00
Jakub Konka
49a4b42995 test/link/macho: upgrade tls test 2024-01-24 12:34:40 +01:00
Jakub Konka
9f0e1ab467 test/link/macho: test thunks on arm64 2024-01-24 12:34:40 +01:00
Jakub Konka
5790e89b5a test/link/macho: test twolevel namespacing 2024-01-24 12:34:40 +01:00
Jakub Konka
fa649cad4e test/link/macho: test large .tbss section 2024-01-24 12:34:40 +01:00
Jakub Konka
9fce2e2233 test/link/macho: test -u flag handling (forceUndefinedSymbol) 2024-01-24 12:34:40 +01:00
Jakub Konka
105655857f test/link/macho: upgrade weak framework test 2024-01-24 12:34:40 +01:00
Jakub Konka
e96f8b817a test/link/macho: upgrade weak library test 2024-01-24 12:34:40 +01:00
Jakub Konka
1e0eb3c809 test/link/macho: test weak binding 2024-01-24 12:34:40 +01:00
Jakub Konka
2c0c86944e test/link/macho: upgrade and migrate headerpad test 2024-01-24 12:34:40 +01:00
Jakub Konka
9533628ca0 test/link/macho: test setting correct weak* flags in the header 2024-01-24 12:34:40 +01:00
Jakub Konka
5142d92c51 test/link/macho: test hello world in C 2024-01-24 12:34:39 +01:00
Jakub Konka
0cc4dc615b test/link/macho: test hello world in Zig 2024-01-24 12:34:39 +01:00
Jakub Konka
bf285c7e40 test/link/macho: test for correct handling of large __bss sections 2024-01-24 12:34:39 +01:00
Jakub Konka
faa1849f81 test/link/macho: test for correct handling of __mh_execute_header symbol 2024-01-24 12:34:39 +01:00
Jakub Konka
49c11e0c34 test/link/macho: upgrade and migrate needed_library test 2024-01-24 12:34:39 +01:00
Jakub Konka
d93a0763d4 test/link/link: pass build options to elf and macho tests 2024-01-24 12:34:39 +01:00
Jakub Konka
041f7d69f0 test/link/macho: test segment boundary symbols 2024-01-24 12:34:39 +01:00
Jakub Konka
ffd7f7f642 test/link/macho: fix naming in entry-in-dylib test 2024-01-24 12:34:39 +01:00
Jakub Konka
6cdcf61a5c test/link/macho: upgrade and migrate dead_strip test 2024-01-24 12:34:39 +01:00
Jakub Konka
aa50bca151 test/link/elf: make invalid input file test less janky 2024-01-24 12:34:39 +01:00
Jakub Konka
56303d770e macho: fix invalid generation of FDE records 2024-01-24 12:34:39 +01:00
Jakub Konka
11524e4d0c test/link/macho: migrate entry_in_dylib test to new test format 2024-01-24 12:34:39 +01:00
Jakub Konka
ee68f35bfe macho: fix section boundary symbols test 2024-01-24 12:34:39 +01:00
Veikka Tuominen
eeec34ccb6 Sema: implement comptime error return traces 2024-01-22 18:08:56 -08:00
MrDmitry
e72f1d5ae7 Extend test cases
Add tests for:
- packed neighboring variables
- separated neighboring variables
- mixed types of neighboring variables
2024-01-21 03:18:37 -05:00
Veikka Tuominen
2e7d28dd0d Sema: replace uses of toUnsignedInt with toUnsignedIntAdvanced
During semantic analysis the value may be an unresolved lazy value
which makes using `toUnsignedInt` invalid.

Add assertions to detect similar issues in the future.

Closes #18624
2024-01-20 12:21:05 -08:00
David Rubin
1b8f7e46fa
AstGen: detect duplicate field names
This logic was previously in Sema, which was unnecessary complexity, and meant the issue was not detected unless the declaration was semantically analyzed. This commit finishes the work which 941090d started.

Resolves: #17916
2024-01-20 17:23:47 +00:00
Meghan Denny
46d592e485 do not enforce function parameters to be marked comptime if only called at comptime 2024-01-19 15:31:18 -08:00
David Rubin
100efcf8d3
return optional state to zirPtrCastNoDest 2024-01-19 21:25:05 +02:00
Andrew Kelley
6ecf3b1ef3
Merge pull request #18599 from dweiller/err-union-switch-err-trace
astgen: fix error return trace on error union switch
2024-01-18 18:32:52 -08:00
dweiller
c4cff443b8 test/stack_traces.zig: add err union switch case 2024-01-18 15:10:32 +11:00
David Rubin
6e5bdb5397
add type check to zirSwitchBlockErrUnion 2024-01-18 00:46:00 +00:00
Techatrix
ec358d6db5 sema: fix safe integer arithmetic operations on undefined values
Previously `@as(i64, undefined) +% 1` would produce `@as(@TypeOf(undefined), undefined)` which now gives `@as(i64, undefined)`.
Previously `@as(i64, undefined) +| 1` would hit an assertion which now gives `@as(i64, undefined)`.
2024-01-16 16:27:31 -08:00
travisstaloch
f3353708d8
AstGen: use correct token_src for switch, if and while exprs
fixes #18579
2024-01-16 18:22:44 +02:00
february cozzocrea
da506aaf6e
translate-c: Explicit cast bool from float fix 2024-01-16 18:12:05 +02:00
february cozzocrea
50457482b1
translate-c: Fix for compound assign implicit cast error 2024-01-16 17:57:31 +02:00
Andrew Kelley
fe870418b1
Merge pull request #18584 from Techatrix/fix-switch-on-err
fix ast gen failure to catch incorrect by ref error captures
2024-01-16 02:42:06 -08:00
Andrew Kelley
ca8c6dd4d6
Merge pull request #18569 from dweiller/17944-followup
17944 followup
2024-01-15 22:59:33 -08:00
Techatrix
06410f58bd AstGen: properly handle ill-formed switch on error 2024-01-16 05:55:26 +01:00
Techatrix
8b9425c248 AstGen: add error message for capture error by ref in switch on error 2024-01-16 05:55:26 +01:00
dweiller
a219c9faaa test/behavior: fix test type check for multi-ptr slice
The original test was checking the types of irrelevant slices, the test
is for slicing of multi-pointers _without_ an end value, but the types
of slices with an end value were being checked.
2024-01-15 20:55:01 +11:00
dweiller
8108c9f4d2 test/behavior: replace all 'comptime expect' with 'comptime assert' 2024-01-15 20:55:01 +11:00
Andrew Kelley
32e88251e4 update test case for new const/var compile error
commit 8afafa717f was created when this
error did not exist yet.
2024-01-15 01:53:41 -07:00
Jacob Young
03ed3f56cf Sema: fix @extern decls
Closes #18550
2024-01-15 07:39:05 +01:00
Jakub Konka
3dddb881bf
Merge pull request #18560 from ziglang/elf-report-dupes
elf: report duplicate symbol definitions
2024-01-15 07:37:09 +01:00
dweiller
8afafa717f sema: allow slicing *T with comptime known [0..1] 2024-01-14 17:26:45 -08:00
Jakub Konka
b1ffc2b8b3 test/link/elf: patch up relocatable test 2024-01-15 00:18:50 +01:00