Skip to content

Commit 9a5c7b4

Browse files
committed
Merge remote-tracking branch 'origin/master' into llvm14
2 parents e8ce172 + f639cb3 commit 9a5c7b4

File tree

7 files changed

+16
-29
lines changed

7 files changed

+16
-29
lines changed

lib/std/os/linux.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub fn mknodat(dirfd: i32, path: [*:0]const u8, mode: u32, dev: u32) usize {
376376
return syscall4(.mknodat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, dev);
377377
}
378378

379-
pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: [*:0]const u8, flags: u32, data: usize) usize {
379+
pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: ?[*:0]const u8, flags: u32, data: usize) usize {
380380
return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data);
381381
}
382382

src/Sema.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21614,10 +21614,10 @@ fn beginComptimePtrLoad(
2161421614
deref.ty_without_well_defined_layout = field_ptr.container_ty;
2161521615
}
2161621616

21617-
const tv = &(deref.pointee orelse {
21617+
const tv = deref.pointee orelse {
2161821618
deref.pointee = null;
2161921619
break :blk deref;
21620-
});
21620+
};
2162121621
const coerce_in_mem_ok =
2162221622
(try sema.coerceInMemoryAllowed(block, field_ptr.container_ty, tv.ty, false, target, src, src)) == .ok or
2162321623
(try sema.coerceInMemoryAllowed(block, tv.ty, field_ptr.container_ty, false, target, src, src)) == .ok;

test/behavior.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ test {
8282
_ = @import("behavior/bugs/11179.zig");
8383
_ = @import("behavior/bugs/11181.zig");
8484
_ = @import("behavior/bugs/11213.zig");
85+
_ = @import("behavior/bugs/12003.zig");
8586
_ = @import("behavior/byteswap.zig");
8687
_ = @import("behavior/byval_arg_var.zig");
8788
_ = @import("behavior/call.zig");

test/behavior/bugs/12003.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
test {
2+
comptime {
3+
const tuple_with_ptrs = .{ &0, &0 };
4+
const field_ptr = (&tuple_with_ptrs.@"0");
5+
_ = field_ptr.*;
6+
}
7+
}

test/cases/compile_errors/asm_at_compile_time.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ fn doSomeAsm() void {
1414
// backend=llvm
1515
// target=native
1616
//
17-
// :6:5: error: unable to evaluate constant expression
17+
// :6:5: error: unable to resolve comptime value
18+
// :2:14: note: called from here

test/cases/compile_errors/duplicate_error_in_switch.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export fn entry() void {
88
}
99
fn foo(x: i32) !void {
1010
switch (x) {
11-
0 ... 10 => return error.Foo,
12-
11 ... 20 => return error.Bar,
11+
0...10 => return error.Foo,
12+
11...20 => return error.Bar,
1313
else => {},
1414
}
1515
}
@@ -19,4 +19,4 @@ fn foo(x: i32) !void {
1919
// target=native
2020
//
2121
// :5:9: error: duplicate switch value
22-
// :3:9: note: other value here
22+
// :3:9: note: previous value here

test/cases/sparc64-linux/hello_world.zig

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)