aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/object-size.c
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-10-29 23:29:54 +0000
committerMike Stump <mrs@apple.com>2009-10-29 23:29:54 +0000
commit2623aa283772f629189620a993e2343f2525d262 (patch)
treeaceba00d6b34320f8ff0baaab8f7bd7869ef6a61 /test/CodeGen/object-size.c
parent48c2af821ef9ffb51499f37ac1d332766fc20f1e (diff)
Add yet more testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/object-size.c')
-rw-r--r--test/CodeGen/object-size.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGen/object-size.c b/test/CodeGen/object-size.c
index fc138e26fd..27e24ac120 100644
--- a/test/CodeGen/object-size.c
+++ b/test/CodeGen/object-size.c
@@ -88,3 +88,33 @@ void test10() {
// CHECK: call ___inline_strcpy_chk
strcpy(*(++p), "Hi there");
}
+
+void test11() {
+ // CHECK-NOT: call ___strcpy_chk
+ // CHECK: call ___inline_strcpy_chk
+ strcpy(gp = gbuf, "Hi there");
+}
+
+void test12() {
+ // CHECK-NOT: call ___strcpy_chk
+ // CHECK: call ___inline_strcpy_chk
+ strcpy(++gp, "Hi there");
+}
+
+void test13() {
+ // CHECK-NOT: call ___strcpy_chk
+ // CHECK: call ___inline_strcpy_chk
+ strcpy(gp++, "Hi there");
+}
+
+void test14() {
+ // CHECK-NOT: call ___strcpy_chk
+ // CHECK: call ___inline_strcpy_chk
+ strcpy(--gp, "Hi there");
+}
+
+void test15() {
+ // CHECK-NOT: call ___strcpy_chk
+ // CHECK: call ___inline_strcpy_chk
+ strcpy(gp--, "Hi there");
+}