diff options
author | John McCall <rjmccall@apple.com> | 2010-03-12 23:14:13 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-03-12 23:14:13 +0000 |
commit | 44c064be730e44c5994ddde4e312dcd628438af0 (patch) | |
tree | 60320510a04841bf30b3909e23234a5a707adf78 /clang/test/Sema/overloadable.c | |
parent | f6442f80cbb700877631534fe6eb0d69e2839eec (diff) | |
download | bcm5719-llvm-44c064be730e44c5994ddde4e312dcd628438af0.tar.gz bcm5719-llvm-44c064be730e44c5994ddde4e312dcd628438af0.zip |
Check compatibility of vector types using their canonicalizations.
Fixes an assertion arising C overload analysis, but really I can't imagine
that this wouldn't cause a thousand other uncaught failures.
Fixes PR6600.
llvm-svn: 98400
Diffstat (limited to 'clang/test/Sema/overloadable.c')
-rw-r--r-- | clang/test/Sema/overloadable.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/Sema/overloadable.c b/clang/test/Sema/overloadable.c index ff631ed9c85..28c3e4cf8c9 100644 --- a/clang/test/Sema/overloadable.c +++ b/clang/test/Sema/overloadable.c @@ -50,4 +50,13 @@ void test_promote(short* sp) { promote(sp); // expected-error{{call to unavailable function 'promote'}} } - +// PR6600 +typedef double Double; +typedef Double DoubleVec __attribute__((vector_size(16))); +typedef int Int; +typedef Int IntVec __attribute__((vector_size(16))); +double magnitude(DoubleVec) __attribute__((__overloadable__)); +double magnitude(IntVec) __attribute__((__overloadable__)); +double test_p6600(DoubleVec d) { + return magnitude(d) * magnitude(d); +} |