1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
;; --duplicate-function-elimination should not remove functions used in ref.func.
(module
(func $0 (result i32)
(i32.const 0)
)
(func $1 (result i32)
(i32.const 0)
)
(func $test (result funcref)
(ref.func $1)
)
)
;; renaming after deduplication must only affect functions
(module
(memory $foo 16 16)
(global $bar i32 (i32.const 0))
(export "memory" (memory $foo))
(export "global" (global $bar))
(func $bar ;; happens to share a name with the global
)
(func $foo ;; happens to share a name with the memory
)
)
|