<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 - variable in allocate directive not being allocated with the default allocator"
href="https://bugs.llvm.org/show_bug.cgi?id=51705">51705</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>variable in allocate directive not being allocated with the default allocator
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Clang Compiler Support
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kli@ca.ibm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>In the following code, the variable "y" is not allocated using the default
allocator set in the omp_set_default_allocator called.
#include <omp.h>
int main()
{
const unsigned alignment = 16;
omp_memspace_handle_t x_memspace = omp_default_mem_space;
omp_alloctrait_t x_traits[1] = {omp_atk_alignment, alignment};
omp_allocator_handle_t x_alloc = omp_init_allocator(x_memspace, 1, x_traits);
omp_set_default_allocator(x_alloc);
float x, y;
#pragma omp allocate(y)
#pragma omp allocate(x) allocator(x_alloc)
}
IR:
...
%y = alloca float, align 4
...
%.x..void.addr = call i8* @__kmpc_alloc(i32 %0, i64 4, i8* %conv2)</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>