OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [pr33017.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR tree-optimization/33017 */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -ftree-vectorize" } */
4
 
5
extern __SIZE_TYPE__ strlen (const char *);
6
extern void abort (void);
7
 
8
char *
9
__attribute__((noinline))
10
foo (const char *string)
11
{
12
  int len;
13
  static char var[0x104];
14
  int off;
15
  len = strlen (string);
16
  for (off = 0; off < 64; off++)
17
    var[len + off + 2] = 0x57;
18
  return var;
19
}
20
 
21
int
22
main (void)
23
{
24
  char *p = foo ("abcd");
25
  int i;
26
  for (i = 0; i < 0x104; i++)
27
    if (p[i] != ((i >= 6 && i < 70) ? 0x57 : 0))
28
      abort ();
29
  return 0;
30
}

powered by: WebSVN 2.1.0

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