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

Function pointer_store_emits_store_instruction

tests/integration/ir_generation.rs:475–485  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

473// -- Stack allocation and pointer load/store -----------------------------------
474
475#[test]
476fn stack_variable_emits_alloc() {
477 let source = r#"main: () -> i32 {
478 x: i32 = 10
479 return x
480}"#;
481 assert!(has_instruction(source, |i| matches!(
482 i,
483 IrInstruction::Alloc { .. }
484 )));
485}
486
487#[test]
488fn address_of_emits_alloc_and_load() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected