diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/vmx/1c-02.c | |
download | cbb-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/1c-02.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/vmx/1c-02.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/vmx/1c-02.c b/gcc/testsuite/gcc.dg/vmx/1c-02.c new file mode 100644 index 000000000..be6adf647 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vmx/1c-02.c @@ -0,0 +1,34 @@ +#include "harness.h" + +/* Vector types used in aggregates. */ +struct { char b; vector unsigned char a; char e; } u8; +struct { char b; vector signed char a; char e; } s8; +struct { char b; vector bool char a; char e; } b8; +struct { char b; vector unsigned short a; char e; } u16; +struct { char b; vector signed short a; char e; } s16; +struct { char b; vector bool short a; char e; } b16; +struct { char b; vector unsigned int a; char e; } u32; +struct { char b; vector signed int a; char e; } s32; +struct { char b; vector bool int a; char e; } b32; +struct { char b; vector float a; char e; } f32; +struct { char b; vector pixel a; char e; } p16; + +union { char b; vector unsigned char a; } u8u; +union { char b; vector signed char a; } s8u; +union { char b; vector bool char a; } b8u; +union { char b; vector unsigned short a; } u16u; +union { char b; vector signed short a; } s16u; +union { char b; vector bool short a; } b16u; +union { char b; vector unsigned int a; } u32u; +union { char b; vector signed int a; } s32u; +union { char b; vector bool int a; } b32u; +union { char b; vector float a; } f32u; +union { char b; vector pixel a; } p16u; + +static void test() +{ + check((long)&u8.a - (long)&u8 == 16, "u8.a"); + check((long)&u8.e - (long)&u8 == 32, "u8.e"); + check(sizeof(u8) == 48, "sizeof(u8)"); + check(sizeof(u8u) == 16, "sizeof(u8u)"); +} |