<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95765>95765</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CMake][Test] The compiler crash is not detected in the `ninja check-flang`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Thirumalai-Shaktivel
</td>
</tr>
</table>
<pre>
Consider an example:
```fortran
!$omp threadprivate(a)
end
```
This causes a compiler crash (the issue has already been reported here: https://github.com/llvm/llvm-project/issues/82942)
I found this issue while fixing the above issue:
I added the example into a file `atomic06-empty.f90` with the contents:
```fortran
! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! Test the source code starting with omp syntax
!$omp threadprivate(a)
end
```
Without the fix, I ran `ninja check-flang`, to be surprised the tests passed.
The CMake doesn't stop with an error but passes successfully.
If someone modifies the actual fix for threadprivate, the crash will be triggered but goes unnoticed by the CMake.
cc @kiranchandramohan @kiranktp
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVE2P4zYM_TXKhRjDVpw4Pviwm0GAPbSH7hQ9LmiLtrWRJUOkM5N_X8jOdjoLFAVawPCHLJLvPT0Sme3giRp1-KwOzztcZAyxeRltXCZ0aJ--jngVeyO3a4O5N-fg2RqKgB7oDafZkdp_Uvmzyj-pY75dfYgS0T9WdaF0GaYZZIyEZo72hkJKn1DpettD3vyUYvt8GS1DhwsTA0IXptk6itBF5BGUPslIYJkXghEZ0KX8d2iJPESaQxQyMFJMEGEUmTlh1RelL4OVcWmzLkxKX5y7_Xg8zTF8p06UvqyJWenLSdel_gvrF-jD4g1IwrYVfx2tI-jtm_UDJEzYhtsD2bs6j2g0hsy666EfWC8BEPqURB1zlDDZLj8-0TTLPevrpAe8WhnXqC54IS_877LDb7__mpgrfZjvMgaf3r4qfckypS9CLN8oxhA5m-_pF6db79AP3_qugKc-zOSn-T3fC7GsGDgssUtQDAELRknEV4TpnPnuBd_-zvr_eOAPK2NYtrq9fVP6DF8gok9Seeu_I3QjddenFXiK0meQAC0BL3GOlh9qJ74MMzKTyX7Yi-D8C14JTCD2SlcCLGHeqCSHJ3mgXWSLY-Cl64i5X5y7Zx_OtQcOEwVPMAVje0u8OaGTBV0CDn2IP9M_bye62vnVOpdQS7TDQJHMWncIxLB4H8R2aem-RqygP9TvOlBlfrURfTeiNxGnMCaRHotXmWFnmr2p9zXuqCmq4nTUeV2Vu7Gpi5NGOu2L0hRlRUVr8n1tdF_jvjrRCXe20bku82NRFXmpD2VmqiOaAk9VRVRiVasypwmty1IPZSEOu9X8TX2ojoedw5YcrzNG63YZlNZp2MRm7bh2GViVubMs_B4vVtw6llau6vCsDp-T_9ThGV7WNvgwDCyDDwKGhLrU9davQv2DR3ZLdM1_Hwgbq1uj_wwAAP__L1auEw">