[Openmp-dev] Target CUDA RTL --> CUDA error is: an illegal memory access was encountered

Alexey Bataev via Openmp-dev openmp-dev at lists.llvm.org
Sat Jan 11 15:29:02 PST 2020


Virtual functions are not supported.

Best regards,
Alexey Bataev

> 11 янв. 2020 г., в 18:08, Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org> написал(а):
> 
> 
> Hi,
> C++ sample code like below:
> 
> class AbsBase {
> public:
> virtual int f() = 0;
> };
> 
> class Derived : public AbsBase {
> private:
> int *arr = new int[100];
> public:
> int f() { return arr[0]; }
> void fillarray() {
> arr[0] = 1234;
> }
> };
> 
> int main() {
> AbsBase *absBase = new Derived();
> #pragma omp target enter data map(to: absBase[0:1])
> #pragma omp target parallel for map(to: absBase)
> for (int i=0;i<10;i++) {
> static_cast<Derived*>(absBase)->f();
> }
> }
> 
> if it is built with the offloading support and executed on POWER8, I observe illegal memory access. Am I programming incorrectly or the possible bug in the 
> current trunk of Clang?
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list