<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112918>112918</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][OpenMP] support atomic operations on characters
</td>
</tr>
<tr>
<th>Labels</th>
<td>
enhancement,
flang:openmp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tblah
</td>
</tr>
</table>
<pre>
```
program o30_301
character(2) hi
!$omp atomic write
hi = 'hi'
!$omp end atomic
end program
```
Fails with `not yet implemented: Unsupported atomic type`. The wording of the standard is that atomic operations should operate on "scalar variables of intrinsic type" (OpenMP 5.2 section 4.3.1.3).
In Fortran 2023, a scalar variable is defined (3.119) as "data entity that can be represented by a single value of the type and that is not an array". I think that means that a the `character` variable in the above example is scalar and of intrinsic type.
gfortran and classic flang do not allow character variables in atomic types.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8GO4zYM_Rr6QqwhU3EmOfgwu0GAPRTtoT0XtMXYamXJkJRM8_eFYgeZbhcwbJgUHx-fHjklO3qRDtqv0J4qvuYpxC73jqeqD-bewV5tjzqBel9iGCPPGLT6U6tmDSIOE0ceskSgAwEdcbLPFFADtAvzgpzDbAf8iDbLM4s4WQR9QqC3yQK9bYlXlXizVa6p8r-xWAM_MFzfZ7Yu4YfNE8Je-ZDxLhntvDiZxWcxoN_xD5-uyxJilmcLzPdFYK9q_H0S_AjRWD9iuGCeBFNmbzgatAnzxPlZExaJnG3wCdMUrs5sEcHgEYjSwI4j3jha7p2kgmd9jtanZ0ciBDr8uoj_5Tdsa8IkQ0HEXa3rptZAx_rzeN89nkPMkT2SIg30DRl_6FNoGrlYL6aA67ppjuVqOBVShjOj-GzzfR1mYI-9YJQlSnpIhP29oFo_OsEbu6s8lSickb1ZK23CIjB75Bj5DkQ1fsc8Wf_3emAW9k_JHvWwVy_H7NUnyv6R5z7cBOUfLvdV8LfRSsv_ifcfYcbLJks5Orji7wEvjv2IJqw0nQsfL8N-uhbrP7sg1ZXptDnqI1fSNW90pL0-NIdq6sTwoR1addybwRjWdHnTTW-MtEr1u4OpbEeKdo1qDk2rtG7rXu_32jAxa-rJNLBTMrN1tXO3uQ5xrGxKV-maho7NoXLci0uPpSQSP7EfHrYFIqBvQPSYCPR7WMTPSwm3pyp2Be1Lfx0T7JSzKacXfrbZPdZ8LW1P0H5d_QbtCbc9-Imjg39plaprdN2U85JAvwOdgc6jzdO1r4cwA51Lt-3zZYnhLxky0PkxWgI6b9PdOvo3AAD__6rZcK4">