<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60644>60644</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Flang][OpenMP] Incorrect error issued for DEFAULT(None) 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>
kiranchandramohan
</td>
</tr>
</table>
<pre>
Semantic checks incorrectly error out for variables with predefined data-sharing attributes in OpenMP regions with `default(NONE)` data-sharing clause. An example of such an error and reproducer is given below. Section (2.15.1.1) of OpenMP 4.5 covers predefined data-sharing status of variables. Ensure that in all such situations an error like the following is not produced.
Error
```
error: The DEFAULT(NONE) clause requires that 'i' must be listed in a data-sharing attribute clause
```
Code
```
program mn
integer :: i, arr(100)
!$omp parallel default(none) shared(arr)
do i=1,100
arr(i) = i
end do
!$omp end parallel
end program
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VNFupLgS_ZripRQEBrrhgYeedFq60t2ZlWb2AwpcgDfGZm2T7Pz9yrST7I4UqdUWZZ9T57jKRd6r2TD30HyB5prRHhbr-mflyIwLGelotQuZbLDyZ_-dVzJBjTguPD57VGa0zvEY9E9k56xDuwecrMMXcooGzR5fVVhwcyx5UoYlSgr04BdyysxIITg17IEjF37b2Pz2OzqelTUJCadC8kS7DiDar9--PoHo4FT8l2bUtHvO8WKQ_6Z104x2Qr-PC5JJyshIdLw5K_eRHSqPs3phgwNr-5rjdx6DsgZBtCIvm7zMSxBdpEmq6rzB0b6w85-68YHC7iPm3X6OT8bvjjEsFKJH0vouzKuwUziMvmvU6jmeZJys1vY1ciqPxgZMumUOxRWKy_3_KYJS4FSk3_F554Pqgj8WxuvT7fLH_398XGC6MHT8164c-7s6EGcF4ozr7gMOjFr5wPIQ_UnVEk_K-auGtDxa-dmJzdnZ0YqrSQFUJvDMDqG6RPUKxCOScyDasihi6dM5ECWI2q4bbuRIa9b40SbGGo4uo16WINqD4R0rLSqoriWIx0iaopjyqIiE6orqbYeNRGnfLLwnjuG35PfNI3K39KvhTPaV7KqOMu7L07np2qoSVbb0RSuHsuUzUX0e6qKdqnGqulEWZVNSXQ-Z6kUhqkIUnRBNI6p8LMeu7pqCSU6iajuoC15J6VzrlzW3bs6U9zv3p-JU15mmgbU_nrcQdmOzbiAEiEcQYtJkZqguk7MmsJFxo7lmro9MD8M-e6iL2AX-gzuooI9pcTvAzRWaL_cXAs0V__c2EFJDH0rkMRH-1YSpPPfmyXan-yWEzceaixuI26zCsg_5aFcQt5g5LQ-bs3_yGEDcDmIP4na4_CcAAP__rA-A0g">