aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/catch-undef-behavior.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/catch-undef-behavior.c')
-rw-r--r--test/CodeGen/catch-undef-behavior.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c
index fef1587fad00..ee0b6586dd84 100644
--- a/test/CodeGen/catch-undef-behavior.c
+++ b/test/CodeGen/catch-undef-behavior.c
@@ -1,7 +1,17 @@
-// RUN: %clang_cc1 -fcatch-undefined-behavior -emit-llvm-only %s
+// RUN: %clang_cc1 -fcatch-undefined-behavior -emit-llvm %s -o - | FileCheck %s
// PR6805
+// CHECK: @foo
void foo() {
union { int i; } u;
+ // CHECK: objectsize
+ // CHECK: icmp uge
u.i=1;
}
+
+// CHECK: @bar
+int bar(int *a) {
+ // CHECK: objectsize
+ // CHECK: icmp uge
+ return *a;
+}