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

Unified Diff: tests_lit/parse_errs/call-fcn-bad-return-type.ll

Issue 1354673002: Fix call instructions to check parameter types for consistency. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove typo 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/call-fcn-bad-param-type.ll ('k') | tests_lit/parse_errs/call-indirect-i8.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/parse_errs/call-fcn-bad-return-type.ll
diff --git a/tests_lit/parse_errs/call-fcn-bad-return-type.ll b/tests_lit/parse_errs/call-fcn-bad-return-type.ll
new file mode 100644
index 0000000000000000000000000000000000000000..b1c8cd8ea526333df1a2509777e94b9551ec9583
--- /dev/null
+++ b/tests_lit/parse_errs/call-fcn-bad-return-type.ll
@@ -0,0 +1,16 @@
+; Test that even if a call return type matches its declaration, it must still be
+; a legal call return type (unless declaration is intrinsic).
+
+; REQUIRES: no_minimal_build
+
+; RUN: %p2i --expect-fail -i %s --insts | FileCheck %s
+
+declare i1 @f();
+
+define void @Test() {
+entry:
+ %v = call i1 @f()
+; CHECK: Return type of called function is invalid: i1
+ ret void
+}
+
« no previous file with comments | « tests_lit/parse_errs/call-fcn-bad-param-type.ll ('k') | tests_lit/parse_errs/call-indirect-i8.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698