projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
call optimize_cf() to delete dead-code that might arise after cond_eval
[libfirm]
/
ir
/
be
/
test
/
fehler093.c
1
typedef struct K K;
2
struct K {
3
int dummy;
4
int high;
5
int low;
6
};
7
8
K v = { 0, 0, -1 };
9
K c = { 0, 0, 4 };
10
11
#define H(A) (A)->high
12
#define L(A) (A)->low
13
14
#define LTU(A, B) \
15
(((unsigned) H(A) < (unsigned) H(B)) || (((unsigned) H(A) == (unsigned) (H(B))) && ((unsigned) L(A) < (unsigned) L(B))))
16
17
K *p_v = &v;
18
K *p_c = &c;
19
20
int main(void) {
21
K* pv = p_v;
22
K* pc = p_c;
23
int res;
24
25
res = LTU(pv,pc);
26
27
printf("Res: %d (should be 0)\n", res);
28
return 0;
29
}