<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 - Vector literal construction from smaller vectors does not work as documented"
href="https://bugs.llvm.org/show_bug.cgi?id=33244">33244</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Vector literal construction from smaller vectors does not work as documented
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Jochen.Wilhelmy@tomtom.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The following minimal example does not work as documented:
typedef float float2 __attribute__((ext_vector_type(2)));
typedef float float4 __attribute__((ext_vector_type(4)));
int main() {
float4 vf = (float4)((float2)(1.0f, 2.0f), (float2)(3.0f, 4.0f));
}
The documentation says it should work:
<a href="https://clang.llvm.org/docs/LanguageExtensions.html#vector-literals">https://clang.llvm.org/docs/LanguageExtensions.html#vector-literals</a>
It was tested with Clang HEAD 5.0.0 in <a href="https://wandbox.org/">https://wandbox.org/</a> (also Clang 3.8 on
Ubuntu)
It would be nice if this could be fixed as I expect it works when in OpenCL
mode and therefore should be easy to fix.</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>