projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22d83a0
)
fehler71
author
Matthias Braun
<matze@braunis.de>
Tue, 14 Aug 2007 20:07:45 +0000
(20:07 +0000)
committer
Matthias Braun
<matze@braunis.de>
Tue, 14 Aug 2007 20:07:45 +0000
(20:07 +0000)
[r15546]
ir/be/test/fehler71.c
[new file with mode: 0644]
patch
|
blob
diff --git a/ir/be/test/fehler71.c
b/ir/be/test/fehler71.c
new file mode 100644
(file)
index 0000000..
f4f8f00
--- /dev/null
+++ b/
ir/be/test/fehler71.c
@@ -0,0
+1,27
@@
+/*$ -fno-if-conv $*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int a = 42;
+
+void changea(void) {
+ a = 13;
+}
+
+int f(int f) {
+ int t = a;
+ changea();
+
+ /* must not use source address mode (loading from a) for t+1 and t+2 */
+ if(f > 10000) {
+ return t + 1;
+ }
+ return f + 2;
+}
+
+int main(void) {
+ srand(0);
+ printf("Res: %d\n", f(rand()));
+ return 0;
+}