summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c
downloadcbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2
cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c')
-rw-r--r--gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c b/gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c
new file mode 100644
index 000000000..58e4fc3d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/gcc-bug-e.c
@@ -0,0 +1,44 @@
+#include "harness.h"
+
+typedef struct n_a
+{
+ signed char m1;
+ short m2;
+ int m3;
+ double m4;
+ vector float m5;
+}
+n_a;
+
+static void
+initn_a(signed char p1, short p2, int p3, double p4, vector float p5)
+{
+ n_a i;
+ static struct
+ {
+ n_a b;
+ char a;
+ }
+ x;
+
+ i.m1 = p1;
+ i.m2 = p2;
+ i.m3 = p3;
+ i.m4 = p4;
+ i.m5 = p5;
+
+ check(i.m1 == -17, "i.m1");
+ check(i.m2 == 9165, "i.m2");
+ check(i.m3 == -1857760764, "i.m3");
+ check(i.m4 == 7.3e+18, "i.m4");
+ check(vec_all_eq(i.m5, ((vector float){-5.02e+08,
+ -4.34e+08,
+ -1.04e+09,
+ 1.42e+09})), "i.m5");
+}
+
+static void test()
+{
+ initn_a(-17, 9165, -1857760764, 7.3e+18,
+ ((vector float){-5.02e+08, -4.34e+08, -1.04e+09, 1.42e+09}));
+}