Commit dad975d2 by Diego Novillo Committed by Diego Novillo

pr17252.c: Fix thinko.


	* gcc.c-torture/execute/pr17252.c: Fix thinko.  Don't
	dereference garbage pointers.

From-SVN: r87545
parent 43e7c6a4
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> 2004-09-15 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/builtins/strlen-3.c: New test. * gcc.c-torture/execute/builtins/strlen-3.c: New test.
......
...@@ -5,14 +5,11 @@ char *a; ...@@ -5,14 +5,11 @@ char *a;
main () main ()
{ {
int i;
/* Make 'a' point to itself. */ /* Make 'a' point to itself. */
a = (char *)&a; a = (char *)&a;
/* Assign NULL to 'a' byte by byte. */ /* Change what 'a' is pointing to. */
for (i = 0; i < sizeof(char *); i++) a[0] = 0;
a[i] = 0;
/* If a's memory tag does not contain 'a' in its alias set, we will /* 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 think that this predicate is superfluous and change it to
......
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