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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [vrp-6.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
#include <limits.h>
2
 
3
extern void exit (int);
4
extern void abort ();
5
 
6
void test01(unsigned int a, unsigned int b)
7
{
8
  if (a < 5)
9
    abort();
10
  if (b < 5)
11
    abort();
12
  if (a - b != 5)
13
    abort();
14
}
15
 
16
void test02(unsigned int a, unsigned int b)
17
{
18
  if (a >= 12)
19
    if (b > 15)
20
      if (a - b < UINT_MAX - 15U)
21
        abort ();
22
}
23
 
24
int main(int argc, char *argv[])
25
{
26
  unsigned x = 0x80000000;
27
  test01(x + 5, x);
28
  test02(14, 16);
29
  exit (0);
30
}
31
 
32
 
33
 

powered by: WebSVN 2.1.0

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