[llvm-bugs] [Bug 33342] New: vector bool type may not be compatible with vector unsigned type in generic selection in C
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 7 03:23:57 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33342
Bug ID: 33342
Summary: vector bool type may not be compatible with vector
unsigned type in generic selection in C
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: westion717 at gmail.com
CC: llvm-bugs at lists.llvm.org
void f(vector bool int);
void g(vector unsigned int);
#define example(X) \
_Generic((X), \
vector bool int : f((vector bool int)X), \
vector unsigned int : g((vector unsigned int)X))
int main(){
vector unsigned int a;
vector bool int b;
example(a);
example(b);
}
clang -c -o a.o a.c -fno-lax-vector-conversions
a.c:14:1: error: type '__vector unsigned int' (vector of 4 'unsigned int'
values) in generic association compatible with previously specified type
'__vector __bool unsigned int' (vector of 4 'unsigned int' values)
example(a);
^~~~~~~~~~
a.c:8:19: note: expanded from macro 'example'
vector unsigned int : g((vector unsigned int)X))
^~~
a.c:14:1: note: compatible type '__vector __bool unsigned int' (vector of 4
'unsigned int' values) specified here
example(a);
^~~~~~~~~~
a.c:7:15: note: expanded from macro 'example'
vector bool int : f((vector bool int)X), \
^~~
a.c:15:1: error: type '__vector unsigned int' (vector of 4 'unsigned int'
values) in generic association compatible with previously specified type
'__vector __bool unsigned int' (vector of 4 'unsigned int' values)
example(b);
^~~~~~~~~~
a.c:8:19: note: expanded from macro 'example'
vector unsigned int : g((vector unsigned int)X))
^~~
a.c:15:1: note: compatible type '__vector __bool unsigned int' (vector of 4
'unsigned int' values) specified here
example(b);
^~~~~~~~~~
a.c:7:15: note: expanded from macro 'example'
vector bool int : f((vector bool int)X), \
^~~
2 errors generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170607/6342f595/attachment.html>
More information about the llvm-bugs
mailing list