summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr51074.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/vect/pr51074.c')
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr51074.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/pr51074.c b/gcc/testsuite/gcc.dg/vect/pr51074.c
new file mode 100644
index 00000000000..30913999400
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr51074.c
@@ -0,0 +1,24 @@
+/* PR tree-optimization/51074 */
+
+#include "tree-vect.h"
+
+struct S { int a, b; } s[8];
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ for (i = 0; i < 8; i++)
+ {
+ s[i].b = 0;
+ s[i].a = i;
+ }
+ asm volatile ("" : : : "memory");
+ for (i = 0; i < 8; i++)
+ if (s[i].b != 0 || s[i].a != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */