Commit fe24cc36 by Richard Sandiford Committed by Richard Sandiford

chk.h (LOCAL): Define.

gcc/testsuite/
	* 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.

From-SVN: r123105
parent 7c0ffd09
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> 2007-03-19 Seongbae Park <seongbae.park@gmail.com>
PR tree-optimization/30590 PR tree-optimization/30590
...@@ -79,3 +79,11 @@ extern volatile int memset_disallowed, strcpy_disallowed, stpcpy_disallowed; ...@@ -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 strncpy_disallowed, strcat_disallowed, strncat_disallowed;
extern volatile int sprintf_disallowed, vsprintf_disallowed; extern volatile int sprintf_disallowed, vsprintf_disallowed;
extern volatile int snprintf_disallowed, vsnprintf_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
...@@ -13,7 +13,7 @@ extern int sprintf (char *, const char *, ...); ...@@ -13,7 +13,7 @@ extern int sprintf (char *, const char *, ...);
#include "chk.h" #include "chk.h"
const char s1[] = "123"; LOCAL const char s1[] = "123";
char p[32] = ""; char p[32] = "";
char *s2 = "defg"; char *s2 = "defg";
char *s3 = "FGH"; char *s3 = "FGH";
......
...@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t); ...@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
#include "chk.h" #include "chk.h"
const char s1[] = "123"; LOCAL const char s1[] = "123";
char p[32] = ""; char p[32] = "";
char *s2 = "defg"; char *s2 = "defg";
char *s3 = "FGH"; char *s3 = "FGH";
......
...@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t); ...@@ -11,7 +11,7 @@ extern int memcmp (const void *, const void *, size_t);
#include "chk.h" #include "chk.h"
const char s1[] = "123"; LOCAL const char s1[] = "123";
char p[32] = ""; char p[32] = "";
char *s2 = "defg"; char *s2 = "defg";
char *s3 = "FGH"; char *s3 = "FGH";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment