<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107208>107208</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] verification of lowering to FIR failed with "'arith.extui' op operand type 'i32' and result type 'i8' are cast incompatible"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
The following program `test.f90` causes the error. If this program should be rejected, a semantic error should be output.
```f90
character(kind=4, len=1) :: c = '0'
print *, ichar(c, 1)
end
```
```console
# flang-new test.f90
error: loc("/tmp/test.f90":2:10): 'arith.extui' op operand type 'i32' and result type 'i8' are cast incompatible
error: verification of lowering to FIR failed
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0U8GOpDgM_RpzsQoFBwo4cKjdElJfV_sDIZgi04GgJHRN__0oVHX3qE9zGQmCYvvZz89GhWBuK3MH1T9QXTO1x9n57vWkvHf3kA1ufO_-nxknZ627m_WGm3c3rxaEs4gcYj61As4CtdoDB4wzI3vvfI4vE8bZhE9AmN1uRxwYPf9gHXkE-hcVBl7UGo1-4H4Lc3vc9piDuIK4PM-zeDyp6mHRs_JKR_ZAzatZR5DXMuW1vIK8FkAtgryAvKBGkFcEqgVQ_QBv3qwRgS4JYVIqoEanSwI-Yngdv9X-dtVuDc7y00oSJ6vW22nlO34K9MiU-ktMrNNADRAB9XHZ0vkRSATykt5CJAbykggrb-Kc88-4G6Aa3YZuY6_WEeP7xinCSEqeZPIcdhu_PM3h8IxahYhm1W7ZVDTDB-NPVm_szWS0isat6Ca07s4-TTw67F_-w0kZy9-1yMZOjq1sVcZdUVNVlrKkOpu7iuUkddFoJaltzmUh6rGZmqmoi7YkOWamI0GlaEUp2kpQnetaimKgSrAYaKISSsGLMja39m3Jnb9lJoSdu0LUJJrMqoFtOBaX6JA8iVddM98lwGnYbwFKYU2I4StFNNEe294fiOr6h23j3cQZj5H9tXEQZbu33RzjFtLOUg_U30yc9yHXbgHqUxvPz2nzLv1FQP0hSwDqn8q8dfQrAAD__0YYLFk">