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.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c
index fc138e26fde..27e24ac1201 100644
--- a/clang/test/CodeGen/object-size.c
+++ b/clang/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");
+}
OpenPOWER on IntegriCloud