diff options
Diffstat (limited to 'clang/test/CodeGen/object-size.c')
-rw-r--r-- | clang/test/CodeGen/object-size.c | 30 |
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"); +} |