https://bugs.llvm.org/show_bug.cgi?id=44523

            Bug ID: 44523
           Summary: nvlink error   : Undefined reference to
                    '__cxa_pure_virtual' in '/tmp/test2-d01e72.cubin'
           Product: OpenMP
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

The C++ code below doesn't build:

class AbsBase {
        virtual int f() = 0;
};
class Derived : public AbsBase {
private:
        int a;
public:
        int f() { a = 1; return a; }
};

int main() {
#pragma omp target parallel for
        for (int i=0;i<10;i++) {
                Derived d;
        }
}

[kitayama1@juronc12 ~]$ clang++ -fno-rtti -g -fopenmp -fopenmp-targets=nvptx64
test2.cpp
nvlink error   : Undefined reference to '__cxa_pure_virtual' in
'/tmp/test2-ed87e2.cubin'
clang-10: error: nvlink command failed with exit code 255 (use -v to see
invocation)

-- 
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

Reply via email to