<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54474>54474</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][OpenMP][omp2012]
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
NimishMishra
</td>
</tr>
</table>
<pre>
**Note**: This issue can be reproduced from the monorepo once the upstream from [fir-dev](https://github.com/flang-compiler/f18-llvm-project/tree/fir-dev) has matured. The actual issue came up while building omp2012 with the current state of LLVM flang (lowering enabled)
The following source dumps core with `flang-new -fopenmp -c -o rtc02.o rtc02.f`:
```
! FAIL: flang-new -fopenmp -c -o rtc02.o rtc02.f
SUBROUTINE rtc02
double precision var_1, var2
common/var/var_1,var_2
!$omp threadprivate (/var/)
RETURN
END
```
Core dumps as
```
error: loc("./rtc02.f":3:7): /f18-llvm-project/flang/lib/Lower/OpenMP.cpp:885:
not yet implemented OpenMPThreadprivate
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU01vozAQ_TVwGYHAQEoOHNIvqVKarrrpXlcGD8Erg5FtEvXf7xiaNKpW1SJjj8fPM8_P41qL9ypgG2o77XCxgmwD-05akNZOCA0foEYwOBotpgYFtEb34DqEXg-a_Br00ODsmUbrDPJ-wQTFbStNJPAYFPcBKzvnRkvhA_ZI7SBdN9Vxo3uatIoPh4jsUSo03pGWkVLHPqK0f7Bx5KLI6Fc-QrI1dNxCz91kUMTEGYE3buLqwrz3jODUUUyoJ6mEHA5AOViSMjhR_pl0MxmDgwPruEPQLWy3v55hZgTEWukTGr8RB14rFJQ4SO6DZLP0Pm2rFaE8xurJkBZi6kcLDamzpAlWyXLCAU8QtXrEoR8haiDSYFyTsPg8tgT1Ei0ZyF7aMmUpPG6etv6G_jvcFVWYv59vt68vb_un3cOCOSPWQk90PhgNNtJKPcCRm99pwO688QmjS6KLp4sg79LPID-yC8-A5aQzyUvVIEYjj15aEvOy7aLiQur1Yf_2urv2POzur7l_lWLu77zAi9ZUCd_A0RhtvGxKNzMLFhOHs0SM0VJG_41nRah_198sOY1K1tRvfVnQ-ELiP_-Im3GknWVZzPvnpIN28I4OZD8q7KnC6O0s6P21LF8Ih6LKxDpb89BJp7Dyj2hOTE-ouF32L_ZHIdMEwsmo6pvn5U_yMVwdaH4mlowiz2_ysKvKtMzKvEhbwRueipYV-SpLsrYQdS1WbRsqXqOynhNlDWXFEsaSjKX0rdlNvCprLNK6zLMm5XmZBHmCPZcq9oljbQ6hqWYO9XSwtKikdfZzkVsrDwPiOT6fXKdNtZO9tN0z_YaHM-dqJvwXwaNxaA">