mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
interp: add regression test for partial store aliasing
Adds a third init function to the store testdata: an initial partial store puts the buffer into the current memory view, then a partial load is followed by another partial store at the same offset, and finally the loaded value is written to a separate global. The expected output captures the current (incorrect) behavior of the in-place partial store optimization: the loaded value gets corrupted by the subsequent in-place store. The next commit fixes this.
This commit is contained in:
Vendored
+2
@@ -4,6 +4,8 @@ target triple = "x86_64--linux"
|
||||
@overlap.buf = local_unnamed_addr global [4 x i8] c"\01\01\02\09"
|
||||
@alias.src = local_unnamed_addr global [4 x i8] c"\05\06\07\08"
|
||||
@alias.dst = local_unnamed_addr global [2 x i8] c"\09\07"
|
||||
@reload.buf = local_unnamed_addr global [4 x i8] c"c\02\03\09"
|
||||
@reload.out = local_unnamed_addr global [2 x i8] c"c\02"
|
||||
|
||||
define void @runtime.initAll() unnamed_addr {
|
||||
entry:
|
||||
|
||||
Reference in New Issue
Block a user