aboutsummaryrefslogtreecommitdiff
path: root/test/stage1/behavior
AgeCommit message (Collapse)Author
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
2021-04-29update behavior tests with respect to new builtin pkgAndrew Kelley
2021-04-25stage1: Change how the Frame alignment is computedLemonBoy
The code would previously assume every function would start at addresses being multiples of 16, this is not true beside some specific cases. Moreover LLVM picks different alignment values depending on whether it's trying to generate dense or fast code. Let's use the minimum guaranteed alignment as base value, computed according to how big the opcodes are. The alignment of function pointers is always 1, a safe value that won't cause any error at runtime. Note that this was already the case before this commit, here we're making this choice explicit. Let the 'alignment' field for TypeInfo of fn types reflect the ABI alignment used by the compiler, make this field behave similarly to the 'alignment' one for pointers.
2021-04-24stage1: Require a block after suspendLemonBoy
Closes #8603
2021-04-23stage1: Allow wrapping negation on unsigned ints at comptimeLemonBoy
Closes #7951 Closes #8574
2021-04-15test: Add test to ensure signed zeros are properly computedLemonBoy
Ensure everything's ok at comptime and runtime.
2021-04-14Merge remote-tracking branch 'origin/llvm12'Andrew Kelley
Happy LLVM 12 Release Day. Please note that the llvm 12 tag does not include the latest commit in the release/12.x branch, which is in fact a bug fix for a regression that is causing a failure in Zig's test suite. Zig master branch is tracking release/12.x, and will be enabling the test that is fixed by that commit.
2021-04-11std: Fix typo in sqrt implementationLemonBoy
The code initializes twice `t` instead of `t1`, leaving the latter uninitialized. The problem manifested itself by corrupting the LSBs of the result in unpredictable ways.
2021-04-11std: Make a test-case independent of the target endiannessLemonBoy
2021-04-02Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-04-02Merge pull request #8028 from mguaypaq/nosuspend-allowAndrew Kelley
stage1: allow async and resume inside nosuspend blocks
2021-03-28Merge remote-tracking branch 'origin/master' into llvm12Andrew Kelley
2021-03-14std: Replace testing fns for floating-point valuesLemonBoy
Beside handling NaNs and other non-numeric values better we finally offer the same pair of testing predicates in math and testing.
2021-03-12re-enable behavior/vector test for aarch64Michael Dusan
- issue fixed in llvmorg-12.0.0-rc3 closes #8130
2021-03-07stage1: add tests for nosuspend async/resumeVeikka Tuominen
2021-03-02disable failing behavior tests with llvm 12Michael Dusan
- consolidate into single code block See #8130 See #8131
2021-03-02disable failing behavior tests with llvm 12Andrew Kelley
See #8130
2021-02-10Convert inline fn to callconv(.Inline) everywhereTadeo Kondrak
2021-01-30Replace @TagType uses, mostly with std.meta.TagTadeo Kondrak
2021-01-11Merge pull request #7200 from Vexu/arrAndrew Kelley
Type coercion for pointers to anon literals
2021-01-07Reduce use of deprecated IO typesJay Petacat
Related: #4917
2021-01-04Merge pull request #7592 from LemonBoy/fix-7188Andrew Kelley
Allow variable captures on multi-prong switch arms
2021-01-02Fix more stray uses of {} for formatting stringsLemonBoy
2020-12-30std: Clean up some testsLemonBoy
No functional changes, remove some dead code.
2020-12-30stage1: Allow variable capture for multi-prong switch armsLemonBoy
Handle the multi-prong case as we do with range cases. Closes #7188
2020-12-26stage1: const_values_equal error union, improve remaining "TODO" panicsVeikka Tuominen
2020-12-25fix testsVexu
2020-12-25stage1: implement type coercion of pointer to anon list to ↵Vexu
array/struct/union/slice
2020-12-25stage1: implement type coercion of anon list to arrayVexu
2020-12-24stage1: Create a new declaration scope for union enum typesLemonBoy
Making the enum type share the scope with the parent union means every declaration "bleeds" into the enum scope. Let's mint a fresh empty scope for the enum type. Thanks to @Vexu for the test case. Closes #7532
2020-12-23Peer type resolution with unsigned ints and larger signed intsg-w1
2020-12-19stage1: Fix for generic fn monomorphizationLemonBoy
Don't use the instantiation argument types to build the function parameter array. f416535768fc30195cad6cd481f73fd1e80082aa worked around the problem, this commit solves it.
2020-12-15Merge pull request #7431 from LemonBoy/fix-7426Andrew Kelley
stage1: Fix crash in can_mutate_comptime_var_state
2020-12-15stage1: Don't skip steps when analyzing union typesLemonBoy
Don't cut any corner and properly run the type trough every single step even though it has no fields (or, better, the sum of the size of all its fields is zero). Fix the logic to consider an explicit non-zero-sized tag enough to treat the type as sized. Closes #7451
2020-12-14Add a test caseLemonBoy
Co-authored-with: Vexu <git@vexu.eu>
2020-12-10translate-c: support referencing c containers in macrosVexu
2020-12-09small fixes and zig fmtVexu
2020-11-29stage1: Fix typeInfo generation for arrays w/o sentinelLemonBoy
ZigTypeIdOptional types have a different way of specifying their payload value depending on whether the child type is a pointer or not (plus some other special cases). Fixes #7251
2020-11-29stage1: Add missing bitcast when rendering var ptrLemonBoy
Some types require this extra bitcast, eg. structs or unions with extra padding fields inserted by the compiler. Fixes #7250
2020-11-27stage1: Fix crash in *[N]T to []T conversion with zstLemonBoy
Prevent the crash by not making the codegen try to access the non-existing ptr field in the slice. Closes #6951
2020-11-25stage1: Fix ICE when generating struct fields with paddingLemonBoy
Make gen_const_ptr_struct_recursive aware of the possible presence of some trailing padding by always bitcasting the pointer to its expected type. Not an elegant solution but makes LLVM happy and is consistent with how the other callsites are handling this case. Fixes #5398
2020-11-20Merge pull request #7165 from LemonBoy/ppc64finalAndrew Kelley
Make the PPC64 port usable
2020-11-20stage1: Resolve usingnamespace decls when calling @typeInfoLemonBoy
Closes #7176
2020-11-20Skip f16 to f128 conversion test for ppc64LemonBoy
As for aarch64 we're waiting for LLVM to emit calls to the specific builtins that implement this conversion.
2020-11-20Better coverage in @splat testsLemonBoy
Cover more common and uncommon cases.
2020-11-19Merge pull request #6928 from data-man/reduce_testsAndrew Kelley
Add more tests for reduce
2020-11-19Merge pull request #6829 from tadeokondrak/error-unsupported-callconvVeikka Tuominen
stage1: Compile error instead of falling back to C for unsupported cc
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-11-19Update code to not use unsupported calling conventions for targetTadeo Kondrak
2020-11-18stage1: Fix undefined assignment for bitfieldsLemonBoy
Prevents silent memory corruption. Closes #7055