OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr17252.c] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* PR 17252.  When a char * pointer P takes its own address, storing
2
   into *P changes P itself.  */
3
 
4
char *a;
5
 
6
main ()
7
{
8
  /* Make 'a' point to itself.  */
9
  a = (char *)&a;
10
 
11
  /* Change what 'a' is pointing to.  */
12
  a[0]++;
13
 
14
  /* If a's memory tag does not contain 'a' in its alias set, we will
15
     think that this predicate is superfluous and change it to
16
     'if (1)'.  */
17
  if (a == (char *)&a)
18
    abort ();
19
 
20
  return 0;
21
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.