<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123805>123805</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Asynchronous I/O seems affects procedure interface characteristics.
</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
```
module mUserData
type tUserData
integer :: sin
character(len = 30) :: name
end type tUserData
interface read(formatted)
subroutine readUserData(userObj, unit, iotype, v_list, iostat, iomsg)
import tUserData
class(tUserData), intent(inout) :: userObj
integer, intent(in) :: unit
character(len = *), intent(in) :: iotype
integer, dimension( : ), intent(in) :: v_list
integer, intent(out) :: iostat
character(len = *), intent(inout) :: iomsg
end subroutine readUserData
end interface
end module mUserData
subroutine readUserData(userObj, unit, iotype, v_list, iostat, iomsg)
use mUserData, only : tUserData
class(tUserData), intent(inout) :: userObj
integer, intent(in) :: unit
character(len = *), intent(in) :: iotype
integer, dimension( : ), intent(in) :: v_list
integer, intent(out) :: iostat
character(len = *), intent(inout) :: iomsg
read(unit, '(I9," ",A30)', iomsg=iomsg,&
asynchronous='yes', iostat=iostat) userObj%sin, userObj%name
end subroutine readUserData
```
Flang currently issues an error as:
```
./t.f:10:20: warning: The global subprogram 'readuserdata' is not compatible with its local procedure declaration (incompatible dummy argument #1: incompatible dummy data object attributes)
subroutine readUserData(userObj, unit, iotype, v_list, iostat, iomsg)
^^^^^^^^^^^^
./t.f:25:12: Declaration of 'readuserdata'
subroutine readUserData(userObj, unit, iotype, v_list, iostat, iomsg)
^^^^^^^^^^^^
./t.f:10:20: Declaration of 'readuserdata'
subroutine readUserData(userObj, unit, iotype, v_list, iostat, iomsg)
^^^^^^^^^^^^
./t.f:36:21: error: String edit descriptor in READ format expression
read(unit, '(I9," ",A30)', iomsg=iomsg,&
^^^
```
If I comment out the READ statement, it compiles fine.
Both ifort and XLF compiled the code fine as is. However, both gfortran and Flang has the same behavior.
The READ statement is executable. It should not affect the procedure interface characteristic checking.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVk2P2zYQ_TX0ZRBDola2fNBBsWN0gQIB2hToraDEkcSUIg2S2o3_fTG0bGu9u22aTYAYhi1I8_nm8WmE96oziCXL37N8txBj6K0rd8Io1Nttj2ZRW3kst9Z4JdFB6BFaq7V9VKaDxkpkScVWyfRNqsHKUSMMf3h0OxEEPU4qAIBwPCCE2X1QJmCHDlhWsawCr8xkSp-mF040AR3jhUYDLNtBljC-OZsbMeBkj0Y-D3_NTHlcKxoEh0IyXrTWDSIElIxvZin9WDs7BmVOhpdYvBg9uo_1Z8a3MBoV6F9ZykhXD39p5ad7PojpavDdFF0NB-vC09Znn0YL7xkvrs_5JoYwAU1gvFDGjmHW-LmYK4I35nNbqvYm3wvAMl49zzoLMzX7NNAsuVQDGq-sYbwgH_jXaBNgr0a7eD3te0L3G7u5jUXzuYYiBr02_ivHLkQ6cYtuvcz3H8QkABr-LBnfgjX6GCG_4f6bePXKPF6k1pv59H149D_580beXMVlkpTzMBlfM17cUxTGOTDOGd9WUbjio_NAs9002C3jqxkRhT-apnfW2NGzbMf4-oj-4hkbINcTOzaXmfGc1JNIdbkx6ePE09fJPVdvllR7LUjZR-fQBH0E5f2IHoQBdM46EJ6geOq2ZHwfli3LqjRhWcXpBx6FM8p0dPmpR-i0rYWmOg7Odk4MBBWVQhXLSM81KA_GBmjscBBB1RrhUYUeVPCgbSM0HJxtUI4OQWKjhRNBWQNxUDMnOQ7DEYTrxgFNAMazNA7vuQ0lBlt_xiaACMGpegyE9-aJzPyg48zyD__9naPLc4KYUy-7Wfu2fQHL2MDPUviMFl9V-M9Sd7aiuiN5Ivvp4vfgaPdBqQJI9I1Th2AdKAO_fah2cNotAL8cHPooZWcmfS-lmJd6c3jvW7in0xNpb8cQ97VYFsGBQxS1LajTEVMaPbTK4JIl1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