Andrew Kelley
0d120fcb89
Merge pull request #12225 from ziglang/ci-stage3-standalone
...
CI stage3 test coverage for test-standalone and test-cli
2022-07-25 00:46:56 -07:00
Luuk de Gram
a7417f7839
wasm: Enable C-ABI tests for self-hosted compiler
2022-07-25 06:34:00 +02:00
Luuk de Gram
7c13bdb1c9
Merge pull request #12059 from Luukdegram/linker-tests-run-step
...
Implement EmulatableRunStep for linker tests
2022-07-25 06:33:01 +02:00
Andrew Kelley
93ae386f56
stage2: don't skip liveness or codegen if -femit-asm is supplied
...
Fixes Godbolt's CLI usage of Zig.
2022-07-24 15:02:05 -07:00
Andrew Kelley
be294e3744
CI stage3 test coverage for test-standalone
2022-07-24 15:02:05 -07:00
Ali Chraghi
0b4a3ec950
std: compile error on invalid testing allocator usage
2022-07-24 11:57:00 +03:00
Meghan
dea437edfb
stage2: implement noinline fn
2022-07-24 11:56:33 +03:00
Andreas Reischuck
903bed931d
report better error for package not found in stage2
2022-07-24 11:55:37 +03:00
Andrew Kelley
a2ab9e36fa
Merge pull request #12143 from Vexu/stage2-safety
...
Stage2 runtime safety progress
2022-07-23 20:09:24 -07:00
Andrew Kelley
9964324856
disable flaky behavior test
...
see #12208
2022-07-23 20:03:50 -07:00
Luuk de Gram
72c0cebe5c
test/link/macho: use EmulationStep for dead_strip
2022-07-23 17:27:47 +02:00
Veikka Tuominen
baf516218e
Sema: don't add union field access safety check for single field unions
2022-07-23 15:40:12 +03:00
Veikka Tuominen
2436dd2c1b
Sema: validate duplicate fields in anon structs
2022-07-23 15:40:12 +03:00
Veikka Tuominen
5b29275240
Sema: add some more 'declared here' notes
2022-07-23 15:40:12 +03:00
Veikka Tuominen
15dddfd84d
AstGen: make comptime fields in packed and extern structs compile errors
2022-07-23 15:40:12 +03:00
Veikka Tuominen
585c160c20
Sema: handle store to comptime field when ResultLoc == .none
2022-07-23 15:40:12 +03:00
Veikka Tuominen
9465906775
Sema: return .comptime_field_ptrs for tuples
2022-07-23 15:40:12 +03:00
Veikka Tuominen
cf87026e52
Sema: @alignCast safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
711b656773
Sema: @floatToInt safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
ff7ec4efb5
Sema: bad union field access safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
55fe34100f
Sema: exact division safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
76d099950a
Sema: cast negative to unsigned safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
0782586b15
Sema: divide by zero safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
9f10dfcb54
Sema: implement shr_exact runtime safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
4d20d6874c
move passing safety tests to stage2
2022-07-23 15:40:11 +03:00
Luuk de Gram
34b786fb0f
enable link-test on linux CI
2022-07-23 10:08:51 +02:00
Luuk de Gram
4776065036
Use EmulatableRunStep for MachO linker tests
2022-07-23 10:03:51 +02:00
Jakub Konka
a8bfddfaea
Merge pull request #12140 from ziglang/macho-gc-sections
...
macho: add support for `-dead_strip` (GC sections) and simplify symbol resolution
2022-07-23 00:01:09 -07:00
Andrew Kelley
f591936480
Merge pull request #12198 from Vexu/stage2
...
Sema: fix loading and storing of optional pointers represented as pointers
2022-07-22 20:47:40 -07:00
Andrew Kelley
5dd59a5423
Merge pull request #12191 from ziglang/underaligned-fields
...
LLVM: fix lowering of structs with underaligned fields
2022-07-22 11:58:50 -07:00
Veikka Tuominen
423a19fa60
Sema: add error for dereferencing invalid payload ptr at comptime
2022-07-22 21:10:50 +03:00
Veikka Tuominen
03b1fbe50d
stage2: fix airIsErr when is_ptr == true
2022-07-22 21:07:55 +03:00
Veikka Tuominen
1f748fe426
Sema: fix mutation of optional ptr represented as regular ptr
2022-07-22 19:50:11 +03:00
Jakub Konka
2c184f9a5f
link-tests: add checkNotPresent and add -dead_strip smoke test
...
`checkNotPresent` is the inverse of `checkNext` - if the phrase is
found in the output, then it fails the test.
2022-07-22 16:58:21 +02:00
Jakub Konka
d80fcc8a0b
macho: rework symbol handling for incremental stage2 builds
2022-07-22 16:58:20 +02:00
Jakub Konka
03feea0fb2
macho: split section into subsections if requested and/or possible
2022-07-22 16:58:20 +02:00
Jakub Konka
b81c48d985
macho: read the entire file contents into memory at once
2022-07-22 16:58:20 +02:00
Veikka Tuominen
c619371ec1
Sema: fix loading and storing of optional pointers represented as pointers
2022-07-22 17:03:42 +03:00
Veikka Tuominen
8a488fcdb8
Sema: validate empty array init
2022-07-22 17:03:42 +03:00
Andrew Kelley
046a4d084b
update test-translate-c cases to stage2
2022-07-21 22:51:17 -07:00
Andrew Kelley
3114978389
update standalone test cases for stage2
2022-07-21 22:51:17 -07:00
Andrew Kelley
46a06074eb
tests: remove superfluous newlines from logs
2022-07-21 22:51:17 -07:00
Andrew Kelley
f550c29c4e
LLVM: fix lowering of structs with underaligned fields
...
When lowering a struct type to an LLVM struct type, keep track of
whether there are any underaligned fields. If so, then make it a packed
llvm struct. This works because we already insert manual padding bytes
regardless.
We could unconditionally use an LLVM packed struct; the reason we bother
checking for underaligned fields is that it is a conservative choice, in
case LLVM handles packed structs less optimally. A future improvement
could simplify this code by unconditionally using packed LLVM structs
and then make sure measure perf is unaffected.
closes #12190
2022-07-21 22:51:17 -07:00
Andrew Kelley
b749487f48
add new compile error note to old test case
2022-07-21 22:05:46 -07:00
Andrew Kelley
25f3be32db
Sema: fix fn pointer align disagrees with fn align error
...
Check the specified function alignment rather than the effective
function alignment.
2022-07-21 15:19:56 -07:00
Andrew Kelley
fc6e111b76
Sema: improve compile error for bad function alignment
...
* Integrate more declaratively with src/target.zig
* Only trigger the check when a function body is found, do not trigger
for function types.
2022-07-21 13:55:29 -07:00
Andrew Kelley
b946934576
build.zig: 32 MiB stack size
...
This gives more headroom for comptime recursion, especially for debug
builds of Zig.
2022-07-21 12:23:33 -07:00
Andrew Kelley
644baa0f5b
constrain target/backend of new test cases
...
avoids testing stuff that doesn't work yet.
2022-07-21 12:21:30 -07:00
Veikka Tuominen
794beafb9c
Sema: validate extern struct field types earlier
...
`validateExternType` does not require the type to be resolved so we can
check it earlier. Only doing it in `resolveTypeFully` lead to worse or
missing compile errors.
2022-07-21 12:21:30 -07:00
Veikka Tuominen
821e4063f9
Sema: better source location for function call args
2022-07-21 12:21:30 -07:00