[Openmp-dev] Global BSS symbol not initialized properly if built with -fopenmp-targets=nvptx64

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Sun Aug 4 19:01:17 PDT 2019


All,
Alexey agreed this is a bug of Clang and is working on a fix, as during the
global initialization phase, the instance's pointer to the vtable is never
set.

On Thu, Jul 25, 2019 at 1:47 PM Itaru Kitayama <itaru.kitayama at gmail.com>
wrote:

> Hi,
> I am revisiting this possible compiler bug in Clang 8.0.0.
>
> In the source code I am developing, there's a global static variable,
> nest::sli_neuron::recordablesMap_ put in the BSS section and it is expected
> to be fully initialized by the time nest::sli_neuron::sli_neuron() gets
> called, however in a gdb session:
>
> (gdb) p nest::sli_neuron::recordablesMap_
> Python Exception <type 'exceptions.AttributeError'> 'gdb.Type' object has
> no attribute 'name':
> $1 = {<std::map<Name, double (nest::sli_neuron::*)() const,
> std::less<Name>, std::allocator<std::pair<Name const, double
> (nest::sli_neuron::*)() const> > >> = std::map with 0 elements,
> _vptr$RecordablesMap = 0x0}
>
> this doesn't happen when -fopenmp-targets is _not_ used, is it not trivial
> to come up a reproducer, thus I am sending a work-in-progress report hoping
> someone will shed some light on this.
>
> Thanks,
> Itaru.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190805/ec5b089b/attachment.html>


More information about the Openmp-dev mailing list