public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57163] New: Link failure with thread_local std::default_random_engine
@ 2013-05-03 16:20 jleahy+gcc at gmail dot com
  2013-05-04  0:07 ` [Bug c++/57163] Link failure with thread_local paolo.carlini at oracle dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jleahy+gcc at gmail dot com @ 2013-05-03 16:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57163

             Bug #: 57163
           Summary: Link failure with thread_local
                    std::default_random_engine
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jleahy+gcc@gmail.com


Created attachment 30026
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30026
Preprocessed input files

Output of gcc -v:
Thread model: posix
gcc version 4.8.0 (GCC)
Target: x86_64-unknown-linux-gnu

Input file test.cpp:
#include <random>
extern thread_local std::default_random_engine rng;
int main() { return rng(); }

Input file test2.cpp:
#include <random>
thread_local std::default_random_engine rng;

Command line and output:
g++ -std=c++11 -c test.cpp && g++ -std=c++11 -c test2.cpp && g++ -std=c++11
test.o test2.o
test.o:test.cpp:function _ZTW3rng: error: undefined reference to '_ZTH3rng'
collect2: error: ld returned 1 exit status

Complete preprocessed output attached. I can't reproduce this with a single
translation unit.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-30 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 16:20 [Bug c++/57163] New: Link failure with thread_local std::default_random_engine jleahy+gcc at gmail dot com
2013-05-04  0:07 ` [Bug c++/57163] Link failure with thread_local paolo.carlini at oracle dot com
2013-06-14 22:40 ` meyerm at fs dot tum.de
2013-06-14 22:41 ` meyerm at fs dot tum.de
2013-12-02  2:56 ` conradsand.arma at gmail dot com
2014-01-30 15:25 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).