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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr33017.c] - Rev 311

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

/* PR tree-optimization/33017 */
/* { dg-do run } */
/* { dg-options "-O2 -ftree-vectorize" } */
 
extern __SIZE_TYPE__ strlen (const char *);
extern void abort (void);
 
char *
__attribute__((noinline))
foo (const char *string)
{
  int len;
  static char var[0x104];
  int off;
  len = strlen (string);
  for (off = 0; off < 64; off++)
    var[len + off + 2] = 0x57;
  return var;
}
 
int
main (void)
{
  char *p = foo ("abcd");
  int i;
  for (i = 0; i < 0x104; i++)
    if (p[i] != ((i >= 6 && i < 70) ? 0x57 : 0))
      abort ();
  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.