aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKai Tietz <ktietz@redhat.com>2014-06-01 12:35:19 +0200
committerKai Tietz <ktietz@gcc.gnu.org>2014-06-01 12:35:19 +0200
commit4a065d4a62be519ba75eeee71ae36e9b18c52188 (patch)
tree8bd4b960c7988c29693df154e002bf86ac5c1b58 /gcc
parent9406c7d0b7c4408ff4f8416cf2a61de2d8e68665 (diff)
downloadgcc-4a065d4a62be519ba75eeee71ae36e9b18c52188.zip
gcc-4a065d4a62be519ba75eeee71ae36e9b18c52188.tar.gz
gcc-4a065d4a62be519ba75eeee71ae36e9b18c52188.tar.bz2
re PR target/61377 (Bootstrap failure on x86_64-apple-darwin13)
PR target/61377 * gcc.target/i386/sibcall-6.c: New test. From-SVN: r211111
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/sibcall-6.c37
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 425ebf8..51e6e9a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-01 Kai Tietz <ktietz@redhat.com>
+
+ PR target/61377
+ * gcc.target/i386/sibcall-6.c: New test.
+
2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
DR 1227
diff --git a/gcc/testsuite/gcc.target/i386/sibcall-6.c b/gcc/testsuite/gcc.target/i386/sibcall-6.c
new file mode 100644
index 0000000..8b3bdfa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sibcall-6.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-O2" } */
+
+typedef void *ira_loop_tree_node_t;
+
+extern int end (int);
+extern int doo (int);
+
+void
+ira_traverse_loop_tree (int bb_p, ira_loop_tree_node_t loop_node,
+ void (*preorder_func) (ira_loop_tree_node_t),
+ void (*postorder_func) (ira_loop_tree_node_t))
+{
+ int l, r = 0x1, h = 0, j = 0;
+
+ if (preorder_func)
+ (*preorder_func) (loop_node);
+
+ if (bb_p)
+ {
+ for (l = 0; l < end (l); l++)
+ {
+ r += doo (l);
+ h += (l + 1) * 3;
+ h %= (l + 1);
+ r -= doo (h);
+ j += (l + 1) * 7;
+ j %= (l + 1);
+ r += doo (j);
+ }
+ }
+
+ if (postorder_func)
+ (*postorder_func) (loop_node);
+}
+/* { dg-final { scan-assembler "jmp[ \t]*.%eax" } } */