<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/68654>68654</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang][OpenMP] Compilation error when local-name of rename-list written in USE statement is specified as intrinsic_procedure_name in REDUCTION clause
</td>
</tr>
<tr>
<th>Labels</th>
<td>
openmp,
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 : 18.0.0(cc627828f5176c6d75a25f1756d387d18539c1fb)
```
If `local-name` (ren) of `rename-list` written in `USE` statement is specified as `intrinsic_procedure_name` in `REDUCTION` clause, a compilation error occurs.
If `intrinsic_procedure_name` is changed to max instead of ren, a compilation terminates normally.
The following are the test program, Flang-new, Gfortran and ifort compilation result.
snggz888_.f90:
```fortran
module m1
intrinsic max
end module m1
program main
use m1, ren=>max
n=0
!$omp parallel do reduction(ren:n)
do i=1,100
n=max(n,i)
end do
if (n/=100) print *,101
print *,'pass'
end program main
```
```
$ flang-new snggz888_.f90 -fopenmp
error: Semantic errors in snggz888_.f90
./snggz888_.f90:7:19: error: Invalid reduction identifier in REDUCTION clause.
!$omp parallel do reduction(ren:n)
^^^^^^^^^^^^^^^^
$
```
```
$ gfortran snggz888_.f90 -fopenmp
$
```
```
$ ifort snggz888_.f90 -qopenmp
pass
$
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVU1v4zYQ_TXUZWCBoqyvgw7eOC5yaLdoNr0GFDmSuaBIlaQ23f76gpLtON5tgBQQbGg4esN582aGe68Gg9iS4hMp9gmfw9G61h6N3fRfk87K7y0p6emhe0J3f6LzyhqwPfSam2Fj8AVIvoOsTmlKCauFKFlVs7ovsqoUpawKzoo-q4pS5nUls7rIG5H1HWHNCnkTYf196IGUVFvB9cbwEUlJgbDaoSGsidFJSR3Gk41WPsTjF6dCQAPKxMOnx_to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