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
PR tree-optimization/15262
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20040309-1.c
1
extern void abort ();
2
3
int foo(unsigned short x)
4
{
5
unsigned short y;
6
y = x > 32767 ? x - 32768 : 0;
7
return y;
8
}
9
10
int main()
11
{
12
if (foo (0) != 0)
13
abort ();
14
if (foo (32767) != 0)
15
abort ();
16
if (foo (32768) != 0)
17
abort ();
18
if (foo (32769) != 1)
19
abort ();
20
if (foo (65535) != 32767)
21
abort ();
22
return 0;
23
}
24