<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 - libomptarget: Crash for global symbols with name "times""
href="https://bugs.llvm.org/show_bug.cgi?id=41826">41826</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>libomptarget: Crash for global symbols with name "times"
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Runtime Library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Cramer@itc.rwth-aachen.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>For OpenMP codes using target device offloading global arrays must not be named
"times", because this causes a crash. I guess the there is some kind of nameing
conflict. Here is a reproducer:
//======================================
#ifndef BUG
#define <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Need to add product version numbers"
href="show_bug.cgi?id=1">BUG 1</a>
#endif
#pragma omp declare target
#if BUG
int times[10];
#else
int times2[10];
#endif
#pragma omp end declare target
int main(void) {
#pragma omp target device(0)
{
#if BUG
times[8] = 42;
#else
times2[8] = 42;
#endif
}
return 0;
}
//======================================
If I rename the array from "times" to "times2" it works as expected. I compiled
with "clang -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu main.c -DBUG=1
-o bug".</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>