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

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Sun Jan 12 23:34:11 PST 2020


Alexey,

Can we have build time error messages?
Clang does not complain at this moment.

On Sun, Jan 12, 2020 at 8:29 Alexey Bataev <a.bataev at hotmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200113/f5f69ed6/attachment.html>


More information about the Openmp-dev mailing list