projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
switch is still broken, copying over cparser testcase since noone runs the cparser...
[libfirm]
/
ir
/
be
/
test
/
unknown_combo2.c
1
/*$ -fcombo $*/
2
3
/*
4
* This is a example for the 'Top reaches if first'
5
* problem.
6
*
7
* If the Cond is evaluated BEFORE the Phi(Unknown, 1)
8
* gets the Const 1, we decide for != and cannot revert
9
* this decision...
10
*/
11
int main(int argc) {
12
int x;
13
14
if (argc) {
15
x = 1;
16
} else {
17
++argc;
18
}
19
20
if (x == 1) {
21
printf("x == 1\n");
22
} else {
23
printf("x != 1\n");
24
}
25
return 0;
26
}