[Bug target/96835] Constructor in offload template class

2020-11-17 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835 --- Comment #7 from Tobias Weinzierl --- Adding a default constructor to the vector class still does not allow us to create the object on the target: #include #define mydt double #pragma omp declare target struct vector { vector() {}; v

[Bug target/96835] Constructor in offload template class

2020-11-17 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835 --- Comment #6 from Tobias Weinzierl --- We've found some more stuff. This works: #include #define mydt double #pragma omp declare target struct vector { vector(mydt x, mydt y); mydt dot(vector o); mydt v[2]; }; vector::vector(mydt

[Bug c++/96833] Functors within target offload code

2020-11-09 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96833 Tobias Weinzierl changed: What|Removed |Added Resolution|--- |WORKSFORME Status|UNCONFI

[Bug target/96835] Constructor in offload template class

2020-10-09 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835 --- Comment #4 from Tobias Weinzierl --- Created attachment 49339 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49339&action=edit Reproducer

[Bug target/96835] Constructor in offload template class

2020-10-05 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835 --- Comment #3 from Tobias Weinzierl --- The full compilation error is + g++-10 -fopenmp -foffload=nvptx-none bug.cpp -o bug ptxas /tmp/cc1XobxJ.o, line 253; error : Illegal operand type to instruction 'ld' ptxas /tmp/cc1XobxJ.o, line 266; er

[Bug target/96835] Constructor in offload template class

2020-10-05 Thread tobias.weinzierl at durham dot ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835 --- Comment #2 from Tobias Weinzierl --- #include #pragma omp declare target template struct vector { int values_[sz]; vector(); vector(int const& init_val); int dot(vector o) { int res = 0; for (int i = 0; i < sz; ++ i) r