https://bugs.llvm.org/show_bug.cgi?id=44788
Bug ID: 44788
Summary: Function pointer in template argument
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangb...@nondot.org
Reporter: dr...@jwdt.org
CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org
Created attachment 23092
--> https://bugs.llvm.org/attachment.cgi?id=23092&action=edit
Testcase
The attached testcase fails compilation with C++ for OpenCL
Compile command: clang++ -cl-std=clc++ -x cl -emit-llvm
--target=spir64-unknown-unknown -O3 -c test.cl -o test.bc
Clang version: latest master, commit 12fe9b26ec88bb2dd40d574a644edca302e804b2
Error message:
clang-10: warning: Unknown CUDA version 10.2. Assuming the latest supported
version 10.1 [-Wunknown-cuda-version]
test.cl:11:10: error: taking address of function is not allowed
test(foo);
^
1 error generated.
The OpenCL C++ spec says: function pointers ... [are not supported by OpenCL
C++] unless they are a compile-time constant expression.
I am not sure about clang C++ for OpenCL, but I think this would be an
interesting feature to support for using modern C++.
--
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