<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/139156>139156</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang] Intrinsic `SELECTED_CHAR_KIND` returns a different value from other compilers when there is a heading space in `NAME`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
DanielCChen
</td>
</tr>
</table>
<pre>
Consider the following code:
```
program main
print *,selected_char_kind(" ascii") ! heading space test
end
```
All gfortran, ifort and XLF returns `-1` because of the heading space. Flang returns `1` however.
Is this different behavior intentional?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxckkFvnDAQhX_NcBllZcwCy4EDZRc1appD20NvKwMDTGvslW026r-vTFM1qWXJ9uH5zXxvlPc8G6Ia8g-QnxO1hcW6-qwMk27bhUzS2_FX3VrjeSSHYSGcrNb2hc2Mgx0JsgZEA4V43aK5OTs7teKq2OxPNgFBNiBbT5qGQON1WJS7_mQzgjyBlKj8wAxSgqxwXyBTXEiN0cbf1EAYyAcQDZnxPz8QTaM1zpN1wSkDskWOd1RmxO9PHToKmzMeoRAPKRQCexrU5gnttDf0zueAnVZmfivaNYt9oTu5A4jm0WNY2OPI00SOTMCeFnVn65BNIBPYGqUh65KxzsYqq1RCdVoeizKrRFolS10WR8ooHSYqyvKYExWnU5YPKi37cipOx4RrKWQucnGSaVrk1aHsyxOJsRxUWeaUEhwFrYr1Qev7erBuTtj7jeo0q9K8SLTqSfs9Vimn2BBkzeRsLG-MnPNz4uqofei32cNRaPbB__stcND7WPwR52d8NMGx8TxEJF8vT5f22-V8bT82X66fHp_PkdFfZuoNmrvSG-Hk7Io2LORwsOuNNTmPLwuZGIAj5Ch6nzebaPTcfL5AIZLN6XoJ4ebjvMkOZDdzWLb-MNgVZBfrfj0ebs7-oCGA7HYkHmT3SuVey98BAAD__4m88II">