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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Missing diagnostic on character argument that has length greater than 1 for intrinsic `ICHAR`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            flang:frontend
      </td>
    </tr>

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

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

<pre>
    Consider the following test case:
```
character*5 :: char
integer :: res
char = "ABCDE"
res = ichar(char)
print*, res
end
```

The standard requires the argument of `ICHAR` to have length 1. Flang is silent to the code and print the collation sequence for 'A'
XLF has the same behavior as Flang, but both gfortran and ifort flag an error.

I didn't find it in  `Extensions.md`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU02PnDoQ_DXm0loE5mvnwIGdWfRWeu_ylEOuDTTQkcfetZtJ8u8jwySzh0ijsey2q6u6CgyBF0vUqupFVZcEN1mdby9omcz5vJJNBjf9bM_OBp7Ig6wEszPGfWe7gFAQGDGQKjqVXVTWqTq7__btuKLHUcgr3VUQbxUdxMOjzFZoIf-74Ck8noEqLqC07l7Ol1el9VHxFPYC7yD6-VhOR_HdsxWlO6XPDyyy01-pHf9fVoIgaCf0E3j62Dh2iCrRL9uVrICbQdXZ2_mf7n9VZyAOVrwRGLKLrJCn0Bu0C3CAwCY-ELcDjG4iQDvBTut-ZAwKOwuBPjayYxymB6WbTunmYPT13x5WPDgEvBIMtOKNnQcMR6sob9gEBicrLLPz4tHunThuYDa4AFog751PP6t9g4knq3QjMHO8L8AWorzXH0I2sLMhvU6qztJkaovpVJwwoTZv8qbKm7p4Tta2rqahKeu6KUtNRHqkoqzyU63HaiDCOeFWZ7rM6qzM67yonlOiU5ZTiXlGc1nMgyozuiKb1JjbNXV-STiEjdpTWTR5YnAgE_ZAaj1sS7Ren5XW86696GbvrERXtY6R9W2EeRq2JagyMxwkPICFxezhPgZXXeA_DiFGd2JcrAvCIzgLf3L6sF1WlN2Iu9GLJ5T9C0AL-e4bW_FsA4-fA5Js3rSryHuIqda90v3Csm5DOrqr0n3kdl-e3r37RqMo3e8TCEr3xxBurf4VAAD__-FhIVE">