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: [email protected]
Reporter: [email protected]
CC: [email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs