aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2004-09-15 12:09:55 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2004-09-15 08:09:55 -0400
commitdad975d22d0a2db8e147c503fea22ee443b37997 (patch)
tree04e6dfb8d955e1d42f44d1dbc22dc506e6a1d31b
parent43e7c6a4d49992d14aaf331c5df747dc8e245df8 (diff)
downloadgcc-dad975d22d0a2db8e147c503fea22ee443b37997.zip
gcc-dad975d22d0a2db8e147c503fea22ee443b37997.tar.gz
gcc-dad975d22d0a2db8e147c503fea22ee443b37997.tar.bz2
pr17252.c: Fix thinko.
* gcc.c-torture/execute/pr17252.c: Fix thinko. Don't dereference garbage pointers. From-SVN: r87545
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr17252.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d2d481d..cf289f1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-15 Diego Novillo <dnovillo@redhat.com>
+
+ * gcc.c-torture/execute/pr17252.c: Fix thinko. Don't
+ dereference garbage pointers.
+
2004-09-15 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/builtins/strlen-3.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17252.c b/gcc/testsuite/gcc.c-torture/execute/pr17252.c
index e31622f..ebc3c86 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr17252.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr17252.c
@@ -5,14 +5,11 @@ char *a;
main ()
{
- int i;
-
/* Make 'a' point to itself. */
a = (char *)&a;
- /* Assign NULL to 'a' byte by byte. */
- for (i = 0; i < sizeof(char *); i++)
- a[i] = 0;
+ /* Change what 'a' is pointing to. */
+ a[0] = 0;
/* If a's memory tag does not contain 'a' in its alias set, we will
think that this predicate is superfluous and change it to