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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr30364-2.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
 
3
#include <limits.h>
4
extern void abort (void);
5
 
6
int f(unsigned int a, unsigned int b)
7
{
8
  if (a > INT_MAX - 15) return 0;
9
  if (b > INT_MAX - 15) return 0;
10
 
11
  int c = (a - 20) + (b - 20);
12
  return c > INT_MAX - 15;
13
}
14
 
15
int main()
16
{
17
  if (f (INT_MAX - 15, 41) != 1)
18
    abort ();
19
  return 0;
20
}

powered by: WebSVN 2.1.0

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