This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Add a testcase for PR67447 (AKA 67756), insn does not satisfy its constraints


This PR was fixed by [1]. This patch adds the testcase from PR that
failed on x86 target for the same reason.

2015-10-04  Uros Bizjak  <ubizjak@gmail.com>

    PR rtl-optimization/67447
    * gcc.target/i386/pr67447.c: New test.

Tested on x86_64-linux-gnu {,-m32}  and committed to mainline SVN.

[1] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00225.html

Uros.

Index: gcc.target/i386/pr67447.c
===================================================================
--- gcc.target/i386/pr67447.c   (revision 0)
+++ gcc.target/i386/pr67447.c   (working copy)
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=haswell" } */
+
+struct _GPart {
+  int *g;
+};
+static int b, d, e;
+int *c, *f, *g;
+int a;
+
+int fn2(int, int);
+
+int fn1(int p1) {
+  int h = fn2(p1, (int)(long)&e);
+  for (; d < e; d++)
+    if (f[d] != a)
+      h += g ? g[f[d]] : 1;
+  return h;
+}
+
+int main() {
+  struct _GPart *i;
+  for (; b < (int)(long)(i->g); b++)
+    c[b] = fn1((int)(long)i->g);
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]