<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 - OpenMPOpt is illegally removing calls"
href="https://bugs.llvm.org/show_bug.cgi?id=48686">48686</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>OpenMPOpt is illegally removing calls
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</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>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rscottmanley@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The OpenMPOpt pass in opt is illegally removing the second call to
omp_get_level() in the source code below after the second call gets inlined.
Using -openmp-opt-disable resolves the issue.
clang -O2 -fopenmp test.c
#include <omp.h>
#include <assert.h>
int main()
{
omp_set_nested(1);
assert(omp_get_level() == 0);
#pragma omp parallel if(0) num_threads(2)
{
assert(omp_get_level() == 1);
}
}
I've confirmed this exists in both release/11.x and main branches</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>