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

Unified Diff: tests_lit/parse_errs/bad-intrinsic-arg.test

Issue 1359993002: Fix code checking arguments to an intrinsic call. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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/bad-intrinsic-arg.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/bad-intrinsic-arg.test
diff --git a/tests_lit/parse_errs/bad-intrinsic-arg.test b/tests_lit/parse_errs/bad-intrinsic-arg.test
new file mode 100644
index 0000000000000000000000000000000000000000..6b540e9800bcc10c593dc27edb5ee050848bbeba
--- /dev/null
+++ b/tests_lit/parse_errs/bad-intrinsic-arg.test
@@ -0,0 +1,28 @@
+; Tests that we correctly check parameter types for intrinsics.
+
+; REQUIRES: no_minimal_build
+
+; RUN: not %pnacl_sz -bitcode-as-text \
+; RUN: %p/Inputs/bad-intrinsic-arg.tbc \
+; RUN: -bitcode-format=pnacl -notranslate -build-on-read 2>&1 \
+; RUN: | FileCheck %s
+
+; CHECK: Intrinsic llvm.nacl.setjmp expects i32 for argument 1. Found: double
+
+; RUN: pnacl-bcfuzz -bitcode-as-text \
+; RUN: %p/Inputs/bad-intrinsic-arg.tbc -output - \
+; RUN: | not pnacl-bcdis -no-records | FileCheck -check-prefix=ASM %s
+
+; ASM: module { // BlockID = 8
+; ASM: declare external i32 @f0(double);
+; ASM: valuesymtab { // BlockID = 14
+; ASM: @f0 : "llvm.nacl.setjmp";
+; ASM: Error(118:0): Intrinsic llvm.nacl.setjmp expects i8* for argument 1. Found: double
+; ASM: }
+; ASM: function void @f3(i32 %p0, double %p1) { // BlockID = 12
+; ASM: blocks 1;
+; ASM: %b0:
+; ASM: %v0 = call i32 @f0(double %p1);
+; ASM: ret void;
+; ASM: }
+; ASM: }
« no previous file with comments | « tests_lit/parse_errs/Inputs/bad-intrinsic-arg.tbc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698