diff options
Diffstat (limited to 'test/lit')
-rw-r--r-- | test/lit/passes/roundtrip-table.wast | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lit/passes/roundtrip-table.wast b/test/lit/passes/roundtrip-table.wast new file mode 100644 index 000000000..21eb1197c --- /dev/null +++ b/test/lit/passes/roundtrip-table.wast @@ -0,0 +1,11 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. +;; RUN: wasm-opt %s -all --roundtrip -S -o - + +(module + (type $functype (func)) + (table $0 48 funcref) + ;; a type that appears in the table and nowhere else. this test checks that + ;; we do not crash during the roundtrip on seeing an unexpected type that + ;; collectHeapTypes() did not scan. + (elem (table $0) (i32.const 0) funcref (ref.null $functype)) +) |