<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/138123>138123</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][OpenMP] TODO in atomic capture for different yet compatible types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:openmp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
NimishMishra
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
NimishMishra
</td>
</tr>
</table>
<pre>
The PR https://github.com/llvm/llvm-project/pull/131603 introduces a TODO for atomic capture for different yet compatible types. Such scenarios require implicit type casting, and end up emitting > 3 operations in the atomic capture region:
```
program main
integer :: x
real :: y
!$omp atomic capture
y = x
x = x + 1
!$omp end atomic
end program main
```
The above test produces the following TODO: `not yet implemented: atomic capture requiring implicit type casts`
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU01v2zAM_TXyhVigj9hpDj6ky3LrWmz9A7JF2xxkSZPkrvn3g-wWLdpTBQFBnkiaj-9Rp0SjQ2xZfcuk_EkzpemO0hQ1k5LV50ovefKxff9Sdd5c28cJ4eEXTDmHxNSJyQuTl5HytHS73s9MXqx9ev35FqL_g31m8hIWa5m8CCUaroBcjt4sPSbQ8Hh_vofBR9DZz9RDr0NeIq6QoWHAiC7DFTP0fg46U2cR8jVg2sHvpZ8g9eh0JJ8g4t-FIgLNwVJPeQ2DXqdMbmTyO2hnAJ2BJQDOlAsMTP0ABT5g1Jm8S0AO8oQf24k4kneFM19vw18uP4Xox6hnmDU5xk8AhSCOGKGEqxM8b2hEbV-h61YGmBRM7v0cPnxvy1jPFZg6v9ZYz_OGAJO3IDb8rU7ht9Vi_FT-fGjvfeeMn4qiuvNPCBlTLsGbMGUEg7fW_ytDKiKVtlnDnd_UKEPGGV1GU14-jatIUVI_i5FYwyvTKnNUR11hKw77RnB-lMdqarE59FLtbxohjJFaNR0KPQhjlDIHjXVFreSy5jUXQnLJjzujpOr4gHKvbo6Ho2J7jrMmuyse3Pk4VpTSgq1QN0KqyuoObXrx_mC1G5k6-YBuDi_uj-3q3m4ZE9tzSymnt1qZsl03Z0utz6y-vQ_o7h5Yfd7MTO7rXq6WaNsvr9VKLK2LtXJ7auX_AAAA__88ND3e">