This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, i386]: Add a testcase for PR67447 (AKA 67756), insn does not satisfy its constraints
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, miyuki at gcc dot gnu dot org
- Date: Sun, 4 Oct 2015 18:01:33 +0200
- Subject: [PATCH, i386]: Add a testcase for PR67447 (AKA 67756), insn does not satisfy its constraints
- Authentication-results: sourceware.org; auth=none
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);
+}