summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.target/i386/vec-tmpl1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.target/i386/vec-tmpl1.C')
-rw-r--r--gcc/testsuite/g++.target/i386/vec-tmpl1.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.target/i386/vec-tmpl1.C b/gcc/testsuite/g++.target/i386/vec-tmpl1.C
new file mode 100644
index 00000000000..e0865e3515b
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/vec-tmpl1.C
@@ -0,0 +1,17 @@
+// PR c++/65211
+// { dg-additional-options "-Wno-psabi" }
+// { dg-final { scan-assembler-not "movdqa" } }
+
+typedef unsigned v4ui __attribute__ ((vector_size(16), aligned (16)));
+
+template<int I>
+static v4ui t1(unsigned *dest_data)
+{
+ typedef unsigned v4ui_1 __attribute__ ((vector_size (16), aligned (4)));
+ return ((const v4ui_1*)dest_data)[0];
+}
+
+v4ui f(unsigned int *array)
+{
+ return t1<1>(array+7);
+}