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

    <tr>
        <th>Summary</th>
        <td>
            [Clang][OpenMP] Compilation Aborted (core dumped)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            crash
      </td>
    </tr>

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

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

<pre>
    Getting an Aborted (core dumped) from compiling with clang. You can reproduce the core dump with the attached reduced.ll file using ```opt -p globalopt reduced.ll```

reduced.ll:
```
; ModuleID = 'reduced.bc'
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8"
target triple = "amdgcn-amd-amdhsa"

@x = internal global i32 poison

; Function Attrs: norecurse
define amdgpu_kernel void @__omp_offloading_10306_92b48f5_test_uses_allocators_large_cap_l31(i32 %0) #0 {
entry:
  store i32 %0, ptr @x, align 4
  ret void
}

attributes #0 = { norecurse }
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0lE-vqygUwD8NboiNglhduLC36cssXmaSWc3KIJ4qbxAIoHPvt5-g9s-dZJL20AO_8w9OD_dejhqgQeyC2DXhS5iMa_gv7ubFiynpzfDV_IAQpB4x17jtjQswYEQqYRzgYZktDIjU-O7MjIWZrVSR_UeGCQvF9XjCf5kFC66xA-vMsAjAYQL8tN_ZuMVD4GKCATuI2HBSCt-lArz46BOV2f4xNuDU4lGZnquovPgng7Irytpdvh3TY-u_HL3gn2ZYFPx2xYheMSLnh1UvEDnvWOBuhIAHHrjiX2YJB0sgtYi2ZbGJ1ObvCkG0pbtILX1XineMvZ-U78oZ0TYvM0RbwsqnjCdVPCGHTOXD15qXm0m6kmIn14eztagOpi4PszWvye41XZ8B0pXlcZflJF3zbPMTl3Ql2eYiLqne3JZF-iclacvSH3mqJaJtzLhChHy7teCkVfC4MT4Po9Apn4f4nTx_4ocsss-NlTqA01wdz40lJdga6Y3-htMLvi1aBGk0bkNwHtEWa-NALM7DDg1wlxpwDG2X7m9wGhRejRwwKrKuM7PtzP2uDB-kHrs8o1nZ1aQvqjvrAvjQLR58x5UyggfjfKdiZZ3gtlM0R6SKuSHCsviHQIRmGJ0ve2jQwX09uw9jH2L7v_gPbIOLaXzG31zJUePiATsIW5pHqefre-U8BCf7JYA_Qsb7PV9eteOXwfemT4aGDjWteQJNXtaU5TU502Rq-ppWfX9nNC8KwUSRlQOh1b2-U1oNFeOJbEhGaFbRnJAsz-mJngcooBe04LWo6xoVGcxcqpNS63wybkyk9ws0JcsZSxTvQflt6BBiLOjZxtcnH4gQ4bifosauiWuiedovo0dFpqQP_uUwyKC2wfURpwxiV8Quv1vQP_9A7Io_tknE93b4v6GVLE41Uwg2NgsiN0RuowzT0p-EmRG5xVjHklpnfoEIiNy2Sjwit62YfwMAAP__v0yFZw">