MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / mem_i32_overwrite

Function mem_i32_overwrite

tests/integration/vm_execution.rs:1692–1714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1690main: () -> i32 {
1691 alpha = 10
1692 beta = 20
1693 a: i32 = alpha
1694 b: i32 = beta
1695 if a == 10 {
1696 if b == 20 {
1697 return 0
1698 }
1699 }
1700 return 1
1701}
1702"#,
1703 );
1704 assert!(
1705 matches!(outcome, RunOutcome::Halted(0)),
1706 "two globals must be independent; alpha=10 beta=20, got {outcome:?}"
1707 );
1708}
1709
1710/// Global variable in BSS section is zero-initialized at program start.
1711#[test]
1712fn global_bss_zero_init() {
1713 let (_, outcome, _) = run_hll(
1714 r#"
1715uninit: i32 = 0
1716
1717main: () -> i32 {

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected