Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(902)

Unified Diff: tests_lit/parse_errs/fcn-value-index-isnt-defined.test

Issue 1346723002: Fix operand lookup in functions to check if local index out of range. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit in last patch. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/parse_errs/Inputs/fcn-value-index-isnt-defined.tbc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/parse_errs/fcn-value-index-isnt-defined.test
diff --git a/tests_lit/parse_errs/fcn-value-index-isnt-defined.test b/tests_lit/parse_errs/fcn-value-index-isnt-defined.test
new file mode 100644
index 0000000000000000000000000000000000000000..935987370ee8f96127fcdddbe649958cc3e5eeb2
--- /dev/null
+++ b/tests_lit/parse_errs/fcn-value-index-isnt-defined.test
@@ -0,0 +1,44 @@
+; Test if we detect duplicate names in a symbol table.
+
+; REQUIRES: no_minimal_build
+
+; RUN: not %pnacl_sz -bitcode-as-text \
+; RUN: %p/Inputs/fcn-value-index-isnt-defined.tbc \
+; RUN: -bitcode-format=pnacl -notranslate -build-on-read 2>&1 \
+; RUN: | FileCheck %s
+
+; CHECK: Value index {{.*}} not defined!
+
+; RUN: pnacl-bcfuzz -bitcode-as-text \
+; RUN: %p/Inputs/fcn-value-index-isnt-defined.tbc -output - \
+; RUN: | not pnacl-bcdis -no-records | FileCheck -check-prefix=ASM %s
+
+; ASM: module { // BlockID = 8
+; ASM: version 1;
+; ASM: types { // BlockID = 17
+; ASM: count 4;
+; ASM: @t0 = i32;
+; ASM: @t1 = i32 ();
+; ASM: @t2 = i8;
+; ASM: @t3 = void;
+; ASM: }
+; ASM: define external i32 @f0();
+; ASM: globals { // BlockID = 19
+; ASM: count 0;
+; ASM: }
+; ASM: valuesymtab { // BlockID = 14
+; ASM: @f0 : "f";
+; ASM: }
+; ASM: function i32 @f0() { // BlockID = 12
+; ASM: blocks 1;
+; ASM: constants { // BlockID = 11
+; ASM: i32:
+; ASM: %c0 = i32 1;
+; ASM: }
+; ASM: %b0:
+; ASM: %v0 = alloca i8, i32 %c0, align 4;
+; ASM: ret void %v1;
+; ASM: Error({{.*}}): Can't find type for %v1
+; ASM: }
+; ASM: }
+
« no previous file with comments | « tests_lit/parse_errs/Inputs/fcn-value-index-isnt-defined.tbc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698