OSDN Git Service

* snprintf-chk.c (ptr): Declare volatile.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / builtins / vsnprintf-chk.c
index 8c7d72f..8a3f372 100644 (file)
@@ -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))