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
2009-01-20 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20000511-1.c
1
void f (int value, int expect)
2
{
3
if (value != expect)
4
abort ();
5
}
6
7
int main()
8
{
9
int a = 7, b = 6, c = 4, d = 7, e = 2;
10
11
f (a||b%c, 1);
12
f (a?b%c:0, 2);
13
f (a=b%c, 2);
14
f (a*=b%c, 4);
15
f (a/=b%c, 2);
16
f (a%=b%c, 0);
17
f (a+=b%c, 2);
18
f (d||c&&e, 1);
19
f (d?c&&e:0, 1);
20
f (d=c&&e, 1);
21
f (d*=c&&e, 1);
22
f (d%=c&&e, 0);
23
f (d+=c&&e, 1);
24
f (d-=c&&e, 0);
25
f (d||c||e, 1);
26
f (d?c||e:0, 0);
27
f (d=c||e, 1);
28
f (d*=c||e, 1);
29
f (d%=c||e, 0);
30
f (d+=c||e, 1);
31
f (d-=c||e, 0);
32
exit (0);
33
}