<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106020>106020</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang] Compilation error when rename-list is used in use statement
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ohno-fj
</td>
</tr>
</table>
<pre>
```
Version of flang-new : 20.0.0(3496245ed3d0b4d24444260da77dcdb93512fb5a/AArch64
```
When 'rename-list' is used in 'use' statement, a compilation error occurs.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
snfm_peta_xref_001_2.f90:
```fortran
program main
print *,"pass"
end program main
module mod
logical,protected,external :: int4
pointer :: int4
contains
subroutine sss()
contains
end subroutine sss
end module mod
subroutine subb()
use mod,sss=>int4
end subroutine subb
```
```
$ flang-new snfm_peta_xref_001_2.f90
error: Semantic errors in snfm_peta_xref_001_2.f90
./snfm_peta_xref_001_2.f90:15:11: error: A PROTECTED entity must be in the specification part of a module
use mod,sss=>int4
^^^
./snfm_peta_xref_001_2.f90:15:11: error: A PROTECTED entity must be a variable or pointer
use mod,sss=>int4
^^^
$
```
```
$ gfortran snfm_peta_xref_001_2.f90; ./a.out
pass
$
```
```
$ ifort -diag-disable=10448 snfm_peta_xref_001_2.f90; ./a.out
pass
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VV-Pq7YT_TTmxQoyg4HwwENusvk9_qp21T6uBjwQX4GNbLO799tXTsje3OzubSu1ESLCf-acmTkzg97rwRA1rPjCikOCSzhZ19iTsZv-a9Ja9a1hpVgfcWBi9zs5r63htuf9iGbYGHrhLN9xEKlIBYNtLusSZEEqV6KVCqSUEkqhsKpUp9o6LzLo2wIZHHc7151KebF8B_THiQxnUDkyONFm1D4wqLj2fPGkuD5vLp7iog8YaCITGOw58s5Osx4xRJ7knHXcdt3ifLoCnd-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