projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fehler71
[libfirm]
/
ir
/
be
/
test
/
fehler71.c
1
/*$ -fno-if-conv $*/
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
int a = 42;
7
8
void changea(void) {
9
a = 13;
10
}
11
12
int f(int f) {
13
int t = a;
14
changea();
15
16
/* must not use source address mode (loading from a) for t+1 and t+2 */
17
if(f > 10000) {
18
return t + 1;
19
}
20
return f + 2;
21
}
22
23
int main(void) {
24
srand(0);
25
printf("Res: %d\n", f(rand()));
26
return 0;
27
}