diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-08-06 10:14:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-08-06 10:14:59 +0000 |
commit | 255210ef415b9893f0e3794e8d9a704194c12f3c (patch) | |
tree | 8c016aed60efdd19fbc225aa8ee5eebbae8e0847 /test/Sema/altivec-init.c | |
parent | 2b602adf9798eaf13850efaf8ed41c69d3cf7da6 (diff) |
Introduce implicit conversions between AltiVec vectors and GCC
vectors, from Anton Yartsev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/altivec-init.c')
-rw-r--r-- | test/Sema/altivec-init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Sema/altivec-init.c b/test/Sema/altivec-init.c index 57abc9304d..b5758bc718 100644 --- a/test/Sema/altivec-init.c +++ b/test/Sema/altivec-init.c @@ -14,3 +14,22 @@ v8 foo(void) { // FIXME: test that (type)(fn)(args) still works with -faltivec // FIXME: test that c++ overloaded commas still work -faltivec } + +void __attribute__((__overloadable__)) f(v4 a) +{ +} + +void __attribute__((__overloadable__)) f(int a) +{ +} + +void test() +{ + v4 vGCC; + vector int vAltiVec; + + f(vAltiVec); + vGCC = vAltiVec; + vGCC = vGCC > vAltiVec; + vAltiVec = 0 ? vGCC : vGCC; +} |