;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; RUN: wasm-opt %s.wasm -S -o - | filecheck %s

;; Test handling of duplicated names where the name in the binary format
;; overlaps with the suffix we add to deduplicate. This is similar to
;; the non-underscore version of this test, but has an '_' in the name.


;; CHECK:      (type $0 (func (result i32)))

;; CHECK:      (func $foo (result i32)
;; CHECK-NEXT:  (i32.const 0)
;; CHECK-NEXT: )

;; CHECK:      (func $foo_1 (result i32)
;; CHECK-NEXT:  (i32.const 1)
;; CHECK-NEXT: )

;; CHECK:      (func $foo_1_2 (result i32)
;; CHECK-NEXT:  (i32.const 2)
;; CHECK-NEXT: )