<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 - No warnings about "Non-trivial type" when captured for teams region"
href="https://bugs.llvm.org/show_bug.cgi?id=43772">43772</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>No warnings about "Non-trivial type" when captured for teams region
</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>Linux
</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>hahnjo@hahnjo.de
</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=22708" name="attach_22708" title="Example code">attachment 22708</a> <a href="attachment.cgi?id=22708&action=edit" title="Example code">[details]</a></span>
Example code
Please see attached code. When compiling with
$ clang++ -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu tuple.cpp
tuple.cpp:11:38: warning: Non-trivial type 'std::tuple<double, int>' is mapped,
only trivial types are guaranteed to be mapped correctly [-Wopenmp-target]
printf("%f, %d\n", std::get<0>(m_args), std::get<1>(m_args));
^~~~~~
tuple.cpp:29:5: note: in instantiation of member function 'S<double, int>::f'
requested here
s.f();
^
tuple.cpp:15:38: warning: Non-trivial type 'std::tuple<double, int>' is mapped,
only trivial types are guaranteed to be mapped correctly [-Wopenmp-target]
printf("%f, %d\n", std::get<0>(m_args), std::get<1>(m_args));
^~~~~~
2 warnings generated.
tuple.cpp:11:38: warning: Non-trivial type 'std::tuple<double, int>' is mapped,
only trivial types are guaranteed to be mapped correctly [-Wopenmp-target]
printf("%f, %d\n", std::get<0>(m_args), std::get<1>(m_args));
^~~~~~
tuple.cpp:29:5: note: in instantiation of member function 'S<double, int>::f'
requested here
s.f();
^
tuple.cpp:15:38: warning: Non-trivial type 'std::tuple<double, int>' is mapped,
only trivial types are guaranteed to be mapped correctly [-Wopenmp-target]
printf("%f, %d\n", std::get<0>(m_args), std::get<1>(m_args));
^~~~~~
2 warnings generated.
I would also expect for line 20. Strictly speaking, it's not required but I
find it odd that Clang warns for several cases, but not for this one.</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>