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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20041019-1.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
test_store_ccp (int i)
test_store_ccp (int i)
{
{
  int *p, a, b, c;
  int *p, a, b, c;
 
 
  if (i < 5)
  if (i < 5)
    p = &a;
    p = &a;
  else if (i > 8)
  else if (i > 8)
    p = &b;
    p = &b;
  else
  else
    p = &c;
    p = &c;
 
 
  *p = 10;
  *p = 10;
  b = 3;
  b = 3;
 
 
  /* STORE-CCP was wrongfully propagating 10 into *p.  */
  /* STORE-CCP was wrongfully propagating 10 into *p.  */
  return *p + 2;
  return *p + 2;
}
}
 
 
 
 
test_store_copy_prop (int i)
test_store_copy_prop (int i)
{
{
  int *p, a, b, c;
  int *p, a, b, c;
 
 
  if (i < 5)
  if (i < 5)
    p = &a;
    p = &a;
  else if (i > 8)
  else if (i > 8)
    p = &b;
    p = &b;
  else
  else
    p = &c;
    p = &c;
 
 
  *p = i;
  *p = i;
  b = i + 1;
  b = i + 1;
 
 
  /* STORE-COPY-PROP was wrongfully propagating i into *p.  */
  /* STORE-COPY-PROP was wrongfully propagating i into *p.  */
  return *p;
  return *p;
}
}
 
 
 
 
main()
main()
{
{
  int x;
  int x;
 
 
  x = test_store_ccp (10);
  x = test_store_ccp (10);
  if (x == 12)
  if (x == 12)
    abort ();
    abort ();
 
 
  x = test_store_copy_prop (9);
  x = test_store_copy_prop (9);
  if (x == 9)
  if (x == 9)
    abort ();
    abort ();
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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