test-cases: fix race with zig run on C backend tests

Also avoid redundantly doing compile-error checks on multiple targets
for test cases where that is not helpful.
This commit is contained in:
Andrew Kelley
2022-06-14 15:27:43 -07:00
parent 22690efcc2
commit 8caa206417
6 changed files with 15 additions and 4 deletions

View File

@@ -21,7 +21,8 @@ pub export fn entry3() void {
_ = &test_fns[i];
}
// error
// backend=stage2,llvm
// target=native
// backend=stage2
//
// :6:5: error: values of type '[2]fn() void' must be comptime known, but index value is runtime known
// :6:5: note: use '*const fn() void' for a function pointer type