<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56884>56884</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compiler crash with LLVM15 when parsing some omp constructs
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mgabka
</td>
</tr>
</table>
<pre>
I noticed that LLVM15 based clang crashes when compiling a simple code:
class A{
void a() {
#pragma omp parallel
a(b);
}
};
When compiler with assertions is used, I am seeing an assertion failure from:
llvm-project/clang/lib/Sema/SemaOpenMP.cpp:1229: const clang::ValueDecl* getCanonicalDecl(const clang::ValueDecl*): Assertion `FD' failed.
a bit of bisecting pointed me to a commit https://reviews.llvm.org/D127803.
When I revert it, clang correctly reports error: error: use of undeclared identifier 'b'.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9Ul1v2zAM_DXyCzHDluOPPPghbRCgQIsNGNA90zZja5MlQ5IT9N-PdtKkQ4sBhihTInV3vMZ2b_UTGBtUSx2EAQM8P7--pDk06DnTajQ9tA79QB7OAxlo7TgprTiN4NU4aeJURyLbiWQvkuvKhd7DTpQPl3-Ak1UdoJCVkFv4kAcQMpsc9iMCt4YJHWpN-n6-FDVcJbJbkSj319d4857-uP66QyUHZxUGYEDkgrLGg_IwMz0hH-EJcARPtBIy90twRKVnR3B0dmRycOmr9Wn8Njn7m9og5GHVh6NWDPDwk0a8hu8TmZcfcTtNXJvKBfyO8RgfLpoucmW7V9Qz7anVQu6gp_CIxhrVor7kqv8WiEvT3Q2xKJLDXshyhU5d_FkVhEYFsEcOngksnCerTOBJjwTB8khZs5HvDCFMfnlTHvhzdFJ09vHCPrZuYbxPZVklWfxJ9Cfg24wIVFj0vTrIOscP6jc-nKwLHsg56xb8tw1PZIE2m475oWNMqiMT1FHxBJkWK1x-wSmiOi3y7SYviqyIujrrttkWo6CCpvrx3QGrhS8-uBp8NTObzS8qeMv8F_etiru5DT6ana7_laHn8rmJWaJl5KzFNXwwhPJ-Js-bvKiqTTTUeUNZWSCSLDAry81WtlvcdHikpqjaCiONDWlfi_xB5PtI1TKRMqkSmRZpkuVxh9kxyRMuyplmWopNwvZS-jaLyNUrhmbuPR9q5cN9UBH7WfWG6L0_zmGwrh57bP5gtKKtV6h_AdqUQ9U">