mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
Some miscellaneous test suite cleanups (#25256)
* 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. * test: rename issue_8550 standalone test to compile_asm * 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. * test: delete old stage1 compile_errors tests generic_function_returning_opaque_type.zig was salvaged as it's still worth having. * test: pull tests in test/cases/llvm/ up to test/cases/ There is nothing inherently LLVM-specific about any of these. * test: remove @cImport usage in interdependent_static_c_libs * test: move glibc_compat from link to standalone tests This is not really testing the linker. * build: -Dskip-translate-c now implies -Dskip-run-translated-c * build: skip test-cimport when -Dskip-translate-c is given
This commit is contained in:
commit
9819f53453
44
build.zig
44
build.zig
@ -91,7 +91,7 @@ pub fn build(b: *std.Build) !void {
|
||||
const skip_single_threaded = b.option(bool, "skip-single-threaded", "Main test suite skips tests that are single-threaded") orelse false;
|
||||
const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false;
|
||||
const skip_translate_c = b.option(bool, "skip-translate-c", "Main test suite skips translate-c tests") orelse false;
|
||||
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false;
|
||||
const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse skip_translate_c;
|
||||
const skip_freebsd = b.option(bool, "skip-freebsd", "Main test suite skips targets with freebsd OS") orelse false;
|
||||
const skip_netbsd = b.option(bool, "skip-netbsd", "Main test suite skips targets with netbsd OS") orelse false;
|
||||
const skip_windows = b.option(bool, "skip-windows", "Main test suite skips targets with windows OS") orelse false;
|
||||
@ -464,25 +464,27 @@ pub fn build(b: *std.Build) !void {
|
||||
.max_rss = 4000000000,
|
||||
}));
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_extra_targets = test_extra_targets,
|
||||
.root_src = "test/c_import.zig",
|
||||
.name = "c-import",
|
||||
.desc = "Run the @cImport tests",
|
||||
.optimize_modes = optimization_modes,
|
||||
.include_paths = &.{"test/c_import"},
|
||||
.skip_single_threaded = true,
|
||||
.skip_non_native = skip_non_native,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
.skip_macos = skip_macos,
|
||||
.skip_linux = skip_linux,
|
||||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = skip_libc,
|
||||
}));
|
||||
if (!skip_translate_c) {
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
.test_extra_targets = test_extra_targets,
|
||||
.root_src = "test/c_import.zig",
|
||||
.name = "c-import",
|
||||
.desc = "Run the @cImport tests",
|
||||
.optimize_modes = optimization_modes,
|
||||
.include_paths = &.{"test/c_import"},
|
||||
.skip_single_threaded = true,
|
||||
.skip_non_native = skip_non_native,
|
||||
.skip_freebsd = skip_freebsd,
|
||||
.skip_netbsd = skip_netbsd,
|
||||
.skip_windows = skip_windows,
|
||||
.skip_macos = skip_macos,
|
||||
.skip_linux = skip_linux,
|
||||
.skip_llvm = skip_llvm,
|
||||
.skip_libc = skip_libc,
|
||||
}));
|
||||
}
|
||||
|
||||
test_modules_step.dependOn(tests.addModuleTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
@ -568,7 +570,6 @@ pub fn build(b: *std.Build) !void {
|
||||
unit_tests.root_module.addOptions("build_options", exe_options);
|
||||
unit_tests_step.dependOn(&b.addRunArtifact(unit_tests).step);
|
||||
|
||||
test_step.dependOn(tests.addCompareOutputTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addStandaloneTests(
|
||||
b,
|
||||
optimization_modes,
|
||||
@ -590,7 +591,6 @@ pub fn build(b: *std.Build) !void {
|
||||
test_step.dependOn(tests.addLinkTests(b, enable_macos_sdk, enable_ios_sdk, enable_symlinks_windows));
|
||||
test_step.dependOn(tests.addStackTraceTests(b, test_filters, optimization_modes));
|
||||
test_step.dependOn(tests.addCliTests(b));
|
||||
test_step.dependOn(tests.addAssembleAndLinkTests(b, test_filters, optimization_modes));
|
||||
if (tests.addDebuggerTests(b, .{
|
||||
.test_filters = test_filters,
|
||||
.test_target_filters = test_target_filters,
|
||||
|
||||
@ -49,7 +49,7 @@ unset CXX
|
||||
ninja install
|
||||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \
|
||||
stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-llvm-ir \
|
||||
--maxrss 68719476736 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
|
||||
@ -49,7 +49,7 @@ unset CXX
|
||||
ninja install
|
||||
|
||||
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
|
||||
stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-asm-link test-llvm-ir \
|
||||
stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-llvm-ir \
|
||||
--maxrss 68719476736 \
|
||||
-Dstatic-llvm \
|
||||
-Dskip-non-native \
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const tests = @import("tests.zig");
|
||||
|
||||
pub fn addCases(cases: *tests.CompareOutputContext) void {
|
||||
if (builtin.os.tag == .linux and builtin.cpu.arch == .x86_64) {
|
||||
cases.addAsm("hello world linux x86_64",
|
||||
\\.text
|
||||
\\.globl _start
|
||||
\\
|
||||
\\_start:
|
||||
\\ mov $1, %rax
|
||||
\\ mov $1, %rdi
|
||||
\\ mov $msg, %rsi
|
||||
\\ mov $14, %rdx
|
||||
\\ syscall
|
||||
\\
|
||||
\\ mov $60, %rax
|
||||
\\ mov $0, %rdi
|
||||
\\ syscall
|
||||
\\
|
||||
\\.data
|
||||
\\msg:
|
||||
\\ .ascii "Hello, world!\n"
|
||||
, "Hello, world!\n");
|
||||
}
|
||||
}
|
||||
@ -77,12 +77,12 @@ path will be prepended as a prefix on the test case name.
|
||||
|
||||
```zig
|
||||
// run
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
```
|
||||
|
||||
Possible backends are:
|
||||
|
||||
* `stage1`: equivalent to `-fstage1`.
|
||||
* `stage2`: equivalent to passing `-fno-stage1 -fno-LLVM`.
|
||||
* `llvm`: equivalent to `-fLLVM -fno-stage1`.
|
||||
* `auto`: the default; compiler picks the backend based on robustness.
|
||||
* `selfhosted`: equivalent to passing `-fno-llvm -fno-lld`.
|
||||
* `llvm`: equivalent to `-fllvm`.
|
||||
|
||||
@ -6,5 +6,5 @@ export const p_external_variable = &external_variable;
|
||||
|
||||
// compile
|
||||
// output_mode=Obj
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux
|
||||
|
||||
@ -7,6 +7,6 @@ pub fn main() void {
|
||||
|
||||
// compile
|
||||
// output_mode=Exe
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
//
|
||||
@ -7,6 +7,6 @@ pub fn main() void {
|
||||
|
||||
// compile
|
||||
// output_mode=Exe
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
//
|
||||
@ -8,6 +8,6 @@ pub fn main() void {
|
||||
|
||||
// compile
|
||||
// output_mode=Exe
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
//
|
||||
@ -8,6 +8,6 @@ pub fn main() void {
|
||||
|
||||
// compile
|
||||
// output_mode=Exe
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
//
|
||||
@ -18,5 +18,5 @@ pub fn main() !void {
|
||||
}
|
||||
|
||||
// run
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,aarch64-linux
|
||||
|
||||
@ -18,6 +18,6 @@ pub fn main() void {
|
||||
}
|
||||
|
||||
// run
|
||||
// backend=stage2,llvm
|
||||
// backend=selfhosted,llvm
|
||||
// target=x86_64-linux,x86_64-macos
|
||||
//
|
||||
@ -5,7 +5,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:29: error: file path name cannot be empty
|
||||
|
||||
@ -20,7 +20,6 @@ pub export fn entry4() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
//
|
||||
// :4:25: error: expected error set or error union type, found 'comptime_int'
|
||||
|
||||
@ -7,7 +7,6 @@ export fn entry() void {
|
||||
// https://github.com/ziglang/zig/issues/13782
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux
|
||||
//
|
||||
// :3:27: error: expected type 'u32', found '@Vector(4, u32)'
|
||||
|
||||
@ -5,7 +5,5 @@ pub export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:23: error: comptime-only type 'comptime_int' has no pointer address
|
||||
|
||||
@ -3,7 +3,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:14: error: encountered @trap at comptime
|
||||
|
||||
@ -10,8 +10,6 @@ pub export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :8:12: error: variable of type 'tmp.S1' must be const or comptime
|
||||
// :2:8: note: struct requires comptime because of this field
|
||||
|
||||
@ -6,8 +6,6 @@ export fn a() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:19: error: C pointers cannot point to non-C-ABI-compatible type 'tmp.Foo'
|
||||
// :3:19: note: only extern structs and ABI sized packed structs are extern compatible
|
||||
|
||||
@ -5,7 +5,5 @@ export fn a() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:16: error: C pointers cannot point to opaque types
|
||||
|
||||
@ -8,8 +8,6 @@ export fn f2(x: @Vector(4, u32)) @Vector(4, u32) {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:12: error: negation of type 'u32'
|
||||
// :7:12: error: negation of type '@Vector(4, u32)'
|
||||
|
||||
@ -4,7 +4,5 @@ fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:28: error: '.*' cannot be followed by '*'; are you missing a space?
|
||||
|
||||
@ -15,8 +15,6 @@ pub export fn entry1() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :9:15: error: access of union field 'a' while field 'b' is active
|
||||
// :2:21: note: union declared here
|
||||
|
||||
@ -5,7 +5,5 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:18: error: no error named 'Bar' in 'error{A}'
|
||||
|
||||
@ -13,8 +13,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:24: error: 'y' not accessible from inner function
|
||||
// :3:9: note: crossed function definition here
|
||||
|
||||
@ -6,7 +6,5 @@ export fn entry(y: u8) void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:17: error: 'y' not accessible outside function scope
|
||||
|
||||
@ -15,8 +15,6 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:5: error: found compile log statement
|
||||
//
|
||||
|
||||
@ -15,8 +15,6 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:5: error: found compile log statement
|
||||
//
|
||||
|
||||
@ -8,7 +8,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:29: error: invalid operands to binary expression: 'struct' and 'struct'
|
||||
|
||||
@ -8,8 +8,6 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:12: error: expected type '*const i32', found '*const comptime_int'
|
||||
// :4:12: note: pointer type child 'comptime_int' cannot cast into pointer type child 'i32'
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:41: error: expected pointer type, found 'u32'
|
||||
|
||||
@ -3,7 +3,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:21: error: no align available for type 'noreturn'
|
||||
|
||||
@ -3,7 +3,6 @@ export fn foo() align(1) void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=wasm32-freestanding-none
|
||||
//
|
||||
// :1:23: error: target does not support function alignment
|
||||
|
||||
@ -11,7 +11,5 @@ export fn entry1() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:13: error: enum fields cannot be aligned
|
||||
|
||||
@ -16,8 +16,6 @@ export fn entry4() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:25: error: ambiguous coercion of division operands 'comptime_float' and 'comptime_int'; non-zero remainder '4'
|
||||
// :6:23: error: ambiguous coercion of division operands 'comptime_int' and 'comptime_float'; non-zero remainder '4'
|
||||
|
||||
@ -13,8 +13,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :5:13: error: ambiguous reference
|
||||
// :7:9: note: declared here
|
||||
|
||||
@ -4,8 +4,6 @@ pub export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:9: error: expected type '?*anyopaque', found '?usize'
|
||||
// :3:9: note: optional type child 'usize' cannot cast into optional type child '*anyopaque'
|
||||
|
||||
@ -8,8 +8,6 @@ export fn g() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:8: error: type 'bool' does not support indexing
|
||||
// :3:8: note: operand must be an array, slice, tuple, or vector
|
||||
|
||||
@ -4,8 +4,6 @@ export fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:14: error: type 'type' does not support indexing
|
||||
// :2:14: note: operand must be an array, slice, tuple, or vector
|
||||
|
||||
@ -3,7 +3,5 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:5: error: use of undeclared identifier 'i'
|
||||
|
||||
@ -12,8 +12,6 @@ export fn g() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:11: error: expected type 'usize', found 'bool'
|
||||
// :10:15: error: expected type 'usize', found 'bool'
|
||||
|
||||
@ -7,7 +7,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:11: error: expected indexable; found 'usize'
|
||||
|
||||
@ -32,8 +32,6 @@ export fn entry3() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:17: error: expected 8 vector elements; found 1
|
||||
// :8:17: error: expected 8 vector elements; found 0
|
||||
|
||||
@ -5,7 +5,5 @@ export fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:12: error: type 'u32' does not support array initialization syntax
|
||||
|
||||
@ -11,8 +11,6 @@ fn doSomeAsm() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:5: error: unable to evaluate comptime expression
|
||||
// :2:14: note: called at comptime from here
|
||||
|
||||
@ -8,7 +8,5 @@ export fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:5: error: asm cannot output to const local 'f'
|
||||
|
||||
@ -5,8 +5,6 @@ export fn entry() void {
|
||||
inline fn b() void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:9: error: variable of type '*const fn () callconv(.@"inline") void' must be const or comptime
|
||||
// :2:9: note: function has inline calling convention
|
||||
|
||||
@ -13,8 +13,6 @@ export fn varEntry() u32 {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:21: error: expected type 'u32', found 'u64'
|
||||
// :6:21: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
|
||||
|
||||
@ -5,7 +5,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:16: error: expected type '*u8', found '@TypeOf(null)'
|
||||
|
||||
@ -4,7 +4,5 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:9: error: cannot assign to constant
|
||||
|
||||
@ -4,7 +4,5 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:9: error: cannot assign to constant
|
||||
|
||||
@ -9,7 +9,5 @@ export fn derp() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :8:6: error: cannot assign to constant
|
||||
|
||||
@ -3,7 +3,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:8: error: cannot dereference non-pointer type 'comptime_int'
|
||||
|
||||
@ -4,7 +4,5 @@ export fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:26: error: type 'u16' cannot represent integer value '753664'
|
||||
|
||||
@ -4,8 +4,6 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:5: error: unreachable code
|
||||
// :2:15: note: control flow is diverted here
|
||||
|
||||
@ -15,8 +15,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :11:20: error: expected type 'u8', found '?u8'
|
||||
// :11:20: note: cannot convert optional to payload type
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:31: error: @atomicStore atomic ordering must not be acquire or acq_rel
|
||||
|
||||
@ -5,7 +5,5 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:81: error: failure atomic ordering must be no stricter than success
|
||||
|
||||
@ -5,7 +5,5 @@ export fn f() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:58: error: success atomic ordering must be monotonic or stricter
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:31: error: @atomicRmw with bool only allowed with .Xchg
|
||||
|
||||
@ -10,7 +10,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :9:28: error: @atomicRmw with enum only allowed with .Xchg
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:30: error: @atomicRmw with float only allowed with .Xchg, .Add, .Sub, .Max, and .Min
|
||||
|
||||
@ -21,8 +21,6 @@ export fn errorSet() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:22: error: expected bool, integer, enum, packed struct, or pointer type; found 'f32'
|
||||
// :9:22: error: expected bool, integer, float, enum, packed struct, or pointer type; found 'tmp.NormalStruct'
|
||||
|
||||
@ -5,7 +5,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:10: error: expected type 'error{Hi}', found '@Type(.enum_literal)'
|
||||
|
||||
@ -6,8 +6,6 @@ fn SimpleList(comptime L: usize) type {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:19: error: mutable 'T' not accessible from here
|
||||
// :2:9: note: declared mutable here
|
||||
|
||||
@ -4,7 +4,5 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:9: error: 17-bit float unsupported
|
||||
|
||||
@ -8,7 +8,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :6:15: error: negation of type 'anyerror!u32'
|
||||
|
||||
@ -6,7 +6,5 @@ export fn entry(a: bool, b: bool) i32 {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:11: error: ambiguous use of '&&'; use 'and' for logical AND, or change whitespace to ' & &' for bitwise AND
|
||||
|
||||
@ -9,8 +9,6 @@ export fn entry2(single: *u32) void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:28: error: expected type '*const [0]u32', found '*u32'
|
||||
// :2:28: note: pointer type child 'u32' cannot cast into pointer type child '[0]u32'
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:30: error: expected type '[*]const bool', found 'bool'
|
||||
|
||||
@ -7,8 +7,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :4:22: error: expected type '*[1]i32', found '*const i32'
|
||||
// :4:22: note: cast discards const qualifier
|
||||
|
||||
@ -5,8 +5,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:22: error: expected type '[]u32', found '*const u32'
|
||||
// :3:22: note: cast discards const qualifier
|
||||
|
||||
@ -5,7 +5,5 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:47: error: pointer address 0x1 is not aligned to 4 bytes
|
||||
|
||||
@ -5,8 +5,6 @@ export fn a() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:31: error: expected type '[]align(16) u8', found '*[10]u8'
|
||||
// :3:31: note: pointer alignment '1' cannot cast into pointer alignment '16'
|
||||
|
||||
@ -8,8 +8,6 @@ export fn entry2() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:22: error: expected type 'u29', found 'bool'
|
||||
// :6:21: error: fractional component prevents float value '12.34' from coercion to type 'u29'
|
||||
|
||||
@ -11,7 +11,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :8:5: error: use of undeclared identifier 'bogus'
|
||||
|
||||
@ -5,6 +5,5 @@ pub fn main() void {
|
||||
|
||||
// error
|
||||
// output_mode=Exe
|
||||
// backend=stage2
|
||||
//
|
||||
// :2:9: error: variable of type '@TypeOf(null)' must be const or comptime
|
||||
@ -3,7 +3,5 @@ comptime {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:21: error: struct '@TypeOf(.{})' has no member named 'is_optional'
|
||||
|
||||
@ -36,8 +36,6 @@ noinline fn dummy() u32 {
|
||||
noinline fn dummy2() void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:23: error: expected a tuple, found 'void'
|
||||
// :5:21: error: unable to perform 'never_inline' call at compile-time
|
||||
|
||||
@ -6,7 +6,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:18: error: invalid operands to binary bitwise expression: 'error_set' and 'error_set'
|
||||
|
||||
@ -7,7 +7,5 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:61: error: bitwise not operation on type 'comptime_int'
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry(byte: u8) void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:22: error: @bitCast size mismatch: destination type 'u7' has 7 bits but source type 'u8' has 8 bits
|
||||
|
||||
@ -5,8 +5,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:18: error: cannot @bitCast to 'tmp.entry.E'
|
||||
// :3:18: note: use @enumFromInt to cast from 'u32'
|
||||
|
||||
@ -5,7 +5,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:26: error: @bitCast size mismatch: destination type 'u8' has 8 bits but source type 'f32' has 32 bits
|
||||
|
||||
@ -4,7 +4,5 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:15: error: bit shifting operation expected integer type, found '*const u8'
|
||||
|
||||
@ -7,7 +7,5 @@ pub export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:27: error: backing integer type 'u32' has bit size 32 but the struct fields have a total bit size of 1
|
||||
|
||||
@ -4,8 +4,6 @@ export fn entry() usize {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :1:29: error: root source file struct 'builtin' has no member named 'bogus'
|
||||
// note: struct declared here
|
||||
|
||||
@ -4,7 +4,5 @@ export fn foo() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:10: error: boolean not operation on type '@Vector(2, u1)'
|
||||
|
||||
@ -24,8 +24,6 @@ export fn f4() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:22: error: expected type 'usize', found 'void'
|
||||
// :7:9: error: expected type 'usize', found 'void'
|
||||
|
||||
@ -5,8 +5,6 @@ export fn builtinCallBoolFunctionInlineWithVoid() void {
|
||||
fn boolFunction(_: bool) void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:43: error: expected type 'bool', found 'void'
|
||||
// :5:20: note: parameter type declared here
|
||||
|
||||
@ -4,8 +4,6 @@ export fn entry() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:18: error: C pointers cannot point to non-C-ABI-compatible type 'void'
|
||||
// :2:18: note: 'void' is a zero bit type; for C 'void' use 'anyopaque'
|
||||
|
||||
@ -17,8 +17,6 @@ export fn entry1() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :12:5: error: cannot assign to constant
|
||||
// :16:5: error: cannot assign to constant
|
||||
|
||||
@ -7,8 +7,6 @@ export fn entry(a: **S) void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// 6:10: error: no field or member function named 'b' in '*tmp.S'
|
||||
// 6:10: note: method invocation only supports up to one level of implicit pointer dereferencing
|
||||
|
||||
@ -17,8 +17,6 @@ export fn comptimeBuiltinCall() callconv(.naked) void {
|
||||
fn f() void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:6: error: runtime call not allowed in naked function
|
||||
// :6:5: error: runtime @call not allowed in naked function
|
||||
|
||||
@ -8,8 +8,6 @@ pub export fn entry2() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :3:9: error: cannot call optional type '?fn () void'
|
||||
// :3:9: note: consider using '.?', 'orelse' or 'if'
|
||||
|
||||
@ -2,8 +2,6 @@ var cc: @import("std").builtin.CallingConvention = .c;
|
||||
export fn foo() callconv(cc) void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:26: error: unable to resolve comptime value
|
||||
// :2:26: note: calling convention must be comptime-known
|
||||
|
||||
@ -3,7 +3,6 @@ export fn entry2() callconv(.{ .x86_interrupt = .{} }) void {}
|
||||
export fn entry3() callconv(.avr_interrupt) void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=aarch64-linux-none
|
||||
//
|
||||
// :1:30: error: calling convention 'x86_64_interrupt' only available on architectures 'x86_64'
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
export fn entry() callconv(.avr_signal) void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux-none
|
||||
//
|
||||
// :1:29: error: calling convention 'avr_signal' only available on architectures 'avr'
|
||||
|
||||
@ -15,7 +15,6 @@ export fn entry3() void {
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=x86_64-linux-none
|
||||
//
|
||||
// :1:28: error: calling convention 'x86_stdcall' only available on architectures 'x86'
|
||||
|
||||
@ -4,8 +4,6 @@ export fn entry() void {
|
||||
fn foo() callconv(.naked) void {}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:5: error: unable to call function with calling convention 'naked'
|
||||
// :4:1: note: function declared here
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user