summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/builtins
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 13:15:01 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-06 13:15:01 +0000
commita8363c9df9e427d10edcb685bc48c9eb22e39bfc (patch)
treeb4128e249dae2ba31c4ab73c70b09a418b6e2c17 /gcc/testsuite/gcc.c-torture/execute/builtins
parentbc4fdef26bde4db30a1a0d4ca8e109c83c12750c (diff)
downloadgcc-a8363c9df9e427d10edcb685bc48c9eb22e39bfc.tar.gz
2010-12-06 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 167487 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@167494 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/builtins')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c
index e6ddc086038..b244f892519 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.c
@@ -21,7 +21,7 @@ char *s3 = "FGH";
char *s4;
size_t l1 = 1;
static char buffer[32];
-char *ptr = "barf";
+char * volatile ptr = "barf"; /* prevent constant propagation to happen when whole program assumptions are made. */
void
__attribute__((noinline))
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
index 2862ab6dc91..8a283626d0f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.c
@@ -20,7 +20,7 @@ char *s3 = "FGH";
char *s4;
size_t l1 = 1;
static char buffer[32];
-char *ptr = "barf";
+char * volatile ptr = "barf"; /* prevent constant propagation to happen when whole program assumptions are made. */
void
__attribute__((noinline))
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.c
index 46f3374c4dd..9e10dba1b67 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.c
@@ -16,10 +16,10 @@ extern void *memset (void *, int, size_t);
const char s1[] = "123";
char p[32] = "";
-char *s2 = "defg";
-char *s3 = "FGH";
+char * volatile s2 = "defg"; /* prevent constant propagation to happen when whole program assumptions are made. */
+char * volatile s3 = "FGH"; /* prevent constant propagation to happen when whole program assumptions are made. */
char *s4;
-size_t l1 = 1;
+volatile size_t l1 = 1; /* prevent constant propagation to happen when whole program assumptions are made. */
int i;
void
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.c
index 8c7d72f391d..8a3f37203e5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.c
@@ -22,7 +22,7 @@ char *s3 = "FGH";
char *s4;
size_t l1 = 1;
static char buffer[32];
-char *ptr = "barf";
+char * volatile ptr = "barf"; /* prevent constant propagation to happen when whole program assumptions are made. */
int
__attribute__((noinline))
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.c
index 5c150901800..5649b9e9017 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.c
@@ -22,7 +22,7 @@ char *s3 = "FGH";
char *s4;
size_t l1 = 1;
static char buffer[32];
-char *ptr = "barf";
+char * volatile ptr = "barf"; /* prevent constant propagation to happen when whole program assumptions are made. */
int
__attribute__((noinline))