diff gcc/testsuite/gcc.dg/torture/pr86363.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/torture/pr86363.c	Thu Oct 25 07:37:49 2018 +0900
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-additional-options "-w -Wno-psabi" } */
+
+typedef char U __attribute__ ((vector_size (16)));
+typedef unsigned V __attribute__ ((vector_size (16)));
+
+V g;
+
+V
+f (V v, U u)
+{
+  __builtin_memset (&u[v[0]], 0, 1);
+  g ^= u[0];
+  return g;
+}
+
+int
+main (void)
+{
+  V x = f ((V) { 5 }, (U) { 1 });
+
+  if (x[0] != 1 || x[1] != 1 || x[2] != 1 || x[3] != 1)
+    __builtin_abort ();
+  return 0;
+}