;;; TOOL: run-roundtrip
;;; ARGS: --stdout --debug-names --generate-names

;; currently, only function names and local names are saved in the debug
;; section

(module
  (type (func (param i32) (result f32)))
  (import "foo" "bar" (func $import (result i32)))
  (table funcref (elem 0))
  (func $func0 (type 0) f32.const 1)
  (func (param i32) (param $param1 i64)
    (local f32)
    (local $local1 f64)
    call 0
    drop
    i32.const 0
    call 1
    drop
    i32.const 0
    i32.const 1
    call_indirect (type 0)
    drop
    local.get 1
    drop
    f32.const 0
    local.set 2)
  (export "baz" (func 0))
  (export "quux" (func 1)))

(;; STDOUT ;;;
(module
  (type $t0 (func (param i32) (result f32)))
  (type $t1 (func (result i32)))
  (type $t2 (func (param i32 i64)))
  (import "foo" "bar" (func $import (type $t1)))
  (func $func0 (type $t0) (param $p0 i32) (result f32)
    f32.const 0x1p+0 (;=1;))
  (func $f2 (type $t2) (param $p0 i32) (param $param1 i64)
    (local $l2 f32) (local $local1 f64)
    call $import
    drop
    i32.const 0
    call $func0
    drop
    i32.const 0
    i32.const 1
    call_indirect $T0 (type $t0)
    drop
    local.get $param1
    drop
    f32.const 0x0p+0 (;=0;)
    local.set $l2)
  (table $T0 1 1 funcref)
  (export "baz" (func $import))
  (export "quux" (func $func0))
  (elem $e0 (i32.const 0) func $import))
;;; STDOUT ;;)
