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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [Warray-bounds-8.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O3 -Wall" } */
3
/* based on PR 43833 */
4
 
5
extern unsigned char data[5];
6
 
7
unsigned char
8
foo (char *str)
9
{
10
  int i, j;
11
  unsigned char c = 0;
12
 
13
  for (i = 0; i < 8; i++)
14
    {
15
      j = i * 5;
16
      if ((j % 8) > 3)
17
        c |= data[(j / 8) + 1];
18
    }
19
  return c;
20
}

powered by: WebSVN 2.1.0

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