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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Global structs with constructor/destructor crash targeting AMD GPUs
        </td>
    </tr>

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

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

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

<pre>
    This crashes when offloaded to AMD GPU:
```
struct S {
    int a;
    S() : a(1) {}
};
#pragma omp declare target
S A;
#pragma omp end declare target
```
See https://godbolt.org/z/sz78b8fof

Fix draft: https://reviews.llvm.org/D121837
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1Udtu3CAQ_Rr8groCfGMf_LDRKnmKEmnbDwAztomwsQAnbb6-s7Y3baMUcZkzMIc5M9qbX833wUbaBhUHiPRtgIn6rnNeGTA0eXp6PNOH5x8kPxF2JuxEKrbPFcYUljbRCyX13eahOOyUqCL5X54LEZKII0UevBGSrwBj6vPOi8YtgIh8DqofFfXjTA20TgWgSYUe0vbiQk__eQ2T-TLiU94XADqkNMerMHGPs_dGe5cOPvSI3nHF91pq2fluZ1j3e_uTmqC6dFXyL0OAVwtv8eDc67jTnLngMq8z0-TmmB9Vlmxy0JDy7mmG6fGZlFhd57VydKsktsCmgbZ-2rAPyGLgBrZG7cLs1N_aE7MluOaTICRa9KH1I4JrTvvxbQ7-BdqE0Ma4QESjLArBs6GBo9JHVspWSd1qphTuVVVUpuRM6lxnTmlw8SqACOFRwzijgTIy2wgmBMt5zSsmRX4wSnJpuDDclF1VFqRgMCrrPuqThWbNRy99xEtnY_pTvEzFaPsJYP_rxXgIHYS0f6eWNPjQfLizVUuzCvkNpMXdjA">