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
/
fehler002.c
1
/*$ -fno-inline $*/
2
/* codeselector produces invalid AM for cmov */
3
4
#include <stdio.h>
5
6
int k = 20;
7
8
int func(void)
9
{
10
k = 42;
11
return 1;
12
}
13
14
int main(int argc, char **argv)
15
{
16
int val = k;
17
int res;
18
if(func()) {
19
res = val;
20
} else {
21
res = 20;
22
}
23
printf("Res: %d (should be 20)\n", res);
24
return 0;
25
}