diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2018-01-25 08:49:33 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2018-01-25 08:49:33 +0000 |
commit | 8bbc33baa40010c8f5ca1af9b8bfffd67ae654ad (patch) | |
tree | c5e2748190eff9453ae08b9117c4c546c48cc539 /gcc/testsuite/gcc.dg/pr63594-1.c | |
parent | 03ac50856c9fc8c96b7a17239ee40a10397750a7 (diff) | |
download | gcc-tarball-8bbc33baa40010c8f5ca1af9b8bfffd67ae654ad.tar.gz |
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr63594-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr63594-1.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr63594-1.c b/gcc/testsuite/gcc.dg/pr63594-1.c new file mode 100644 index 0000000000..b8cd201fd0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr63594-1.c @@ -0,0 +1,66 @@ +/* PR target/63594 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wno-psabi" } */ +/* { dg-additional-options "-mno-mmx" { target i?86-*-* x86_64-*-* } } */ +/* { dg-prune-output "non-standard ABI extension" } */ + +#define C1 c +#define C2 C1, C1 +#define C4 C2, C2 +#define C8 C4, C4 +#define C16 C8, C8 +#define C32 C16, C16 +#define C64 C32, C32 +#define C_(n) n +#define C(n) C_(C##n) + +#define T(t,s) \ +typedef t v##t##s __attribute__ ((__vector_size__ (s * sizeof (t)))); \ +v##t##s \ +test1##t##s (t c) \ +{ \ + v##t##s v = { C(s) }; \ + return v; \ +} \ + \ +v##t##s \ +test2##t##s (t *p) \ +{ \ + t c = *p; \ + v##t##s v = { C(s) }; \ + return v; \ +} + +typedef long long llong; + +T(char, 64) +T(char, 32) +T(char, 16) +T(char, 8) +T(char, 4) +T(char, 2) +T(char, 1) +T(short, 32) +T(short, 16) +T(short, 8) +T(short, 4) +T(short, 2) +T(short, 1) +T(int, 16) +T(int, 8) +T(int, 4) +T(int, 2) +T(int, 1) +T(float, 16) +T(float, 8) +T(float, 4) +T(float, 2) +T(float, 1) +T(llong, 8) +T(llong, 4) +T(llong, 2) +T(llong, 1) +T(double, 8) +T(double, 4) +T(double, 2) +T(double, 1) |