aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-04-11 15:35:13 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-04-11 15:35:13 +0200
commit52cdcfb7b4733ab7190b9699926407dc22f1b0fa (patch)
treef82f6677df53ba811efe0dad4e8fc77fb5c4fd2d /gcc/testsuite/gcc.c-torture
parent7b668576fc09c86a301087f464e195678cb0aea0 (diff)
downloadgcc-52cdcfb7b4733ab7190b9699926407dc22f1b0fa.zip
gcc-52cdcfb7b4733ab7190b9699926407dc22f1b0fa.tar.gz
gcc-52cdcfb7b4733ab7190b9699926407dc22f1b0fa.tar.bz2
re PR tree-optimization/85331 (during GIMPLE pass, internal compiler error: Segmentation fault (-O1 and above))
PR tree-optimization/85331 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type from int to HOST_WIDE_INT. * gcc.c-torture/execute/pr85331.c: New test. From-SVN: r259320
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr85331.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr85331.c b/gcc/testsuite/gcc.c-torture/execute/pr85331.c
new file mode 100644
index 0000000..3ef805a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr85331.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/85331 */
+
+typedef double V __attribute__((vector_size (2 * sizeof (double))));
+typedef long long W __attribute__((vector_size (2 * sizeof (long long))));
+
+__attribute__((noipa)) void
+foo (V *r)
+{
+ V y = { 1.0, 2.0 };
+ W m = { 10000000001LL, 0LL };
+ *r = __builtin_shuffle (y, m);
+}
+
+int
+main ()
+{
+ V r;
+ foo (&r);
+ if (r[0] != 2.0 || r[1] != 1.0)
+ __builtin_abort ();
+ return 0;
+}