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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [Wstrict-overflow-11.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=1" } */
3
 
4
/* Based on strict-overflow-5.c.  */
5
 
6
/* We can only unroll when using strict overflow semantics.  But we
7
   don't issue a warning for relying on undefined overflow in
8
   loops.  */
9
 
10
int foo (int i)
11
{
12
  int index;
13
  int r=0;
14
 
15
  for (index = i; index <= i+4; index+=2)
16
    r++;
17
 
18
  return r;
19
}

powered by: WebSVN 2.1.0

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