summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/5149_cmm.cmm
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/codeGen/should_run/5149_cmm.cmm')
-rw-r--r--testsuite/tests/codeGen/should_run/5149_cmm.cmm29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/5149_cmm.cmm b/testsuite/tests/codeGen/should_run/5149_cmm.cmm
new file mode 100644
index 0000000000..b1e3dd6c43
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/5149_cmm.cmm
@@ -0,0 +1,29 @@
+#include "Cmm.h"
+
+/* This code is carefully arranged to tickle the bug reported in #5149 */
+f5149
+{
+ D_ z;
+
+ z = D1;
+
+ W_ x,y;
+ x = R1;
+ y = R2;
+
+ if (x > y) {
+ goto a; /* this jump is shortcutted to g5149 */
+ } else {
+ goto b;
+ }
+
+ a:
+ jump g5149;
+ b:
+ RET_N(TO_W_(%f2i32(z)));
+}
+
+g5149
+{
+ jump %ENTRY_CODE(Sp(0));
+}