<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57983>57983</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][OpenMP] One missed semantic check for firstprivate clause
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
PeixinQiao
</td>
</tr>
</table>
<pre>
```
subroutine single_private()
real :: x
real(8) :: y
!$omp single private(x) firstprivate(y)
call bar(x, y)
!$omp end single
end subroutine single_private
```
```
$ gfortran test.f90 -fopenmp
test.f90:5:0:
5 | !$omp single private(x) firstprivate(y)
|
Error: firstprivate variable ‘y’ is private in outer context
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUMuO2yAU_Rq8uZoI4ycLL9KZ6a6a6RdU2AabloAFOEr-vpc4UZKRuqp1Le6Lwzmnd-O5IzW9Bn0jdB_W3rs1aishaDsZ-Wvx-iiiJKwljG9LAF4KA6TYY8DpsYlrae82O2-z2wZhOWGlOyxXcLiDn9ItpX2I99754cVBGAO98NvqKzzO7rDSjlfobXap_ylp4_ZswNeSlTAp56MXFqIMcac4hRflFmkPy7Zza6PgCv90PssGqIA0r_BfBqQvgWz1u_fOJ4cfb8BReC16hCXvjLSUcES4Zhx0uL0G2gI6Ij0MzkZ5il-kZ7LL67rMeUMrmo1dMfKCiyzqaGRHqm_KCDuR6g3TD_Thxyfm8IH-HnQIEh2XB2GjHmCY5fAH0L5nmoMRa5DZ6k03x7iEZBj7jjHpOK_9bnAHLIw53o6XxbvfcohY4gurDJhUDW-LbO4axdH7nJaiZvWgxka0eUMVVS2vhKRDZkQvTUi8CWMb9WKvfFJuR2wh-Ux3jDJGOatzVjUF3bEc7xclpUUhVNUyUlIUpc0u0dk5P2W-uzDr1yng0OgQw30oQtCTlRe3Er5Y4-x89yn1SdufWrjsoqO7iPgLusUNMA">