public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/53895] New: [4.7.2/4.8 Regression][lto] symbol 'std::__once_callable' used as both __thread and non-__thread
@ 2012-07-09  4:59 vincenzo.innocente at cern dot ch
  2012-07-09  6:28 ` [Bug lto/53895] " hjl.tools at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-07-09  4:59 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53895
           Summary: [4.7.2/4.8 Regression][lto] symbol
                    'std::__once_callable' used as both __thread and
                    non-__thread
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@cern.ch


I'm sure was working with 4.7.1
works with gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) 

this is ok
c++ thread.cpp -pthread -std=gnu++0x -O2 
this is not
c++ thread.cpp -pthread -std=gnu++0x -O2 -flto
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/bin/ld: error:
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64/libstdc++.so:
symbol 'std::__once_call' used as both __thread and non-__thread
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/bin/ld: /tmp/innocent/ccd0XlxC.o:
previous definition here
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/bin/ld: error:
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib64/libstdc++.so:
symbol 'std::__once_callable' used as both __thread and non-__thread
/afs/cern.ch/user/i/innocent/w3/gcc47slc5/bin/ld: /tmp/innocent/ccd0XlxC.o:
previous definition here
collect2: error: ld returned 1 exit status

ld -v
GNU gold (GNU Binutils 2.22.52.20120515) 1.11
gcc version 4.7.2 20120629 (prerelease) [gcc-4_7-branch revision 189081] (GCC)
gcc version 4.8.0 20120623 (experimental) [trunk revision 188906] (GCC) 
gcc version 4.8.0 20120708 (experimental) [trunk revision 189362] (GCC) 


cat thread.cpp
include <iostream>
#include <sstream>
#include <vector>
#include <thread>
#include <mutex>
#include <future>
#include <atomic>
#include <functional>
#include <algorithm>

typedef std::thread Thread;
typedef std::vector<std::thread> ThreadGroup;
typedef std::mutex Mutex;
typedef std::unique_lock<std::mutex> Guard;
typedef std::condition_variable Condition;


long long threadId() {
  std::stringstream ss;
  ss << std::this_thread::get_id();
  long long id;
  ss >> id;
  return id; 
}


namespace global {
  // control cout....
  Mutex coutLock;
}


int main() {

  return 0;
}


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

end of thread, other threads:[~2013-01-01  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09  4:59 [Bug lto/53895] New: [4.7.2/4.8 Regression][lto] symbol 'std::__once_callable' used as both __thread and non-__thread vincenzo.innocente at cern dot ch
2012-07-09  6:28 ` [Bug lto/53895] " hjl.tools at gmail dot com
2012-07-09  8:38 ` [Bug lto/53895] [4.7/4.8 " rguenth at gcc dot gnu.org
2012-07-09 12:20 ` vincenzo.innocente at cern dot ch
2012-07-09 13:16 ` hjl.tools at gmail dot com
2012-07-16 11:12 ` marvin24 at gmx dot de
2012-08-15  6:59 ` vincenzo.innocente at cern dot ch
2012-09-20 10:28 ` jakub at gcc dot gnu.org
2013-01-01  5:28 ` pinskia 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).