diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/vector-compare-2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/c-c++-common/vector-compare-2.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/vector-compare-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/vector-compare-2.c new file mode 100644 index 000000000..5ebe9e3ca --- /dev/null +++ b/gcc-4.9/gcc/testsuite/c-c++-common/vector-compare-2.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */ +/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */ +/* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */ +/* Ignore warning on some powerpc-ibm-aix configurations. */ +/* { dg-prune-output "non-standard ABI extension" } */ + +/* Test if C_MAYBE_CONST are folded correctly when + creating VEC_COND_EXPR. */ + +typedef int vec __attribute__((vector_size(16))); + +vec i,j; +extern vec a, b, c; + +extern int p, q, z; +extern vec foo (int); + +vec +foo (int x) +{ + return foo (p ? q :z) > a; +} + +vec +bar (int x) +{ + return b > foo (p ? q :z); +} + + |