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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr34029-1.c] - Rev 749

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

static const char s[] = "ab.cd.efghijk";
 
int
foo (const char *x)
{
  const char *a;
  int b = 0;
 
  a = __builtin_strchr (s, '.');
  if (a == 0)
    b = 1;
  else if ((a = __builtin_strchr (a + 1, '.')) == 0)
    b = 1;
  else if (__builtin_strncmp (s, x, a - s))
    b = 1;
  else if (__builtin_strncmp (a + 1, x + (a - s + 1), 4) < 0)
    b = 1;
 
  if (b)
    return 4;
  return 0;
}
 

Go to most recent revision | 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.