<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/123807>123807</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Incorrect diagnostic on sequence association of character type arguments
</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 m
contains
subroutine test2 (s)
character(5), intent(inout) :: s(5)
! s = (/character(5) :: 'POINT', 'COMMA', 'UNDEFINED', '',''/)
end subroutine
end module
use m
character(30), allocatable :: s3
allocate (s3)
s3 = ''
call test2(s3)
end
```
Flang currently issues an error as:
```
./t.f:18:16: error: Actual argument has fewer characters remaining in storage sequence (24) than dummy argument 's=' (25)
call test2(s3)
^^
```
This is sequence association. It is allowed to have different length between actual and dummy character type argument.
All ifort, gfortran and XLF compiled the code successfully.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8VE2PozgQ_TXmUhpEbAjkwIFNGqmlnZ49zEp7NaYAr4zda5e7lX-_MqGTntmPCAVTro_3XpUtQ9CzRWxZ9QurLpmMtDjfXqTVaM7nBW02uPHanp0NekQPtCBMzhj3ru0Myo3Iio4di_0putWN0SCsrOgAAJSzJLUNyetmCXHwLpK2CISBODDeBMZPaVst0ktF6BlvqmTjZ9CW0BLjjbYuEuMnYKJjooPw4XRPzfhhqwBMXFJaxvufM34EM17_9u355TvjdSrCeH3-9vVr9_j8_eXy1D-_PF0eptvqY9HvmAEA7fiJ1g1Pst20uH3H8EmUT6BEsfOUxjglSQ4G7wzFg9u-jZtcYq8dxE51g3T3VdKYm7ifnW9Af2oXK7reyNTK6D1aMlfQIUQMIC2g986DDAnOj2E54z3lExPdoUl_xwR3c0-LTlGUBqSf44qWYJEBJnxH_2AewOMqtU1TpC0Ecl7OCAH_imjVxpKXqV-0SAtjXNfrIx_jdWAidWbzqx4E_4f7Dz9WPaXnH1p8X3QAHR44ZAhOaUna2RyeKe2lTrzjCORgkW8Io54mTNqBQTvTAgPSO6IFuctgx53AnT3Q9RXvfHJWdJ0xoCfnKY3CnBZe2i30j197UG591SbVXHA7dBCiUhjCFI255tnYivEkTjLD9lCLumxqwY_Z0lZNjYNSZVOJaZyGI9bDqRDDsZmmoRSTynTLC14VB344nDgvRF6Oh0KqoSyHkxLHcWBlkfpkcmPe1tz5OdvGoz1w0RR1ZuSAJmy3B-dTGiQmusm7dGZHxnm6U3ybYr8McQ6sLIwOFB7ZSJPZbp9tCll1gWernPeoCEYtZ-sCaQXO_mtLwE3_JWrIojftQvS6jW86rv2saYlDrtzKeJ8g7K8vr979iYoY72_Dz3i_E3xr-d8BAAD__9sNjp4">