summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-04 15:56:45 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-04 15:56:45 +0000
commitb77e5fec353d2c47c05b5ce446a96d042f5bb1da (patch)
treef4a0cc370255d7188f40d3f020664296e22f3c17
parent3f224d566523a631135fcc2274f48ba73c0d2461 (diff)
downloadgcc-b77e5fec353d2c47c05b5ce446a96d042f5bb1da.tar.gz
PR rtl-optimization/67447
* gcc.target/i386/pr67447.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228461 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr67447.c25
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8d21139c8db..c1282b357a8 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2015-10-04 Uros Bizjak <ubizjak@gmail.com>
+ PR rtl-optimization/67447
+ * gcc.target/i386/pr67447.c: New test.
+
+2015-10-04 Uros Bizjak <ubizjak@gmail.com>
+
* gcc.target/i386/vect-pack-trunc-1.c: Require avx512bw
effective target.
* gcc.target/i386/vect-pack-trunc-2.c: Ditto.
diff --git a/gcc/testsuite/gcc.target/i386/pr67447.c b/gcc/testsuite/gcc.target/i386/pr67447.c
new file mode 100644
index 00000000000..85a0e147e4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr67447.c
@@ -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);
+}