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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr17252.c] - Rev 826

Compare with Previous | Blame | View Log

/* PR 17252.  When a char * pointer P takes its own address, storing
   into *P changes P itself.  */
 
char *a;
 
main ()
{
  /* Make 'a' point to itself.  */
  a = (char *)&a;
 
  /* Change what 'a' is pointing to.  */
  a[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
     'if (1)'.  */
  if (a == (char *)&a)
    abort ();
 
  return 0;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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