* 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
+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
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
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";
#include "chk.h"
-const char s1[] = "123";
+LOCAL const char s1[] = "123";
char p[32] = "";
char *s2 = "defg";
char *s3 = "FGH";