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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96833
Tobias Weinzierl changed:
What|Removed |Added
Resolution|--- |WORKSFORME
Status|UNCONFI
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
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
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