<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - `Scope.hasEHBranches() == (EHEntry != nullptr)' assertion with openmp reproducer:"
href="https://bugs.llvm.org/show_bug.cgi?id=35152">35152</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>`Scope.hasEHBranches() == (EHEntry != nullptr)' assertion with openmp reproducer:
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Clang Compiler Support
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>erich.keane@intel.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19366" name="attach_19366" title="Repro file, command line">attachment 19366</a> <a href="attachment.cgi?id=19366&action=edit" title="Repro file, command line">[details]</a></span>
Repro file, command line
See repro file, taken from our internal test suite. Only happens with -O1 for
some reason, and ONLY with a windows target, but it is reproduceable with a
Linux host (see command line in the repro).
Also, copied and pasted here for convenience:
//clang -cc1 -triple x86_64-pc-windows-msvc18.0.0 -emit-obj repro.cpp
-fexceptions -fcxx-exceptions -std=c++11 -fms-compatibility-version=18 -fopenmp
-fms-extensions -O1
void printf(const char*);
void exit(int);
struct Test {
static void main() {
int failed = 0;
int j = 2;
#pragma omp parallel
{
int local_j = 3;
#pragma omp single copyprivate(local_j)
{
local_j = 4;
}
// Assure reports a data race, but value written to "j"
// should always be the same.
j = local_j;
}
if(j != 4) failed = 1;
if(failed) {
printf("Test " __FILE__ " failed\n");
exit(1);
} else {
printf("Test " __FILE__ " passed\n");
exit(0);
}
}
};
int main() {
Test::main();
return 0;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>