From: Mike Stump Date: Thu, 29 Oct 2009 23:29:54 +0000 (+0000) Subject: Add yet more testcases. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2623aa283772f629189620a993e2343f2525d262;p=clang Add yet more testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85535 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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"); +}