20190327-1.c: New testcase.
authorRichard Biener <rguenther@suse.de>
Wed, 27 Mar 2019 13:18:39 +0000 (13:18 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 27 Mar 2019 13:18:39 +0000 (13:18 +0000)
2019-03-27  Richard Biener  <rguenther@suse.de>

* gcc.dg/torture/20190327-1.c: New testcase.

From-SVN: r269964

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/20190327-1.c [new file with mode: 0644]

index 00eac8cde770e9e35e83cd07989a3737934ae577..0679cb72e529d81ab1875d994a640831a7da0f22 100644 (file)
@@ -1,3 +1,7 @@
+2019-03-27  Richard Biener  <rguenther@suse.de>
+
+       * gcc.dg/torture/20190327-1.c: New testcase.
+
 2019-03-27  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/88247
diff --git a/gcc/testsuite/gcc.dg/torture/20190327-1.c b/gcc/testsuite/gcc.dg/torture/20190327-1.c
new file mode 100644 (file)
index 0000000..bb20e7f
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+
+typedef long v2di __attribute__((vector_size(16)));
+v2di v;
+void __attribute__((noinline))
+foo()
+{
+  v = (v2di){v[1], v[0]};
+}
+
+int main()
+{
+  v[0] = 1;
+  foo ();
+  if (v[0] != 0 || v[1] != 1)
+    __builtin_abort ();
+  return 0;
+}