aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/object-size.c
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-10-26 23:05:19 +0000
committerMike Stump <mrs@apple.com>2009-10-26 23:05:19 +0000
commit660e6f79a138a30a437c02142f23e7ef4eb21b2e (patch)
tree690d99e4f88f5c0ee586c0ea0078998166860c28 /test/CodeGen/object-size.c
parent70881dfdd85394575cf95f9cf618742b46b6e1e7 (diff)
__builtin_object_size refinements. Also handle stack based objects. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/object-size.c')
-rw-r--r--test/CodeGen/object-size.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/object-size.c b/test/CodeGen/object-size.c
index 36dc341e93..970d11f6e1 100644
--- a/test/CodeGen/object-size.c
+++ b/test/CodeGen/object-size.c
@@ -47,3 +47,13 @@ void test6() {
// CHECK: call ___inline_strcpy_chk
strcpy((++i, gbuf), "Hi there");
}
+
+void test7() {
+ char buf[57];
+
+ // CHECK: movabsq $53, %rdx
+ // CHECK-NEXT: movq %rax, %rdi
+ // CHECK-NEXT: movq %rcx, %rsi
+ // CHECK-NEXT: call ___strcpy_chk
+ strcpy(&buf[4], "Hi there");
+}