OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr30364-3.c
1
/* { dg-do run } */
2
/* { dg-options "-fwrapv" } */
3
4
#include <limits.h>
5
extern void abort (void);
6
7
int f(int a, int b)
8
{
9
if (a > INT_MAX - 15) return 0;
10
if (b > INT_MAX - 15) return 0;
11
12
int c = (a - 20) + (b - 20);
13
return c > INT_MAX - 15;
14
}
15
16
int main()
17
{
18
if (f (INT_MAX - 15, 41) != 1)
19
abort ();
20
return 0;
21
}