summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/object-size.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/object-size.c')
-rw-r--r--clang/test/CodeGen/object-size.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c
index 36dc341e932..970d11f6e16 100644
--- a/clang/test/CodeGen/object-size.c
+++ b/clang/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");
+}
OpenPOWER on IntegriCloud