File: empty-param-name.test

package info (click to toggle)
binaryen 108-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,424 kB
  • sloc: cpp: 151,487; javascript: 62,522; ansic: 13,124; python: 5,260; pascal: 441; sh: 75; asm: 27; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 452 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
;; Test that we show a warning on an empty local name, and do not crash.
;;
;; The binary contains this, processed by wabt with debug names:
;;
;;   (module
;;     (func $foo (import "imports" "foo") (param i32)))
;;
;; Wabt emits a name for that parameter, but it is the empty string. See
;; https://github.com/WebAssembly/wabt/issues/1799

;; RUN: wasm-opt %s.wasm 2>&1 | filecheck %s

;; CHECK: warning: empty local name at index 0 in function foo