summaryrefslogtreecommitdiff
path: root/clang/test/Sema/init-vector.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/init-vector.c')
-rw-r--r--clang/test/Sema/init-vector.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Sema/init-vector.c b/clang/test/Sema/init-vector.c
new file mode 100644
index 0000000..f0cf32b
--- /dev/null
+++ b/clang/test/Sema/init-vector.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+typedef float __attribute__((vector_size (16))) v4f_t;
+
+typedef union {
+ struct {
+ float x, y, z, w;
+ }s;
+ v4f_t v;
+} vector_t;
+
+
+vector_t foo(v4f_t p)
+{
+ vector_t v = {.v = p};
+ return v;
+}