<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Support for bitfields in OpenCL"
href="https://bugs.llvm.org/show_bug.cgi?id=45339">45339</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Support for bitfields in OpenCL
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>OpenCL
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>drohr@jwdt.org
</td>
</tr>
<tr>
<th>CC</th>
<td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23283" name="attach_23283" title="testcase">attachment 23283</a> <a href="attachment.cgi?id=23283&action=edit" title="testcase">[details]</a></span>
testcase
Is there any reasons bitfields are not supported in OpenCL?
The attached code gives me the following error message compiled with clang 10
via
clang++ -o test -cl-std=clc++ -c test.cl
test.cl:12:21: error: bit-fields are not supported in OpenCL
unsigned long version : 8; /// bit 0 to 7: header version
^
test.cl:13:21: error: bit-fields are not supported in OpenCL
unsigned long headerSize : 8; /// bit 8 to 15: header size
^
test.cl:14:21: error: bit-fields are not supported in OpenCL
unsigned long blockLength : 16; /// bit 16 to 31: block length
^
test.cl:15:21: error: bit-fields are not supported in OpenCL
unsigned long feeId : 16; /// bit 32 to 47: FEE identifier
^
test.cl:16:21: error: bit-fields are not supported in OpenCL
unsigned long priority : 8; /// bit 48 to 55: priority bit
^
test.cl:17:21: error: bit-fields are not supported in OpenCL
unsigned long zero0 : 8; /// bit 56 to 63: zeroed
^
test.cl:23:18: error: expected ';' at end of declaration list
unsigned in offsetToNext : 16; /// bit 64 to 79: offset to next packet
in memory
[...]</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>