aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/i386-sse-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-sse-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/i386-sse-4.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-sse-4.c b/gcc/testsuite/gcc.dg/i386-sse-4.c
new file mode 100644
index 0000000..c94e7f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/i386-sse-4.c
@@ -0,0 +1,27 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O0 -msse" } */
+
+typedef void __vr __attribute__ ((__mode__ (__V4SF__)));
+
+struct vector
+{
+ union
+ {
+ __vr v;
+ float f[4];
+ };
+};
+
+void
+doit ()
+{
+ float f[4];
+ struct vector v;
+
+ f[0] = 0;
+ f[1] = 1;
+ f[2] = 2;
+ f[3] = 3;
+
+ v.v = __builtin_ia32_loadups (f);
+}