https://bugs.llvm.org/show_bug.cgi?id=44294
Bug ID: 44294
Summary: The address space is not printed correctly in function
parameters
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangb...@nondot.org
Reporter: anastasia.stul...@arm.com
CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org
Clang looses information about address space of function parameters in some
cases. See examples from review:
https://reviews.llvm.org/D71272#inline-646266
void myRead(read_only image1d_t);
typedef write_only image1d_t img1d_wo;
kernel void k1(img1d_wo img) {
myRead(img); // expected-error {{passing '__private img1d_wo' (aka '__private
__write_only image1d_t') to parameter of incompatible type '__read_only
image1d_t'}}
}
or
void f_gen(__generic int *arg_gen) {}
void f(){
__constant int *var_sub;
f_gen(var_sub); // expected-error {{passing '__constant int *__private' to
parameter of type '__generic int *' changes address space of pointer}}
}
'__private' is not printed in the second type in both cases.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs