<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/77841>77841</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Compiler crash during target compilation of 'uses_allocator' clause
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jhuber6
      </td>
    </tr>
</table>

<pre>
    The following test sourced from the `libomptarget` test suite fails to compile due to an unexplained crash during code generation. The reproducer is at https://godbolt.org/z/TcYfj5bfY.

```c
#include <omp.h>

void test_omp_aligned_alloc_on_device() {
  omp_memspace_handle_t memspace = omp_default_mem_space;
  omp_alloctrait_t traits[2] = {{omp_atk_alignment, 64}, {omp_atk_access, 64}};
  omp_allocator_handle_t alloc =
 omp_init_allocator(omp_default_mem_space, 1, traits);

#pragma omp target uses_allocators(alloc(traits))
  {
    int *x;

    x = (int *)omp_aligned_alloc(64, sizeof(int), alloc);
      omp_free(x, alloc);
  }

  omp_destroy_allocator(alloc);
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VE2TmzgQ_TXNpSsuaD5sDhxm7PVta_eQS06UkBqjWYEoSUwm-fVbAiYe58PlAiS97vf01Grhvb5NzA2Uz1BeErGEwbrmZVg6dlXSWfWt-Tww9tYY-1VPNwzsA3q7OMkKe2dHDAMjVKnRnR3nINyNA1TpDlx0YOyFNh6DRWnHWRtGtXAcigmXid9mI_TECqUTfkC1uMgjrWK88cROBG2nA0YZjmdn1SLZofYoAg4hzB7yJ6Ar0PVmVWdNOFh3A7p-B7p-ll_6l7LrvxwgvUD6tD-rdPvLfUy5nqRZFCPkZzvOhwHyvz5GvFqt1h21dpxbYaJpqhXGWNnaqVX8qiUDnYBqhOPzFoQYwSOPfhaS20FMynAb8H0GIb-sEMW9WEyI0HZdgfwhxcoTnNChDbi-PZTPBOVlTREJj88rMPy3iRt5CkBnrAo4XuLHR4CU7P199Xj5HZ0I1t0lr1ORbMdFmJ50uGOBTr_fCp0xi49dN9U_2H6YPztxG0VMilv94OLZ33N7oNM6ADrd01D9LvqD44h6Cgj09PYTTVx62-yi044Bqn85TqBTVUS9Xn9n22_gle6MO6D-4Ff8xRy943j-b3-ARZMfxGxe-eDstwcPf4m9R74XbaKaXNV5LRJusmNapllGWZEMTV5lRGVXpKUoVcpUdHUnpaSK87I_dZTohlIq0izLiLI8Lw6ylnlad1T1paz6ooMi5VFoczDmdYzXKNHeL9wcj6ciS4zo2Pi1VRBN_BXXRaBYiIlrYsynbrl5KFKjffD3LEEHs_aYf2ae_v43Fu55awXu8dbvx7_1ifXio-0R6PhYEEBHlEYsnpPFmeanLqDDsHQHaUega5Swvz7Nzr6wDEDXVbgHuq4b-z8AAP__-xeT_A">