]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Mar 2007 09:08:04 +0000 (09:08 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Mar 2007 09:08:04 +0000 (09:08 +0000)
* gcc.c-torture/execute/builtins/chk.h (LOCAL): Define.
* gcc.c-torture/execute/builtins/sprintf-chk.c (s1): Make LOCAL.
* gcc.c-torture/execute/builtins/stpcpy-chk.c (s1): Likewise.
* gcc.c-torture/execute/builtins/strcpy-chk.c (s1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123105 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/builtins/chk.h
gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.c
gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.c

index 147dd302106b4640b3377e1e8324947006f7a652..8be2829883a52bcdf0246ec503d05026de88ad4f 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-21  Richard Sandiford  <richard@codesourcery.com>
+
+       * gcc.c-torture/execute/builtins/chk.h (LOCAL): Define.
+       * gcc.c-torture/execute/builtins/sprintf-chk.c (s1): Make LOCAL.
+       * gcc.c-torture/execute/builtins/stpcpy-chk.c (s1): Likewise.
+       * gcc.c-torture/execute/builtins/strcpy-chk.c (s1): Likewise.
+
 2007-03-19  Seongbae Park <seongbae.park@gmail.com>
 
        PR tree-optimization/30590
index dfef410c61b858641a34c44183e27c5e5a36785d..625fdef09b55aa90163b3162d5fc2286fdd5353f 100644 (file)
@@ -79,3 +79,11 @@ extern volatile int memset_disallowed, strcpy_disallowed, stpcpy_disallowed;
 extern volatile int strncpy_disallowed, strcat_disallowed, strncat_disallowed;
 extern volatile int sprintf_disallowed, vsprintf_disallowed;
 extern volatile int snprintf_disallowed, vsnprintf_disallowed;
+
+/* A storage class that ensures that declarations bind locally.  We want
+   to test non-static declarations where we know it is safe to do so.  */
+#if __PIC__ && !__PIE__
+#define LOCAL static
+#else
+#define LOCAL
+#endif
index 95d2a9d2826b50e3313bcd05d47ba7d320f4926f..2862ab6dc91f6acf8e442435580da52bf6143dcc 100644 (file)
@@ -13,7 +13,7 @@ extern int sprintf (char *, const char *, ...);
 
 #include "chk.h"
 
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
 char p[32] = "";
 char *s2 = "defg";
 char *s3 = "FGH";
index b292c0aec8733abc39f4191f7d6637509d44aec9..6091f129359274cad0ae90bbec99f2262065cfb3 100644 (file)
@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
 
 #include "chk.h"
 
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
 char p[32] = "";
 char *s2 = "defg";
 char *s3 = "FGH";
index 002dd19500ed28c52a709f0df9e04cb0f9617344..b3c1a3899d9612fe67bbe56692e14f6d52668a3f 100644 (file)
@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
 
 #include "chk.h"
 
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
 char p[32] = "";
 char *s2 = "defg";
 char *s3 = "FGH";