| author | |
| committer | |
| log | 9a5c7b4b4d12a4ad90f10fafc5fa6b34d99549bb |
| tree | 6d4a7041c742bf6f92ee731e6d3b6efbb530a520 |
| parent | e8ce1728e98bbdf4a13b2a2a3a87f5b2c32d26dd |
| parent | f639cb33a9acf71e32fb69882cf59250148cfaff |
7 files changed, 16 insertions(+), 29 deletions(-)
lib/std/os/linux.zig+1-1| ... | ... | @@ -376,7 +376,7 @@ pub fn mknodat(dirfd: i32, path: [*:0]const u8, mode: u32, dev: u32) usize { |
| 376 | 376 | return syscall4(.mknodat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, dev); |
| 377 | 377 | } |
| 378 | 378 | |
| 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 { | |
| 380 | 380 | return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data); |
| 381 | 381 | } |
| 382 | 382 |
src/Sema.zig+2-2| ... | ... | @@ -21614,10 +21614,10 @@ fn beginComptimePtrLoad( |
| 21614 | 21614 | deref.ty_without_well_defined_layout = field_ptr.container_ty; |
| 21615 | 21615 | } |
| 21616 | 21616 | |
| 21617 | const tv = &(deref.pointee orelse { | |
| 21617 | const tv = deref.pointee orelse { | |
| 21618 | 21618 | deref.pointee = null; |
| 21619 | 21619 | break :blk deref; |
| 21620 | }); | |
| 21620 | }; | |
| 21621 | 21621 | const coerce_in_mem_ok = |
| 21622 | 21622 | (try sema.coerceInMemoryAllowed(block, field_ptr.container_ty, tv.ty, false, target, src, src)) == .ok or |
| 21623 | 21623 | (try sema.coerceInMemoryAllowed(block, tv.ty, field_ptr.container_ty, false, target, src, src)) == .ok; |
test/behavior.zig+1| ... | ... | @@ -82,6 +82,7 @@ test { |
| 82 | 82 | _ = @import("behavior/bugs/11179.zig"); |
| 83 | 83 | _ = @import("behavior/bugs/11181.zig"); |
| 84 | 84 | _ = @import("behavior/bugs/11213.zig"); |
| 85 | _ = @import("behavior/bugs/12003.zig"); | |
| 85 | 86 | _ = @import("behavior/byteswap.zig"); |
| 86 | 87 | _ = @import("behavior/byval_arg_var.zig"); |
| 87 | 88 | _ = @import("behavior/call.zig"); |
test/behavior/bugs/12003.zig created+7| ... | ... | @@ -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+2-1| ... | ... | @@ -14,4 +14,5 @@ fn doSomeAsm() void { |
| 14 | 14 | // backend=llvm |
| 15 | 15 | // target=native |
| 16 | 16 | // |
| 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+3-3| ... | ... | @@ -8,8 +8,8 @@ export fn entry() void { |
| 8 | 8 | } |
| 9 | 9 | fn foo(x: i32) !void { |
| 10 | 10 | 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, | |
| 13 | 13 | else => {}, |
| 14 | 14 | } |
| 15 | 15 | } |
| ... | ... | @@ -19,4 +19,4 @@ fn foo(x: i32) !void { |
| 19 | 19 | // target=native |
| 20 | 20 | // |
| 21 | 21 | // :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 deleted-22| ... | ... | @@ -1,22 +0,0 @@ |
| 1 | const msg = "Hello, World!\n"; | |
| 2 | ||
| 3 | fn length() usize { | |
| 4 | return msg.len; | |
| 5 | } | |
| 6 | ||
| 7 | pub fn main() void { | |
| 8 | asm volatile ("ta 0x6d" | |
| 9 | : | |
| 10 | : [number] "{g1}" (4), | |
| 11 | [arg1] "{o0}" (1), | |
| 12 | [arg2] "{o1}" (@ptrToInt(msg)), | |
| 13 | [arg3] "{o2}" (length()), | |
| 14 | : "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", "memory" | |
| 15 | ); | |
| 16 | } | |
| 17 | ||
| 18 | // run | |
| 19 | // target=sparc64-linux | |
| 20 | // | |
| 21 | // Hello, World! | |
| 22 | // |