[cfe-commits] r85535 - /cfe/trunk/test/CodeGen/object-size.c

Mike Stump mrs at apple.com
Thu Oct 29 16:29:54 PDT 2009


Author: mrs
Date: Thu Oct 29 18:29:54 2009
New Revision: 85535

URL: http://llvm.org/viewvc/llvm-project?rev=85535&view=rev
Log:
Add yet more testcases.

Modified:
    cfe/trunk/test/CodeGen/object-size.c

Modified: cfe/trunk/test/CodeGen/object-size.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/object-size.c?rev=85535&r1=85534&r2=85535&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/object-size.c (original)
+++ cfe/trunk/test/CodeGen/object-size.c Thu Oct 29 18:29:54 2009
@@ -88,3 +88,33 @@
   // 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");
+}





More information about the cfe-commits mailing list