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 middle-end/40692
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20030120-1.c
1
/* On H8/300 port, NOTICE_UPDATE_CC had a bug that causes the final
2
pass to remove test insns that should be kept. */
3
4
unsigned short
5
test1 (unsigned short w)
6
{
7
if ((w & 0xff00) == 0)
8
{
9
if (w == 0)
10
w = 2;
11
}
12
return w;
13
}
14
15
unsigned long
16
test2 (unsigned long w)
17
{
18
if ((w & 0xffff0000) == 0)
19
{
20
if (w == 0)
21
w = 2;
22
}
23
return w;
24
}
25
26
int
27
test3 (unsigned short a)
28
{
29
if (a & 1)
30
return 1;
31
else if (a)
32
return 1;
33
else
34
return 0;
35
}
36
37
int
38
main ()
39
{
40
if (test1 (1) != 1)
41
abort ();
42
43
if (test2 (1) != 1)
44
abort ();
45
46
if (test3 (2) != 1)
47
abort ();
48
49
exit (0);
50
}