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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr48022-1.c] - Rev 689

Compare with Previous | Blame | View Log

/* PR tree-optimization/48022 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-overflow" } */
 
int
foo (const char *x)
{
  unsigned long l = 1;
  const unsigned char *s = (const unsigned char *) (const char *) (x);
  int r = s[0] - ((const unsigned char *) (const char *) ("/"))[0];
  if (l > 0 && r == 0)
    r = (s[1] - ((const unsigned char *) (const char *) ("/"))[1]);
  return r;
}
 

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.