<div dir="ltr"><div>Alexey - then, a warning saying it is going to fail at run time or something if the developer is calling a virtual function in the target region. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 14, 2020 at 7:26 AM Alexey Bataev <<a href="mailto:a.bataev@outlook.com">a.bataev@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hi Itaru, what kind of messages? About mapping data types with
virtual functions? Better to be a warning, I think.<br>
</p>
<pre cols="72">-------------
Best regards,
Alexey Bataev</pre>
<div>12.01.2020 9:34 PM, Itaru Kitayama
пишет:<br>
</div>
<blockquote type="cite">
<div>
<div dir="auto">Alexey,</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Can we have build time error messages?</div>
<div dir="auto">Clang does not complain at this moment.</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jan 12, 2020 at 8:29
Alexey Bataev <<a href="mailto:a.bataev@hotmail.com" target="_blank">a.bataev@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Virtual
functions are not supported.<br>
<br>
Best regards,<br>
Alexey Bataev<br>
<br>
> 11 янв. 2020 г., в 18:08, Itaru Kitayama via Openmp-dev
<<a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a>>
написал(а):<br>
> <br>
> <br>
> Hi,<br>
> C++ sample code like below:<br>
> <br>
> class AbsBase {<br>
> public:<br>
> virtual int f() = 0;<br>
> };<br>
> <br>
> class Derived : public AbsBase {<br>
> private:<br>
> int *arr = new int[100];<br>
> public:<br>
> int f() { return arr[0]; }<br>
> void fillarray() {<br>
> arr[0] = 1234;<br>
> }<br>
> };<br>
> <br>
> int main() {<br>
> AbsBase *absBase = new Derived();<br>
> #pragma omp target enter data map(to: absBase[0:1])<br>
> #pragma omp target parallel for map(to: absBase)<br>
> for (int i=0;i<10;i++) {<br>
> static_cast<Derived*>(absBase)->f();<br>
> }<br>
> }<br>
> <br>
> 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 <br>
> current trunk of Clang?<br>
> _______________________________________________<br>
> Openmp-dev mailing list<br>
> <a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote></div></div>