| ;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. |
| |
| ;; RUN: wasm-ctor-eval %s --ctors=func --kept-exports=func --quiet -all -S -o - | filecheck %s |
| |
| ;; The data segment here is at an offset that is out of bounds of the initial |
| ;; memory. We should not flatten memory here, as this traps anyhow, and we can |
| ;; leave the module unchanged. |
| |
| (module |
| ;; CHECK: (type $0 (func (result i32))) |
| |
| ;; CHECK: (memory $0 16 17 shared) |
| (memory $0 16 17 shared) |
| |
| ;; CHECK: (data $0 (i32.const -1) "\00") |
| (data $0 (i32.const -1) "\00") |
| |
| ;; CHECK: (export "func" (func $func)) |
| (export "func" (func $func)) |
| |
| ;; CHECK: (func $func (type $0) (result i32) |
| ;; CHECK-NEXT: (i32.load |
| ;; CHECK-NEXT: (i32.const 10) |
| ;; CHECK-NEXT: ) |
| ;; CHECK-NEXT: ) |
| (func $func (result i32) |
| ;; Use the memory to avoid it getting optimized out. |
| (i32.load |
| (i32.const 10) |
| ) |
| ) |
| ) |