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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Wstrict-overflow-13.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow=2" } */
3
 
4
/* Source: Ian Lance Taylor.  Dual of no-strict-overflow-6.c.  */
5
 
6
/* VRP test.  This turns into an infinite loop (depending on what
7
   bigtime_test does), but at least we warn about it.  */
8
 
9
extern int bigtime_test (int);
10
int
11
foo ()
12
{
13
  int j;
14
  for (j = 1; 0 < j; j *= 2) /* { dg-warning "assuming signed overflow does not occur" "correct warning" } */
15
    if (! bigtime_test (j))
16
      return 1;
17
  return 0;
18
}

powered by: WebSVN 2.1.0

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