[llvm-bugs] [Bug 43772] New: No warnings about "Non-trivial type" when captured for teams region
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 23 02:57:45 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43772
Bug ID: 43772
Summary: No warnings about "Non-trivial type" when captured for
teams region
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangbugs at nondot.org
Reporter: hahnjo at hahnjo.de
CC: llvm-bugs at lists.llvm.org
Created attachment 22708
--> https://bugs.llvm.org/attachment.cgi?id=22708&action=edit
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191023/b3bc0f79/attachment.html>
More information about the llvm-bugs
mailing list