summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr47968.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr47968.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr47968.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr47968.c b/gcc/testsuite/gcc.dg/torture/pr47968.c
new file mode 100644
index 00000000000..4f33cf1f349
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr47968.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-w -Wno-psabi" } */
+
+typedef __attribute__ ((vector_size (16))) float float4;
+typedef __attribute__ ((vector_size (16))) double double2;
+
+float foo (double2 d2)
+{
+ float4 f4 = (float4) d2;
+ return *(float *) &f4;
+}