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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Warray-bounds-8.c] - Rev 801

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

/* { dg-do compile } */
/* { dg-options "-O3 -Wall" } */
/* based on PR 43833 */
 
extern unsigned char data[5];
 
unsigned char
foo (char *str)
{
  int i, j;
  unsigned char c = 0;
 
  for (i = 0; i < 8; i++)
    {
      j = i * 5;
      if ((j % 8) > 3)
	c |= data[(j / 8) + 1];
    }
  return c;
}
 

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.