projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b597c7f
)
more tricky endless loop stuff
author
Matthias Braun
<matze@braunis.de>
Wed, 10 Sep 2008 15:00:22 +0000
(15:00 +0000)
committer
Matthias Braun
<matze@braunis.de>
Wed, 10 Sep 2008 15:00:22 +0000
(15:00 +0000)
[r21822]
ir/be/test/fehler154.c
[new file with mode: 0644]
patch
|
blob
diff --git a/ir/be/test/fehler154.c
b/ir/be/test/fehler154.c
new file mode 100644
(file)
index 0000000..
a5f48e5
--- /dev/null
+++ b/
ir/be/test/fehler154.c
@@ -0,0
+1,30
@@
+#include <stdio.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int foo(int x)
+{
+ while(x == 0)
+ ;
+
+ return x;
+}
+
+int k;
+
+void handler(int sig)
+{
+ printf("ok\n");
+ _exit(0);
+}
+
+int main(void) {
+ alarm(1);
+ signal(SIGALRM, handler);
+
+ foo(0);
+
+ printf("endless loop returned!\n");
+ return 1;
+}