From 95d00d699c9e05b8a04885d019a09d8d2eebd0b5 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 13 Oct 2016 19:41:59 +0200 Subject: Don't create a memory section for an imported memory; fixes #772 (#773) --- test/memory-import.wast | 9 +++++++++ test/memory-import.wast.fromBinary | 10 ++++++++++ test/memory-import.wast.fromBinary.noDebugInfo | 10 ++++++++++ 3 files changed, 29 insertions(+) create mode 100644 test/memory-import.wast create mode 100644 test/memory-import.wast.fromBinary create mode 100644 test/memory-import.wast.fromBinary.noDebugInfo (limited to 'test') diff --git a/test/memory-import.wast b/test/memory-import.wast new file mode 100644 index 000000000..d7e6e3770 --- /dev/null +++ b/test/memory-import.wast @@ -0,0 +1,9 @@ +(module + (type $0 (func (result i32))) + (import "env" "memory" (memory $0 1 1)) + (func $foo (type $0) (result i32) + (i32.load offset=13 + (i32.const 37) + ) + ) +) diff --git a/test/memory-import.wast.fromBinary b/test/memory-import.wast.fromBinary new file mode 100644 index 000000000..1ba3cb0f3 --- /dev/null +++ b/test/memory-import.wast.fromBinary @@ -0,0 +1,10 @@ +(module + (type $0 (func (result i32))) + (import "env" "memory" (memory $0 1 1)) + (func $foo (type $0) (result i32) + (i32.load offset=13 + (i32.const 37) + ) + ) +) + diff --git a/test/memory-import.wast.fromBinary.noDebugInfo b/test/memory-import.wast.fromBinary.noDebugInfo new file mode 100644 index 000000000..2ddf90ce9 --- /dev/null +++ b/test/memory-import.wast.fromBinary.noDebugInfo @@ -0,0 +1,10 @@ +(module + (type $0 (func (result i32))) + (import "env" "memory" (memory $0 1 1)) + (func $0 (type $0) (result i32) + (i32.load offset=13 + (i32.const 37) + ) + ) +) + -- cgit v1.2.3