[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
Wed Jul 24 21:47:14 PDT 2019


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/20190725/3a0a278a/attachment.html>


More information about the Openmp-dev mailing list