178f01f69SHeejin Ahn# RUN: not llvm-mc -triple=wasm32-unknown-unknown %s 2>&1 | FileCheck %s 278f01f69SHeejin Ahn 378f01f69SHeejin Ahn# A Wasm function should always end with a 'end_function' pseudo instruction in 478f01f69SHeejin Ahn# assembly. This causes the parser to properly wrap up function info when there 578f01f69SHeejin Ahn# is no other instructions present. 678f01f69SHeejin Ahn 778f01f69SHeejin Ahntest0: 8*dbc59007SHeejin Ahn .functype test0 () -> () 978f01f69SHeejin Ahn 1078f01f69SHeejin Ahntest1: 11*dbc59007SHeejin Ahn# CHECK: [[@LINE+1]]:{{.*}}: error: Unmatched block construct(s) at function end: function 12*dbc59007SHeejin Ahn .functype test1 () -> () 1378f01f69SHeejin Ahn end_function 1478f01f69SHeejin Ahn 1578f01f69SHeejin Ahntest2: 16*dbc59007SHeejin Ahn .functype test2 () -> () 17*dbc59007SHeejin Ahn# CHECK: [[@LINE+1]]:{{.*}}: error: Unmatched block construct(s) at function end: function 18