aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 18:43:45 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 20:04:08 +0330
commit4c2c7ad06a1132900bf0994a5d8ce492e7f6ae3e (patch)
treeac82b4213b73d47c467121069091630939eddb51 /tests
parentjit_x64_test: a compile error on either core counts as a difference (diff)
todo: callee generation guard for direct o3 calls, region 474..692 and fib diagnosis; icon test with an o3 caller across find_replace
Diffstat (limited to 'tests')
-rw-r--r--tests/icon/regression/o3_caller_replace.expected1
-rw-r--r--tests/icon/regression/o3_caller_replace.zc14
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/icon/regression/o3_caller_replace.expected b/tests/icon/regression/o3_caller_replace.expected
new file mode 100644
index 0000000..91aceec
--- /dev/null
+++ b/tests/icon/regression/o3_caller_replace.expected
@@ -0,0 +1 @@
+21 1 24
diff --git a/tests/icon/regression/o3_caller_replace.zc b/tests/icon/regression/o3_caller_replace.zc
new file mode 100644
index 0000000..e55cce2
--- /dev/null
+++ b/tests/icon/regression/o3_caller_replace.zc
@@ -0,0 +1,14 @@
+include rt;
+include run;
+include icon;
+// an o3 caller must see a published replacement of its callee: a future direct
+// o3-to-o3 call has to keep a callee generation guard, not bind the old entry.
+o3 int target() { return 7; }
+o3 int caller() { int s = 0; for (int i = 0; i < 3; i++) s += target(); return s; }
+fn main() {
+ let seven = run.tokens("7"), eight = run.tokens("8");
+ rt.put_n(caller()); rt.put_c(' ');
+ rt.put_n(icon.find_replace(target, seven, eight)); rt.put_c(' ');
+ rt.put_n(caller()); rt.put_c(10);
+ return 0;
+}