mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
compiler-rt: workaround miscompilation in memmove
This commit is contained in:
parent
4db01eb130
commit
63f5a80b71
1 changed files with 2 additions and 1 deletions
|
|
@ -137,7 +137,8 @@ inline fn copyRange4(
|
||||||
const d2 = src[pen..][0..copy_len].*;
|
const d2 = src[pen..][0..copy_len].*;
|
||||||
const d3 = src[last..][0..copy_len].*;
|
const d3 = src[last..][0..copy_len].*;
|
||||||
|
|
||||||
dest[0..copy_len].* = d0;
|
// the slice dest[0..len] is needed to workaround -ODebug miscompilation
|
||||||
|
dest[0..len][0..copy_len].* = d0;
|
||||||
dest[b..][0..copy_len].* = d1;
|
dest[b..][0..copy_len].* = d1;
|
||||||
dest[pen..][0..copy_len].* = d2;
|
dest[pen..][0..copy_len].* = d2;
|
||||||
dest[last..][0..copy_len].* = d3;
|
dest[last..][0..copy_len].* = d3;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue