Index: tests_lit/parse_errs/symtab-after-fcn.test |
diff --git a/tests_lit/parse_errs/symtab-after-fcn.test b/tests_lit/parse_errs/symtab-after-fcn.test |
new file mode 100644 |
index 0000000000000000000000000000000000000000..197c87b5e5f711650ac0ce27b5c3dd01457c584b |
--- /dev/null |
+++ b/tests_lit/parse_errs/symtab-after-fcn.test |
@@ -0,0 +1,19 @@ |
+; Test if we detect if the value symbol table appears after a function block. |
+ |
+; REQUIRES: no_minimal_build |
+ |
+; RUN: not %pnacl_sz -bitcode-as-text %p/Inputs/symtab-after-fcn.tbc \ |
+; RUN: -bitcode-format=pnacl -notranslate -build-on-read 2>&1 \ |
+; RUN: | FileCheck %s |
+ |
+; CHECK: Module valuesymtab not allowed after function blocks |
+ |
+; RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/symtab-after-fcn.tbc \ |
+; RUN: -output - | pnacl-bcdis -no-records | FileCheck -check-prefix=ASM %s |
+ |
+; ASM: module { // BlockID = 8 |
+; ASM: function void @f0() { // BlockID = 12 |
+; ASM: } |
+; ASM: valuesymtab { // BlockID = 14 |
+; ASM: } |
+; ASM: } |